0
votes

On Bing Maps v8 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.

1

1 Answers

0
votes

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.