标签:arcgis 地图 js
//地图定位2 x,y--by zy
function gotoMap(x, y, name, content, dizhi) {
//清除上一次显示
myMap.graphics.clear();
var pt = new esri.geometry.Point([x, y]);
var pictureMarkerSymbol = new esri.symbol.PictureMarkerSymbol("/img/DW.png", 20, 20);
var g = new esri.Graphic(pt, pictureMarkerSymbol);
myMap.graphics.add(g);
var extent = new esri.geometry.Extent(x, y, x, y, new esri.SpatialReference({ wkid: 4326 }));
myMap.infoWindow.setTitle(name)
myMap.infoWindow.setContent("" + content + "<br/>" + "" + dizhi);
myMap.infoWindow.show(pt);
myMap.setExtent(extent);
}
本文出自 “技术人生” 博客,请务必保留此出处http://zhaoyingyatou.blog.51cto.com/7151735/1790225
标签:arcgis 地图 js
原文地址:http://zhaoyingyatou.blog.51cto.com/7151735/1790225