首页 / 浏览问题 / 云GIS / 问题详情
能不能消除一条线的一部分?
23EXP 2020年08月25日
var line = new SuperMap.Geometry.LineString(points);
                
var line_feature = new SuperMap.Feature.Vector(line);
 vectorLayer.addFeatures(line_feature);

我通过多个点组成了一条线,那么我可不可以删除这条线的其中一部分呢?

不要用vectorLayer.removeAllFeatures()

1个回答

您好,您可以删除矢量图层中的对应feature。单个feature无法直接删除其中构造的geometry,您可以将其各节段的geometry构造成feature然后添加到矢量图层中,然后对矢量图层中的单个要素进行删除。
3,352EXP 2020年08月25日
...