I would like to create a raster overlay similar to heatmap; however, my raster overlay marks up some features of the base image (for example, by highlighting the contour of the base image with another color). So my raster layer is a bitmap that must overlay the base image pixel for pixel (e.g. when the map is zoomed or panned, my raster overlay must zoom or pan in tandem with the map). What is the best approach?
Raster overlay similar to heatmap
Gregory,
Thanks for your posts.
I am exactly sure about your requirement. Basically we can try to create our own RasterSource and RasterLayer probably from GdiPlusRasterSource or some other concrete raster source.
class MyRasterSource : GdiPlusRasterSource
{
protected override GeoImage GetImageCore(RectangleShape worldExtent, int canvasWidth, int canvasHeight)
{
//Get the background image first.
//Call the base.
// Draw them into one and return back.
}
}
Probablly I am misunderstanding something.It would be great if we can get into some concrete example.
Any more questions just feel free to let me know.
Thanks.
Yale
Hey, Yale! How do I make sure the raster image scales identically to the base image, which is a RasterImageLayer? When the map is panned, the RasterImageLayer automatically pans, so how do I make sure my image pans to the same degree? Do i need to associate my image with the same world file?
Gregory,
Thanks for your response.
As you already thought, the raster image should associate with some world file. This is the same logic when you load some raster image like ecw , tif etc, we must know its location by analyzing its world file. So probably you may need to do in the same way.
Any more questions just feel free to let me know.
Thanks.
Yale