百度地图怎么让marker显示在GroundOverlay上面,解决可以追加分数!

如图上,圆形图标怎么显示在那条线上
2025-04-29 08:19:48
推荐回答(3个)
回答1:

先这样简单处理下吧,到目前还没有啥官方的解决方案,问题在于marker的z-index是400,groupoverly是500,覆盖不上去,可以改成一样的:
marker.Yc.parentNode.parentNode.style.zIndex = 500;

回答2:

var myIcon = new BMap.Icon(".js/sqjw/images/markers_blue.png", new
BMap.Size(23, 25), { }); var h = '
style="border: 0px solid red; height: 100%; width: 100%; text-align: center;">
'; h+='

名称:
名称

'; h+='

'; var point = new BMap.Point(shape[0],shape[1]); var marker = new
BMap.Marker(point,{icon: myIcon,title:'点击查看详情'});
window.pcsmap.addOverlay(marker); var
opts={width:130,height:100,title:'
style="color: #4D4D4D; text-align: left; font-size: 14px; font-weight: 600;"
href="wspcs/wspcslist" target="_blank">'+node.text+'

'}; var infoWindow = new BMap.InfoWindow(h,opts);
marker.addEventListener("click",function(){
window.pcsmap.openInfoWindow(infoWindow,point); });
window.pcsmap.openInfoWindow(infoWindow,point);
window.pcsmap.centerAndZoom(point, 15);

回答3:

建议使用 leaflet 百度地图的GroundOverlay覆盖好像是一直处于上面 前一段时间我也没有解决