对点的操作:隐藏点和显示点
mainMapLayer.getGraphicArrCallBack(id,function(graphicArr){ for(var i=0;i<graphicArr.length;i++){ //显示点 graphicArr[i].setSymbol(new esri.symbol.PictureMarkerSymbol(root+"/resources/images/red.png", 5, 5)); //隐藏点 graphicArr[i].setSymbol(null); } mainMapLayer.map.getLayer(id).redraw(); });
地图放大和缩小事件绑定方法:
var mapExtentChange = mainMapLayer.map.on("extent-change", changeHandler); function changeHandler(evt){ }