Add a heatmap as a layer to a map based on OpenStreetMap from C# WPF V

This question is related to my previous question. Currently, I just need to show a map with some less points of a heatmap on a map based on OpenStreetMap (OSM) .

I have created a heatmap as a bitmap image by GHEAT.NET control lib

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:

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” to a map based on OSM.

I have checked this

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

Any help would be appreciated.

A few years ago, I used the “Greatmaps” libraries to create my own tool for editing GPS tracks on a map, see It uses code from Greatmaps to download tiles (Google Earth, OpenStreetMap, etc), calculate the position of my GPS data on the image etc.
Creating a heatmap should not be so much different: instead of getting the location of the points from a gpx file, you take your heat map data.


I have generated the heatmap as a jpeg file. I need to add it as a layer to the map based on OpenStreetMap.

And, also the heatmap layer can be zoomed in/out as I zoom in/out the map.

I found the C# code from

But, it is for microsoft.maps.mapcontrol.wpf not for GMAP.NET at

private void AddTileOverlay()

        // Create a new map layer to add the tile overlay to.
        tileLayer = new MapTileLayer();
        // The source of the overlay.
        TileSource tileSource = new TileSource();
        tileSource.UriFormat = "{UriScheme}://{quadkey}.jpeg?g=129&mkt=en-us&shading=hill&stl=H";
        // Add the tile overlay to the map layer

        // Add the map layer to the map
        if (!MapTileOverlay.Children.Contains(tileLayer))  // in GMAP.NET WPF, there is no definition for "MapTileOverlay"
        tileLayer.Opacity = tileOpacity;

Any help would b e appreciated.

What about creating some classes yourself? What’s so hard here? Instead of drawing your heat map onto empty tiles, draw them on tiles retrieved from OSM. Or draw your heat map with some transparency (alpha channel) on top of the OSM tiles. Or …