我的 OpenLayers 地图有一个问题。当我单击地图上的标记时,它将显示弹出窗口,但在此弹出窗口上方仍然可见其他标记。
如何以正确的方式做到这一点?
fromProjection = new OpenLayers.Projection("EPSG:4326");
toProjection = new OpenLayers.Projection("EPSG:900913");
markers = new OpenLayers.Layer.Markers( "Markers" );
markers.events.register('mouseover', markers, function(evt) {
popup = new OpenLayers.Popup.FramedCloud("Popup",
new OpenLayers.LonLat(Tlon,Tlat).transform( fromProjection, toProjection),
null,
'<span style="z-index:99999;background:red;">sdf</span>',
null,
false);
map.addPopup(popup);
});
markers.events.register('mouseout', markers, function(evt) {popup.hide();});
map.addLayer(markers);
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(Tlon,Tlat).transform( fromProjection, toProjection),icon));