Quantcast
Channel: GMap.NET - Great Maps for Windows Forms & Presentation
Viewing all articles
Browse latest Browse all 3384

New Post: Generating static map

$
0
0
Hi guys
I'm building app that uses gmap.net to generate heatmap. Now I need to get static image of part of the map. I was trying to use code from Demo.WindowsForms. I included "StaticImage" form in my project to check if it's working correctly (I was going to rewrite it later to suit my needs) with rest of the app, and it doesn't work at all. There are no errors, but in line 127 of StaticImage.cs:
tile = GMaps.Instance.GetImageFrom(tp, p, info.Zoom, out ex) as GMapImage;
the tile is always null, doesn't matter what settings are. I've checked it on OSM ang GoogleMaps on different zoom levels, and it just return null. Any idea how to fix it?
My heatmap (class based on GMapOverlay with overrided methods) work perfectly, the overlay is generated as it should. There are also all additonal elements like scale, coordinates of corners etc.. The only thing that is missing is the actual map.

I'm using 1.6 version, the Demo project uses 1.7 - but that function does exist in 1.6, so it shouldn't be problem. Any idea what the problem might be? Or how to generate static map with 1.6 version?

Thanks in advance!

Viewing all articles
Browse latest Browse all 3384


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>