代码中更新了图层的数据,但是地图显示却没有更新,在拖动了地图后才会更新数据。
解决方法:在更新数据后刷新图层(或重新绘制图层)
featureLayer.refresh();
featureLayer.redraw();
问题聊天记录截图


参考api:
https://developers.arcgis.com/javascript/3/jsapi/featurelayer.html#redraw
其他人遇到的类似问题:
http://zhihu.esrichina.com.cn/question/15409
网友评论