Placing a MapLabel on top of a Polygon in Google Maps V3

后端 未结 5 857
时光说笑
时光说笑 2020-12-14 19:29

I\'m trying to place a MapLabel on top of a Polygon in Google Maps V3. I\'ve tried to set the MapLabel zIndex to 2 and the Polygon zIndex to 1 without any luck. Isn\'t this

5条回答
  •  不知归路
    2020-12-14 19:59

    var maplabel = new MapLabel....  
    $(maplabel.getPanes().mapPane).css('z-index', maplabel.zIndex);
    

    jQuery made it pretty simple for me without changing maplabel.js I also found an alternate solution

    $(maplabel.getPanes().mapPane).addClass('map-pane');
    

    and then defining the z-index in a stylesheet

提交回复
热议问题