1

I need to show a map with some points (with lat/lon) of a heatmap on a map based on OpenStreetMap (OSM) .

I have created a heatmap as a bitmap image by GHEAT.NET control lib http://www.codeproject.com/Articles/88956/GHeat-NET.

I would like to add the heatmap image to a map based on OSM so that the points on the heatmap can be shown on the correct locations by latitude/longitude on the map of OSM.

I am working on C# VS2013 WPF. In my C# code, I used OSM control lib GMAP.NET at:

http://greatmaps.codeplex.com/

This is my C# code:

System.Drawing.Bitmap myCanvasImage = new System.Drawing.Bitmap(12 * 256 - (2 * 256), 15 * 256 - (5 * 256),        System.Drawing.Imaging.PixelFormat.Format32bppArgb)
System.Drawing.Graphics g = Graphics.FromImage(myCanvasImage);
gheat.PointManager myPoints = new gheat.PointManager();
var xrange = Enumerable.Range(2, 12);
var yrange = Enumerable.Range(5, 15);
foreach (int x in xrange)
{
   foreach (int y in yrange)
   {
     System.Drawing.Bitmap tempImage = gheat.GHeat.GetTile(myPoints, "classic", zoom, x, y);
     g.DrawImage(tempImage, new System.Drawing.PointF(x * 256 - (2* 256), y * 256 - (5 * 256)));
   }
}

I need to add the "myCanvasImage" (the heatmap) to a map based on OSM.

I have checked "gmap-net-tutorial-maps-markers-and-polygons"

But, there is no "GMapOverLayer" class in GMAP.NET WPF.

I have also checked the "heatmap-with-osm" on oms help forum.

But, the solutions there do not work for we. I need to do heatmapping on C# WPF Visual Studio 2013 for desktop applications.

Leaflet and openlayers are javascript libs for web/mobile applications.

Also, MapSurfer.net requires .NET Framework 4.5 and Microsoft Visual C++ 2012.

OsmSharp is for routing on map.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.