none
Draw a polygon (preferably rectangle) on Custom Overlays (Microsoft.Maps.CustomOverlay) RRS feed

  • Question

  • Is it possible to draw a Polygon (preferably rectangle) on Custom Overlay (Microsoft.Maps.CustomOverlay). 

    I have been able to render Images (as pushpins) on Custom Overlays using Canvas Layer example given in the link

    https://bingmapsv8samples.azurewebsites.net/#Canvas%20Layer

    I want to draw a rectangle on Top of this Canvas Layer.

    • Edited by Amit Dube Wednesday, November 15, 2017 5:15 AM
    Wednesday, November 15, 2017 5:13 AM

Answers

  • Polygon's are rendered within the base map canvas. As such changing the zIndex such that custom overlays are below polygons would result in the overlay being behind the base map and not visible. It is not possible to put custom overlays between the base map and polygons at this time. 

    That said, if you are using the drawing tools, it uses a separate canvas when drawing/editing which is above custom overlays. If you are simply drawing a polygon/rectangle and then doing a search with it, that would work, but the final polygon would end up behind the overlay as soon as you leave edit mode. 

    However, polygons should always be rendered behind pushpins This is standard practice in all mapping platforms.


    [Blog] [twitter] [LinkedIn]

    Wednesday, November 15, 2017 6:12 PM