首页 / 浏览问题 / 云GIS / 问题详情
怎样把geometry转换为一个面数据
209EXP 2019年04月03日

我使用的iclient8c :

我现在拥有的geometry数据是通过

var  geometry =new SuperMap.Format.GeoJSON().read(response.data.result,'Geometry')

转换而来的,现在希望把该geometry数据转换成面数据在地图上显示出来,应该怎样操作呢??

2 个回答

你好,可以透过构造矢量数据的方式,将几何对象添加到地图上 
Feature = new SuperMap.Feature.Vector(geometry,{属性});
 vectorLayer.addFeatures(Feature);map.addLayer(vectorLayer);具体参考:

http://iclient.supermap.io/examples/classic/editor.html#overlay_vectorLayerData

3,352EXP 2019年04月04日

您好,您传进来的geometry是什么类型的数据?如果是点数据的话就通过点的坐标构成面,http://iclient.supermap.io/libs/iclient8c/apidoc/files/SuperMap/Geometry/Polygon-js.html

如果是线的话就遍历线的节点然后组成面。如果这个geometry对象本来就是面的话那他传进来也是一个面类型的对象

5,668EXP 2019年04月04日
...