How to manage layer ordering in Virtual Earth

I have a mapping application that needs to draw a path and then display icons on top of the path. I cannot find a way to control the order of the virtual layers of the earth, except for the order in which they are added.

Does anyone know how to change the z index of the layers of the Earth’s virtual surface or force the layer to the front?

+3
source share
2 answers

I think the easiest way is to iterate over the shapes in your VEShapeLayer and use the VEShape.SetZIndex method .

+2
source

If you are using jQuery, you can use the following

        $('#' + yourlayer.iid).children(".VEAPI_Pushpin").css('zIndex', 2000);

... remember that the default zIndex for VEShape is 1000

+2
source

Source: https://habr.com/ru/post/1696562/


All Articles