superGIS图标点击和隐藏弹出框

superGIS:
//图标点击事件
function openInfoWin() {
mo++;
closeInfoWin(mo);
var marker = this;
var lonlat = marker.getLonLat();
var contentHTML = “

地点详细 信息
”;
contentHTML += “
” + marker.sm_capital + “
”;
var size = new SuperMap.Size(0, 33);
var offset = new SuperMap.Pixel(0, -size.h);
var icon = new SuperMap.Icon("/Content/Map/DT/SuperMap/imag/marker.png", size, offset);
var popup = new SuperMap.Popup.FramedCloud(“popwin”,
new SuperMap.LonLat(lonlat.lon, lonlat.lat), null, contentHTML, icon, true);
infowin = popup;
map.addPopup(popup);
}
//隐藏弹出框
function closeInfoWin(mo) {
if (mo > 1) {
try {
infowin.hide();
infowin.destroy();
}
catch (e) { }
}
}

猜你喜欢

转载自blog.csdn.net/qq_43184550/article/details/88887642