I have the following page which loads a bog standard Google Map using the V3 API: http://canberranaturemap.org/Maintenance/MapTest
I have put a red border around the map for testing purposes.
I'm using the WebsiteToImage class from this page to take a screencapture of this web page and save a JPG image of the above Google Map page: Convert webpage to image from ASP.NET
This class utilises the C# Windows.Forms WebBrowser control which seems to run nicely on Azure within a Cloud Service (web role), permissions don't seem to be an issue and the threading and everything is working beautifully.
BUT... The downloaded JPG image simply shows the red border of the map frame, but with no Google Map image inside the square. I.e. the map isn't loading or rendering.
I've experimented with adding a Thread.Sleep(3000) delay in the WebsiteToImage Generate() method to slow it up a bit, but that didn't fix the issue. It's already firing upon the WebBrowser_DocumentCompleted event anyway, so adding a loading delay shouldn't be required. I've also set browser.ScriptErrorsSuppressed = true;
So essentially all my code is running smoothly, except the map is not showing in the resulting JPG image.
Any ideas?
Thanks