Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FeatureTextStyle

Hierarchy

Index

Constructors

Properties

获取文本左右对齐方式 start|end|left|center|right。默认是center

memberof

FeatureTextStyle

获取文字旋转角度

memberof

FeatureTextStyle

avoidCollison: FeatureBooleanFunc

是否避免遮盖,默认为false

memberof

IFeatureTextStyleOptions

backCircle?: FeatureBooleanFunc

获取文字背景色是否使用圆形

memberof

FeatureTextStyle

backColor?: FeatureColorFunc

获取文字背景色

memberof

FeatureTextStyle

backHeight?: FeatureNumberFunc

获取背景色的高度

memberof

FeatureTextStyle

获取文字背景色的留边。默认为[5,0]

memberof

FeatureTextStyle

backRoundRadius?: FeatureNumberFunc

获取文字圆角像素数。默认为6px

memberof

FeatureTextStyle

backRoundRect?: FeatureBooleanFunc

获取文字是否使用圆角矩形

memberof

FeatureTextStyle

backShadowBlur?: FeatureNumberFunc

背景色阴影模糊量。默认6

memberof

FeatureTextStyle

backShadowColor?: FeatureColorFunc

背景色阴影的颜色。默认没有阴影

memberof

FeatureTextStyle

backShadowOffset?: FeatureNumberArrayFunc

背景色阴影偏移量 [xoffset,yoffset]。默认[3,3]

memberof

FeatureTextStyle

backStrokeColor?: FeatureColorFunc

获取背景色描边颜色

memberof

FeatureTextStyle

backStrokeDashArray?: FeatureNumberArrayFunc

获取背景色描边线型。默认为正常线段。

memberof

FeatureTextStyle

backStrokeWidth?: FeatureNumberFunc

获取背景色描边粗细

memberof

FeatureTextStyle

backWidth?: FeatureNumberFunc

背景色的宽度,如果设定了该值则不根据字符串计算宽度,统一采用相同宽度

memberof

FeatureTextStyle

获取文本上下对齐方式 top|bottom|middle|alphabetic|hanging。默认是middle

memberof

FeatureTextStyle

collisionExtendSize: FeatureNumberArrayFunc

碰撞检测的扩展宽高,用于有背景色时的微调,默认[0,0]

获取文字颜色

memberof

FeatureTextStyle

获取文字内容

memberof

FeatureTextStyle

depthTest?: FeatureBooleanFunc

是否进行深度检测,默认是

memberof

FeatureTextStyle

眼坐标系的偏移量,单位米,仅支持Cesium,默认[0,0,0]

获取字体

memberof

FeatureTextStyle

forceImage?: FeatureBooleanFunc

是否强制使用图片方式渲染,如果是将会通过canvas先生成图片,然后将图片渲染到地图。可能会带来性能降低。 仅支持3D图层。

memberof

FeatureTextStyle

forceImageSize?: FeatureNumberArrayFunc

使用图片渲染文字时,图片画布的大小,默认是64*64

memberof

FeatureTextStyle

heightMode?: "none" | "relative" | "clamp"

高度模式。none表示绝对高度,relative表示相对于当前位置地表以上高度,clamp表示贴地。 默认为none。 仅支持3D

memberof

FeatureTextStyle

获取文字距离中心点的偏移量

memberof

FeatureTextStyle

shadowBlur?: FeatureNumberFunc

阴影模糊效果。默认6

memberof

FeatureTextStyle

shadowColor?: FeatureColorFunc

阴影的颜色。默认没有阴影

memberof

FeatureTextStyle

shadowOffset?: FeatureNumberArrayFunc

阴影的偏移量 [xoffset,yoffset]。默认[3,3]

memberof

FeatureTextStyle

strokeColor?: FeatureColorFunc

获取文字描边颜色

memberof

FeatureTextStyle

strokeWidth?: FeatureNumberFunc

获取文字描边宽度

memberof

FeatureTextStyle

获取文字是否可见

memberof

FeatureTextStyle

DefaultOptions: IFeatureTextStyleOptions = ...

默认配置项

static
memberof

FeatureTextStyle

Methods

  • clearCaches(): void
  • 根据指定的feature获取当前样式对应的实际值

    memberof

    FeatureBaseClass

    Parameters

    • sourceValue: any
    • cacheFirst: boolean = true

      默认优先从缓存中获取,如果缓存中没有找到,再进行更新。传入false进行强制更新。update方法被调用后会自动清空缓存。

    • Optional values: any[]

      如果有多个数值,可以以数组传入,需要样式本身支持多数值。目前格点样式的字符串和数值字段可以通过配置中最后增加|来设置要使用的值的索引号。

    Returns IFeatureTextStyleOptions

    {T}

  • isStyle(): boolean
  • 表名当前的类是否是样式相关类。该类永远返回true

    memberof

    StyleBaseClass

    Returns boolean

  • 对当前样式对象使用新的参数进行更新

    memberof

    StyleBaseClass

    Parameters

    Returns void

Generated using TypeDoc