1. Area

1.1. 初始化 new Area(options)

区域面图层中的区域元素,该类型无法独立创建,只能通过区域面图层生成

Param Type Default Description
options Object

包含以下属性的对象:

options.landPrimitive CustomPolygonPrimitive

添加的面要素图元对象

options.layer LineLayer

面图层对象

options.id String

面要素唯一id

[options.featureType] FeatureType BOSGeo.FeatureType.AREA_POLYGON

面要素类型,目前主要支持两种FeatureType.AREA_POLYGON和FeatureType.AREA_CIRCLE

[options.material] CustomAreaMaterial BOSGeo.CustomAreaMaterial.ColorMaterial

面要素底部区域自定义材质对象

1.2. 属性

属性名 Type Default Description
featureType FeatureType BOSGeo.FeatureType.AREA_POLYGON

面要素类型,目前主要支持两种FeatureType.AREA_POLYGON和FeatureType.AREA_CIRCLE

id String

十六进制的颜色字符串

positionsWGS84 Array.<Number>

经纬度坐标

perimeter Number

周长

landMaterial CustomAreaMaterial BOSGeo.CustomAreaMaterial.ColorMaterial

面要素自定义材质对象

wallMaterial CustomAreaMaterial BOSGeo.CustomAreaMaterial.StripMaterial

墙体自定义材质对象

wallHeight Number 100

墙高,单位为米

circle Object

圆的基本信息,包含中心点center(包含经度纬度和高程的数组)和半径radius(单位为米)的对象

1.3. 方法

1.3.1. area.addWall(options)

添加区域四周的墙

Param Type Default Description
options Object

包含以下属性的对象:

[options.baseHeight] Number 0

墙角底部高程perPositionHeight为false时应用到每一个墙角;

[options.wallHeight] Number 100

墙体高度;

[options.wallMaterial] CustomAreaMaterial BOSGeo.CustomAreaMaterial.StripMaterial

墙体材质,(仅支持AreaMaterialType.COLOR | STRIPE | CHECKERBOARD | GRID | IMAGE)

[options.perPositionHeight] Boolean

所有墙角的高度是否一致

1.3.2. area.deleteWall()

删除墙

1.3.3. area.destroy()

销毁对象

版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2022 all right reserved,powered by Gitbook该文件修订时间: 2022-07-19 11:34:25

results matching ""

    No results matching ""