首页 > 解决方案 > GUIDE4YOU - 如何添加 ArcGIS REST 要素服务图层

问题描述

我想知道 Guide4You 是否支持添加 ArcGIS REST 要素服务图层?

例如官方的 Openlayers 示例:

https://openlayers.org/en/latest/examples/vector-esri.html

我希望有人可以帮助我!

亲切的问候,

山姆

标签: openlayersopenlayers-5guide4you

解决方案


您可以尝试在层配置中添加一个空的特征源,然后将源替换为 openlayers 示例中提供的代码。

空层的layerconfig:

{
  "id": "someId",
  "title": "someTitle",
  "type": "Intern",
  "source": {}
}

然后只需获取图层map.getLayerGroup().getLayerById("someId")并替换源


推荐阅读