polygon()

指定线环,创建Polygon Feature

var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });

参数

参数名 类型 描述
coordinates double[][][] 坐标串
properties Object 添加到Feature properties中的属性值

返回值

Feature <Polygon>

results matching ""

    No results matching ""