首页 / 浏览问题 / WebGIS / 问题详情
请问有超图api怎么获取地图中添加的图层
mm
3EXP 2020年10月10日
请问有超图api怎么获取地图中添加的图层,有没有类似arcgis api中findlayerbyid这种方法

1个回答

您好,您可以在iclient for leaflets api中查找L.supermap.layerInfoService 类,该类提供有getLayersInfo()方法来获取地图中的图层信息。如果您那边想做地图的子图层的显隐控制,可以查看https://blog.csdn.net/supermapsupport/article/details/83218687该博客

3,352EXP 2020年10月10日
好的 谢谢 我去尝试一下

您好,L.supermap.layerInfoService 也是需要输入url的, 不能直接通过map获取到任意的图层。

...