arcgis js api4.0 气泡标注

怎么用arcgis js api4.0实现气泡标注?4.0以前的版本有infowindow,4.0以后没有了,应该怎么做?
已邀请:

goldenlimit - Major in MIS and minor in GIS, graduated from University of Alabama. GIS is not a simply tool but a way of exploring the unknow

赞同来自: LChelloBEST

你好,
根据Esri的JS4.2的文档,View.popup 替代了原先的InfoWindow
或者是用PopupTemplate 加载到某个layer上来定义显示的内容,这个是Popuptemplate的API reference:
https://developers.arcgis.com/ ... .html
 
官网上有很多sample,你可以到这里https://developers.arcgis.com/javascript/latest/sample-code/index.html
然后输入popup就能看到很多samples:
infowindow.JPG

 
这个是我从里面摘抄的一个小sample你可以参考下
https://jsbin.com/vimojukoha/edit?html,output
 

要回复问题请先登录注册