Skip to content

Interface: BaseLayerOptions

Hierarchy

Table of contents

Properties

Properties

renderType

renderType: RenderType

渲染类型 目前支持三种类型: 0:普通 raster 瓦片渲染 1:气象数据的色斑图渲染 2:风等 vector 数据的粒子渲染

Inherited from

UserOptions.renderType

Defined in

gl-core/src/renderer/index.ts:34


renderFrom

Optional renderFrom: RenderFrom

指定渲染通道

Inherited from

UserOptions.renderFrom

Defined in

gl-core/src/renderer/index.ts:38


styleSpec

Optional styleSpec: Object

Type declaration

NameTypeDescription
fill-color?any[]-
opacity?number | any[]-
numParticles?number | any[]-
speedFactor?number | any[]-
fadeOpacity?number | any[]-
dropRate?number | any[]-
dropRateBump?number | any[]-
space?number | any[]arrow space
size?[number, number]arrow size

Inherited from

UserOptions.styleSpec

Defined in

gl-core/src/renderer/index.ts:39


displayRange

Optional displayRange: [number, number]

Inherited from

UserOptions.displayRange

Defined in

gl-core/src/renderer/index.ts:59


widthSegments

Optional widthSegments: number

Inherited from

UserOptions.widthSegments

Defined in

gl-core/src/renderer/index.ts:60


heightSegments

Optional heightSegments: number

Inherited from

UserOptions.heightSegments

Defined in

gl-core/src/renderer/index.ts:61


wireframe

Optional wireframe: boolean

Inherited from

UserOptions.wireframe

Defined in

gl-core/src/renderer/index.ts:62


picking

Optional picking: boolean

是否开启拾取

Inherited from

UserOptions.picking

Defined in

gl-core/src/renderer/index.ts:69


mask

Optional mask: Object

可以为任意 GeoJSON 数据

Type declaration

NameType
dataAttributes[]
typeMaskType

Inherited from

UserOptions.mask

Defined in

gl-core/src/renderer/index.ts:73


getViewTiles

getViewTiles: (data: any, renderType: RenderType) => TileID[]

获取当前视野内的瓦片

Type declaration

▸ (data, renderType): TileID[]

Parameters
NameType
dataany
renderTypeRenderType
Returns

TileID[]

Defined in

gl-core/src/renderer/index.ts:83


getGridTiles

getGridTiles: (source: SourceType) => TileID[]

这里我们 Mock 一个瓦片图层,用于获取视野内的所有可渲染瓦片,与getViewTiles不同的是 此方法不会限制层级,方便我们在大层级时也能合理采样

Type declaration

▸ (source): TileID[]

Parameters
NameType
sourceSourceType
Returns

TileID[]

Defined in

gl-core/src/renderer/index.ts:89


getTileProjSize

getTileProjSize: (z: number, tiles: TileID[]) => [number, number]

获取某层级下瓦片的投影宽高

Type declaration

▸ (z, tiles): [number, number]

Parameters
NameType
znumber
tilesTileID[]
Returns

[number, number]

Defined in

gl-core/src/renderer/index.ts:95


getPixelsToUnits

getPixelsToUnits: () => [number, number]

获取当前视图下像素和投影的转换关系

Type declaration

▸ (): [number, number]

Returns

[number, number]

Defined in

gl-core/src/renderer/index.ts:100


getPixelsToProjUnit

getPixelsToProjUnit: () => [number, number]

像素到投影坐标的转换关系

Type declaration

▸ (): [number, number]

Returns

[number, number]

Defined in

gl-core/src/renderer/index.ts:105


getZoom

Optional getZoom: () => number

Type declaration

▸ (): number

Returns

number

Defined in

gl-core/src/renderer/index.ts:107


getExtent

Optional getExtent: () => number[]

Type declaration

▸ (): number[]

Returns

number[]

Defined in

gl-core/src/renderer/index.ts:108


triggerRepaint

Optional triggerRepaint: () => void

Type declaration

▸ (): void

Returns

void

Defined in

gl-core/src/renderer/index.ts:109


flipY

Optional flipY: boolean

Overrides

UserOptions.flipY

Defined in

gl-core/src/renderer/index.ts:110


glScale

Optional glScale: () => number

Type declaration

▸ (): number

Returns

number

Defined in

gl-core/src/renderer/index.ts:112


zoomScale

Optional zoomScale: () => number

Type declaration

▸ (): number

Returns

number

Defined in

gl-core/src/renderer/index.ts:113


onInit

Optional onInit: (error: any, data: any) => void

Type declaration

▸ (error, data): void

Parameters
NameType
errorany
dataany
Returns

void

Defined in

gl-core/src/renderer/index.ts:114

Released under the MIT License.