这一次的教程很简单就是我么map这个矢量集合来实现我们的属性值就是建立function然后让矢量集合中的每一个部分进行整个函数的遍历,这里我们可以选择求出矢量的中心点,当然也可以添加其它的东西。
centroid(maxError, proj)
Returns a feature containing the point at the center of the highest-dimension components of the geometry of a feature. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Arguments:
this:feature (Element):
Calculates the centroid of this feature's default geometry.
maxError (ErrorMargin, default: null):
The maximum amount of error tolerated when performing any necessary reprojection.
proj (Projection, default: null):