0

I need to take a screenshot of a Google Map without using a static map in asp.net.

The features I need are not in the static map API, including rotation of the map, traffic, and so on.

I've used several libraries, including the C# web browser, CEFSharp, but none of the ability to take screenshots from the Google map.

For example, my problem with the C# web browser is to load the Google map after the DocumentCompleted event. The resulting image was displayed as gray content.

How can I get a screenshot of Google Map Programmatically?

AMIN
  • 3
  • 1
  • 6

1 Answers1

0

Selenium works very well for browser automation in C#. Without knowing your use case not sure if launching a full chrome / Firefox instance will suffice however you can definitely use it launch the browser, navigate to the map, and screenshot.

How to screenshot in Selenium / C# has been nicely answered in another question here .

Macros
  • 7,099
  • 2
  • 39
  • 61
  • I want to take screenshot programmatically within web application and i don't want to open browser to take screenshot – AMIN Aug 11 '18 at 11:48
  • You could try using a headless browser like https://github.com/scrapinghub/splash . This is also provided as a service here: https://scrapinghub.com/splash . I've used it in a number of projects and works very well – Macros Aug 11 '18 at 13:44
  • I need library written in C#, Can you give me a solution? – AMIN Aug 11 '18 at 14:36