none
Adding Polygons, Polylines, etc on top of image overlay RRS feed

  • Question

  • Is it possible to add Polygons, Polylines, and Pushpins on top of an image overlay? According to this post it is not possible, but I wanted to confirm that on this forum. Currently, all the shapes are added to the map correctly, but they are displayed beneath the image. Any help would be appreciated, thank you.
    Wednesday, January 3, 2018 4:07 PM

Answers

  • It depends on which API you are using. I'll assume the Bing Maps V8 web API is being used as that is main API used by developers. Pushpins, yes. Polygons and Polylines, you won't be able to using the Ground Overlay (or custom overlays such as the imager overlay sample) as these are rendered in a separate layer above the layer used to render the base maps/polygons/polylines. However, it is possible to extend the tile layer class and create a custom image overlay class which renders as a tile layer. Tile Layers are rendered in the same canvas as polygons and polylines and by default are rendered below them (you can use zIndex to make them render above, but that would defeat the purpose of using this method). Here is a code sample: http://bingmapsv8samples.azurewebsites.net/#Image%20Overlay%20Tile%20Layer

    [Blog] [twitter] [LinkedIn]


    Wednesday, January 3, 2018 7:13 PM

All replies

  • It depends on which API you are using. I'll assume the Bing Maps V8 web API is being used as that is main API used by developers. Pushpins, yes. Polygons and Polylines, you won't be able to using the Ground Overlay (or custom overlays such as the imager overlay sample) as these are rendered in a separate layer above the layer used to render the base maps/polygons/polylines. However, it is possible to extend the tile layer class and create a custom image overlay class which renders as a tile layer. Tile Layers are rendered in the same canvas as polygons and polylines and by default are rendered below them (you can use zIndex to make them render above, but that would defeat the purpose of using this method). Here is a code sample: http://bingmapsv8samples.azurewebsites.net/#Image%20Overlay%20Tile%20Layer

    [Blog] [twitter] [LinkedIn]


    Wednesday, January 3, 2018 7:13 PM
  • Thanks for the reply! This is exactly what I needed (I also need to add heat maps above an image). I appreciate your help.
    Thursday, January 4, 2018 7:58 PM