arcgis api for javascript如何根据经纬度进行标注,类似百度地图的Marker标注功能,代码越简单详细越好,谢谢各位了

已邀请:

gishome - GIS之家,我们的团队,具备丰富的webgis项目开发经验以及开源GIS项目经验(openlayer+geoserver、三维开源GIS cesium.js);GIS之家知乎专栏:https://zhuanlan.zhihu.com/gishome

赞同来自:

var symbol = new esri.symbol.PictureMarkerSymbol(getRootPath() + "content/images/ems/WZCBD.png", 24, 24);//图片设置
//设置气泡窗口内容
var title = "测试";
var htmlstr = "测试内容";
var attr = { "title": title, "content": htmlstr};
var pt = new esri.geometry.Point(111.456,23.456,map.spatialReference);
var graphic = new esri.Graphic(pt, symbol, attr);
ems.resource.graphicslayer.add(graphic);
//显示气泡窗口
ems.resource.map.centerAt(pt);
ems.resource.map.infoWindow.resize(420, 650);
ems.resource.map.infoWindow.show(pt);

效果图:

QQ截图20160930145936.png

 

要回复问题请先登录注册