abstract indoor~IndoorStretchFeature(vector, showBorder, mapUnit, options)

室内要素类。该类是所有室内要素的抽象类,可以被继承,但不能直接实例化,通过其子类实例化一个具体的室内要素对象。

Summary

Methods:
getBorderSymbol

获取边框样式

getLabel

获取注记文本

getLabelSymbol

获取注记样式

getLabelVisibility

获取注记的可见性

getType

返回要素的类型

setBorderSymbol

设置边框样式

setLabel

设置注记本文

setLabelSymbol

设置注记样式

setLabelVisibility

设置注记的可见性

Constructor

new abstract IndoorStretchFeature(vector, showBorder, mapUnit, options)

白模高度和颜色设置方式:在地理要素对象的属性对象上,携带白模的高度值和颜色值。高度属性命名是“height”,默认值是10-600,单位是米。
1、渲染模式为“single”(纯色)时,颜色属性命名为“surfaceColor”,默认值是hmap.style.Color(0, 211, 211, 0.7)。
2、渲染模式为“gradient”(渐变)时,颜色属性有两个,一个是底面颜色“baseColorGradient”,一个是顶面颜色“topColorGradient”
3、渲染模式为“texture”(纹理)时,纹理属性有两个,一个是侧面的纹理样式“surfaceStyle”,一个是顶面的纹理样式“topStyle”

Parameters:
Name Type Default Description
vector module:feature~Vector

地理要素对象。地理要素的几何图形可以是线(hmap.geom.Line), 多线(hmap.geom.MultiLine), 面(hmap.geom.Polygon), 多面(hmap.geom.MultiPolygon)的一种。

showBorder Boolean false

显示边界

mapUnit String degrees

地图单位,默认是degrees(废弃参数,将在下个版本删除)

options Object

白模选项

Name Type Description
surfaceModel String

渲染模式,有三个值single(纯色),gradient(渐变色),texture(纹理)

surfaceColor module:style~Color

纯色模式下的表面颜色

baseColorGradient module:style~Color

渐变色模式下的底面颜色

topColorGradient module:style~Color

渐变色模式下的顶面颜色

surfaceStyle module:style~TextureFill | style~Style

纹理模式下的侧面纹理

topStyle module:style~TextureFill | style~Style

纹理模式下的顶面纹理

borderStyle module:style~LineSymbol | style~Style

边框样式,目前仅支持设置线的宽度,实线或者虚线,其中虚线时dashRatio不支持

Example
let polygon = new hmap.geom.Polygon([lineRing])
let vector = new hmap.feature.Vector(polygon, {height: 100, surfaceColor: new hmap.style.Color(211, 0, 0, 1),
    topBorderColor: new hmap.style.Color(211, 0, 0, 1)})
let stretch = new hmap.model.Stretch(vector)

Methods

getBorderSymbol() → {module:style~LineSymbol}

获取边框样式

Returns:
module:style~LineSymbol -

边框样式

getLabel() → {String}

获取注记文本

Returns:
String -

注记文本

getLabelSymbol() → {module:style~TextSymbol}

获取注记样式

Returns:
module:style~TextSymbol -

注记样式

getLabelVisibility() → {Boolean}

获取注记的可见性

Returns:
Boolean -

注记的可见性

getType() → {String}

返回要素的类型

Returns:
String

setBorderSymbol(lineSymbol)

设置边框样式

Parameters:
Name Type Description
lineSymbol module:style~LineSymbol

边框样式

setLabel(label)

设置注记本文

Parameters:
Name Type Description
label String

注记文本

setLabelSymbol(labelSymbol)

设置注记样式

Parameters:
Name Type Description
labelSymbol TextSymbol

注记样式

setLabelVisibility(visible)

设置注记的可见性

Parameters:
Name Type Description
visible Boolean

是否可见,可见时为true,不可见为false