Skip to content

PolygonFeature

PolygonFeature

多边形要素类

继承BaseFeature

Examples

javascript
const polygonFeature = new DiMap.PolygonFeature({
  geoData: [
    [
      [116.405467, 39.907761],
      [116.415467, 39.917761],
      [116.425467, 39.927761],
      [116.435467, 39.937761]
    ]
  ],
  fillColor: "#f60",
  fillOpacity: 1,
  fillOutlineColor: "#000",
  fillZIndex: 1
})
const polygonLayer = new DiMap.PolygonLayer()
polygonFeature.addToLayer(polygonLayer)
polygonLayer.addToMap(map)

constructor

Parameters

参数名必选类型描述
optsPolygonFeatureOptions多边形要素属性
userDataRecord<string, any>用户自定义数据,默认值为 {}

PolygonFeatureOptions

多边形要素属性

Properties

参数名必选类型描述
fillColorstring多边形填充颜色
fillOpacitynumber多边形填充透明度
fillOutlineColorstring多边形边框颜色
fillZIndexnumber优先级