首页 / 浏览问题 / 云GIS / 问题详情
点击事件获取地物ID
8EXP 2020年06月09日
请问使用openlayers,怎么通过点击事件获得已经发布数据服务地图的地物的值呢?

1个回答

您好,您的需求可以利用几何查询方式来实现。思路是使用interaction.draw交互控件,画point,绘制完成可以拿到该点的geometry,然后利用数据服务或者地图服务的几何查询方式来进行查询,可以参考范例https://iclient.supermap.io/examples/openlayers/editor.html#01_mapQueryByGeometry

https://iclient.supermap.io/examples/openlayers/editor.html#02_getFeatureByGeometry

3,352EXP 2020年06月09日
...