Last Updated: February 25, 2016
·
1.049K
· foilking

Bing Maps AJAX layering click events

A small issue in Bing Maps AJAX API (v7) is adding multiple layers with polygons having mouse down events. In IE8, adding another layer above one with polygons having mouse down events causes the mouse down event to not fire on the lower layers. Bing is currently working on a solution to this, but in the meantime, there is a one line fix to get the mouse down event working.

Directly after declaring your variable for the map, set the map mode to draw the shapes in a single layer:

map.getMode().setDrawShapesInSingleLayer(true)