Interface: BaseLayerOptions ¶
Hierarchy ¶
↳
BaseLayerOptions
Table of contents ¶
Properties ¶
- renderType
- renderFrom
- styleSpec
- displayRange
- widthSegments
- heightSegments
- wireframe
- picking
- mask
- getViewTiles
- getGridTiles
- getTileProjSize
- getPixelsToUnits
- getPixelsToProjUnit
- getZoom
- getExtent
- triggerRepaint
- flipY
- glScale
- zoomScale
- onInit
Properties ¶
renderType ¶
• renderType: RenderType
渲染类型 目前支持三种类型: 0:普通 raster 瓦片渲染 1:气象数据的色斑图渲染 2:风等 vector 数据的粒子渲染
Inherited from ¶
Defined in ¶
gl-core/src/renderer/index.ts:34
renderFrom ¶
• Optional
renderFrom: RenderFrom
指定渲染通道
Inherited from ¶
Defined in ¶
gl-core/src/renderer/index.ts:38
styleSpec ¶
• Optional
styleSpec: Object
Type declaration ¶
Name | Type | Description |
---|---|---|
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 ¶
Defined in ¶
gl-core/src/renderer/index.ts:39
displayRange ¶
• Optional
displayRange: [number
, number
]
Inherited from ¶
Defined in ¶
gl-core/src/renderer/index.ts:59
widthSegments ¶
• Optional
widthSegments: number
Inherited from ¶
Defined in ¶
gl-core/src/renderer/index.ts:60
heightSegments ¶
• Optional
heightSegments: number
Inherited from ¶
Defined in ¶
gl-core/src/renderer/index.ts:61
wireframe ¶
• Optional
wireframe: boolean
Inherited from ¶
Defined in ¶
gl-core/src/renderer/index.ts:62
picking ¶
• Optional
picking: boolean
是否开启拾取
Inherited from ¶
Defined in ¶
gl-core/src/renderer/index.ts:69
mask ¶
• Optional
mask: Object
可以为任意 GeoJSON 数据
Type declaration ¶
Name | Type |
---|---|
data | Attributes [] |
type | MaskType |
Inherited from ¶
Defined in ¶
gl-core/src/renderer/index.ts:73
getViewTiles ¶
• getViewTiles: (data
: any
, renderType
: RenderType
) => TileID
[]
获取当前视野内的瓦片
Type declaration ¶
▸ (data
, renderType
): TileID
[]
Parameters ¶
Name | Type |
---|---|
data | any |
renderType | RenderType |
Returns ¶
TileID
[]
Defined in ¶
gl-core/src/renderer/index.ts:83
getGridTiles ¶
• getGridTiles: (source
: SourceType
) => TileID
[]
这里我们 Mock 一个瓦片图层,用于获取视野内的所有可渲染瓦片,与getViewTiles不同的是 此方法不会限制层级,方便我们在大层级时也能合理采样
Type declaration ¶
▸ (source
): TileID
[]
Parameters ¶
Name | Type |
---|---|
source | SourceType |
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 ¶
Name | Type |
---|---|
z | number |
tiles | TileID [] |
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 ¶
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 ¶
Name | Type |
---|---|
error | any |
data | any |
Returns ¶
void