SymbolLayer<TData, TExtraProps>
Provides a layer for rendering MIL-STD-2525 and APP-6 symbols.
Extends
default<TData,TExtraProps&Required<_SymbolLayerProps<TData>>>
Type Parameters
TData
TData = unknown
TExtraProps
TExtraProps extends object = { }
Accessors
isComposite
Get Signature
get isComposite():
boolean
true if this layer renders other layers
Returns
boolean
Inherited from
IconLayer.isComposite
isDrawable
Get Signature
get isDrawable():
boolean
true if the layer renders to screen
Returns
boolean
Inherited from
IconLayer.isDrawable
isLoaded
Get Signature
get isLoaded():
boolean
Returns true if all async resources are loaded
Returns
boolean
Inherited from
IconLayer.isLoaded
root
Get Signature
get root():
Layer
Returns
Layer
Inherited from
IconLayer.root
wrapLongitude
Get Signature
get wrapLongitude():
boolean
Returns true if using shader-based WGS84 longitude wrapping
Returns
boolean
Inherited from
IconLayer.wrapLongitude
componentName
Get Signature
get
staticcomponentName():string
Returns
string
Inherited from
IconLayer.componentName
Constructors
Constructor
new SymbolLayer<
TData,TExtraProps>(...args):SymbolLayer<TData,TExtraProps>
Parameters
args
...Partial<SymbolLayerProps<TData>>[]
Returns
SymbolLayer<TData, TExtraProps>
Overrides
IconLayer<TData, TExtraProps & Required<_SymbolLayerProps<TData>>>.constructor
Methods
_disablePickingIndex()
protected_disablePickingIndex(objectIndex):void
Parameters
objectIndex
number
Returns
void
Inherited from
IconLayer._disablePickingIndex
_drawLayer()
_drawLayer(
__namedParameters):void
Parameters
__namedParameters
parameters
Parameters
renderPass
RenderPass
shaderModuleProps
any
uniforms
any
Returns
void
Inherited from
IconLayer._drawLayer
_finalize()
_finalize():
void
(Internal) Called by manager when layer is about to be disposed Note: not guaranteed to be called on application shutdown
Returns
void
Inherited from
IconLayer._finalize
_getAttributeManager()
protected_getAttributeManager():AttributeManager|null
Create new attribute manager
Returns
AttributeManager | null
Inherited from
IconLayer._getAttributeManager
_getModel()
protected_getModel():Model
Returns
Model
Inherited from
IconLayer._getModel
_initialize()
_initialize():
void
Returns
void
Inherited from
IconLayer._initialize
_postUpdate()
protected_postUpdate(updateParams,forceUpdate):void
Called after updateState to perform common tasks
Parameters
updateParams
UpdateParameters<Layer<TExtraProps & Required<_SymbolLayerProps<TData>> & Required<_IconLayerProps<TData>>>>
forceUpdate
boolean
Returns
void
Inherited from
IconLayer._postUpdate
_setModelAttributes()
protected_setModelAttributes(model,changedAttributes,bufferLayoutChanged?):void
Apply changed attributes to model
Parameters
model
Model
changedAttributes
bufferLayoutChanged?
boolean
Returns
void
Inherited from
IconLayer._setModelAttributes
_transferState()
_transferState(
oldLayer):void
(Internal) Called by layer manager to transfer state from an old layer
Parameters
oldLayer
Layer<TExtraProps & Required<_SymbolLayerProps<TData>> & Required<_IconLayerProps<TData>>>
Returns
void
Inherited from
IconLayer._transferState
_update()
_update():
void
(Internal) Called by layer manager when a new layer is added or an existing layer is matched with a new instance
Returns
void
Inherited from
IconLayer._update
_updateAttributes()
protected_updateAttributes():void
Recalculate any attributes if needed
Returns
void
Inherited from
IconLayer._updateAttributes
_updateAutoHighlight()
protected_updateAutoHighlight(info):void
Update picking module parameters to highlight the hovered object
Parameters
info
color
Uint8Array<ArrayBufferLike> | null
coordinate?
number[]
devicePixel?
[number, number]
index
number
layer
Layer<{ }> | null
object?
any
picked
boolean
pixel?
[number, number]
pixelRatio
number
sourceLayer?
Layer<{ }> | null
viewport?
Viewport
x
number
y
number
Returns
void
Inherited from
IconLayer._updateAutoHighlight
activateViewport()
activateViewport(
viewport):void
Called when this layer is rendered into the given viewport
Parameters
viewport
Viewport
Returns
void
Inherited from
IconLayer.activateViewport
calculateInstancePickingColors()
protectedcalculateInstancePickingColors(attribute,__namedParameters):void
Updater for the automatically populated instancePickingColors attribute
Parameters
attribute
Attribute
__namedParameters
numInstances
number
Returns
void
Inherited from
IconLayer.calculateInstancePickingColors
clone()
clone(
newProps):any
Parameters
newProps
Partial<PropsT>
Returns
any
Inherited from
IconLayer.clone
decodePickingColor()
decodePickingColor(
color):number
Parameters
color
any
Returns
number
Inherited from
IconLayer.decodePickingColor
disablePickingIndex()
disablePickingIndex(
objectIndex):void
(Internal) Sets the picking color at the specified index to null picking color. Used for multi-depth picking. This method may be overriden by layer implementations
Parameters
objectIndex
number
Returns
void
Inherited from
IconLayer.disablePickingIndex
draw()
draw(
__namedParameters):void
Parameters
__namedParameters
uniforms
any
Returns
void
Inherited from
IconLayer.draw
encodePickingColor()
encodePickingColor(
i,target?): [number,number,number]
Parameters
i
any
target?
number[]
Returns
[number, number, number]
Inherited from
IconLayer.encodePickingColor
finalizeState()
finalizeState(
context):void
Called once when layer is no longer matched and state will be discarded. Layers can destroy WebGL resources here.
Parameters
context
LayerContext
Returns
void
Inherited from
IconLayer.finalizeState
generateCacheKey()
protectedgenerateCacheKey(sidc,options):string
Generates a cache key for the given SIDC and symbol options.
Parameters
sidc
string
SIDC of the symbol
options
SymbolOptions
Options used to generate the symbol
Returns
string
String key for caching
generateIcon()
protectedgenerateIcon(data,info):object
Generates an icon using the provided SIDC and symbol options.
Parameters
data
TData
A point's data
info
AccessorContext<TData>
Contextual information about the point
Returns
object
DeckGL Icon Object
height
height:
number=size
id
id:
string=cacheKey
url
url:
string=cachedUrl
width
width:
number=size
getAttributeManager()
getAttributeManager():
AttributeManager|null
Returns the attribute manager of this layer
Returns
AttributeManager | null
Inherited from
IconLayer.getAttributeManager
getBounds()
getBounds(): [
number[],number[]] |null
Returns
[number[], number[]] | null
Inherited from
IconLayer.getBounds
getChangeFlags()
getChangeFlags():
ChangeFlags|undefined
Returns the current change flags
Returns
ChangeFlags | undefined
Inherited from
IconLayer.getChangeFlags
getCurrentLayer()
getCurrentLayer():
Layer<TExtraProps&Required<_SymbolLayerProps<TData>> &Required<_IconLayerProps<TData>>> |null
Returns the most recent layer that matched to this state (When reacting to an async event, this layer may no longer be the latest)
Returns
Layer<TExtraProps & Required<_SymbolLayerProps<TData>> & Required<_IconLayerProps<TData>>> | null
Inherited from
IconLayer.getCurrentLayer
getInstanceColorMode()
protectedgetInstanceColorMode(icon):number
Parameters
icon
string
Returns
number
Inherited from
IconLayer.getInstanceColorMode
getInstanceIconFrame()
protectedgetInstanceIconFrame(icon):number[]
Parameters
icon
string
Returns
number[]
Inherited from
IconLayer.getInstanceIconFrame
getInstanceOffset()
protectedgetInstanceOffset(icon):number[]
Parameters
icon
string
Returns
number[]
Inherited from
IconLayer.getInstanceOffset
getLoadOptions()
getLoadOptions():
any
Returns the default parse options for async props
Returns
any
Inherited from
IconLayer.getLoadOptions
getModels()
getModels():
Model[]
Returns an array of models used by this layer, can be overriden by layer subclass
Returns
Model[]
Inherited from
IconLayer.getModels
getNeedsRedraw()
getNeedsRedraw(
opts?):string|false
(Internal) Checks if this layer needs redraw
Parameters
opts?
clearRedrawFlags
boolean
Reset redraw flags to false after the check
Returns
string | false
Inherited from
IconLayer.getNeedsRedraw
getNumInstances()
getNumInstances():
number
Deduces number of instances. Intention is to support:
- Explicit setting of numInstances
- Auto-deduction for ES6 containers that define a size member
- Auto-deduction for Classic Arrays via the built-in length attribute
- Auto-deduction via arrays
Returns
number
Inherited from
IconLayer.getNumInstances
getPickingInfo()
getPickingInfo(
__namedParameters):object
Parameters
__namedParameters
GetPickingInfoParams
Returns
object
color
color:
Uint8Array<ArrayBufferLike> |null
coordinate?
optionalcoordinate:number[]
devicePixel?
optionaldevicePixel: [number,number]
index
index:
number
layer
layer:
Layer<{ }> |null
object?
optionalobject:any
picked
picked:
boolean
pixel?
optionalpixel: [number,number]
pixelRatio
pixelRatio:
number
sourceLayer?
optionalsourceLayer:Layer<{ }> |null
viewport?
optionalviewport:Viewport
x
x:
number
y
y:
number
Inherited from
IconLayer.getPickingInfo
getShaders()
getShaders():
any
Returns
any
Inherited from
IconLayer.getShaders
getStartIndices()
getStartIndices():
NumericArray|null
Buffer layout describes how many attribute values are packed for each data object The default (null) is one value each object. Some data formats (e.g. paths, polygons) have various length. Their buffer layout is in the form of [L0, L1, L2, ...]
Returns
NumericArray | null
Inherited from
IconLayer.getStartIndices
hasUniformTransition()
hasUniformTransition():
boolean
Checks if this layer has ongoing uniform transition
Returns
boolean
Inherited from
IconLayer.hasUniformTransition
initializeState()
initializeState():
void
Called once to set up the initial state. Layers can create WebGL resources here.
Returns
void
Inherited from
IconLayer.initializeState
invalidateAttribute()
protectedinvalidateAttribute(name?):void
Default implementation of attribute invalidation, can be redefined
Parameters
name?
string
Returns
void
Inherited from
IconLayer.invalidateAttribute
isPickable()
isPickable():
boolean
Returns
boolean
Deprecated
Returns true if the layer is visible in the picking pass
Inherited from
IconLayer.isPickable
needsUpdate()
needsUpdate():
boolean
(Internal) Checks if this layer needs a deep update
Returns
boolean
Inherited from
IconLayer.needsUpdate
nullPickingColor()
nullPickingColor():
number[]
Returns
number[]
Inherited from
IconLayer.nullPickingColor
onClick()
onClick(
info,pickingEvent):boolean
Parameters
info
color
Uint8Array<ArrayBufferLike> | null
coordinate?
number[]
devicePixel?
[number, number]
index
number
layer
Layer<{ }> | null
object?
any
picked
boolean
pixel?
[number, number]
pixelRatio
number
sourceLayer?
Layer<{ }> | null
viewport?
Viewport
x
number
y
number
pickingEvent
any
Returns
boolean
Inherited from
IconLayer.onClick
onHover()
onHover(
info,pickingEvent):boolean
Parameters
info
color
Uint8Array<ArrayBufferLike> | null
coordinate?
number[]
devicePixel?
[number, number]
index
number
layer
Layer<{ }> | null
object?
any
picked
boolean
pixel?
[number, number]
pixelRatio
number
sourceLayer?
Layer<{ }> | null
viewport?
Viewport
x
number
y
number
pickingEvent
any
Returns
boolean
Inherited from
IconLayer.onHover
project()
project(
xyz):number[]
Projects a point with current view state from the current layer's coordinate system to screen
Parameters
xyz
number[]
Returns
number[]
Inherited from
IconLayer.project
projectPosition()
projectPosition(
xyz,params?): [number,number,number]
Projects a point with current view state from the current layer's coordinate system to the world space
Parameters
xyz
number[]
params?
autoOffset?
boolean
Whether to apply offset mode automatically as does the project shader module.
Offset mode places the origin of the common space at the given viewport's center. It is used in some use cases
to improve precision in the vertex shader due to the fp32 float limitation.
Use autoOffset:false if the returned position should not be dependent on the current viewport.
Default true
fromCoordinateOrigin?
[number, number, number]
The coordinate origin that the supplied position is in. Default to the same as coordinateOrigin.
fromCoordinateSystem?
CoordinateSystem
The coordinate system that the supplied position is in. Default to the same as coordinateSystem.
viewport?
Viewport
The viewport to use
Returns
[number, number, number]
Inherited from
IconLayer.projectPosition
raiseError()
raiseError(
error,message):void
(Internal) Propagate an error event through the system
Parameters
error
Error
message
string
Returns
void
Inherited from
IconLayer.raiseError
restorePickingColors()
restorePickingColors():
void
(Internal) Re-enable all picking indices after multi-depth picking
Returns
void
Inherited from
IconLayer.restorePickingColors
setChangeFlags()
setChangeFlags(
flags):void
Dirty some change flags, will be handled by updateLayer
Parameters
flags
Partial<ChangeFlags>
Returns
void
Inherited from
IconLayer.setChangeFlags
setNeedsRedraw()
setNeedsRedraw():
void
Sets the redraw flag for this layer, will trigger a redraw next animation frame
Returns
void
Inherited from
IconLayer.setNeedsRedraw
setNeedsUpdate()
setNeedsUpdate():
void
Mark this layer as needs a deep update
Returns
void
Inherited from
IconLayer.setNeedsUpdate
setShaderModuleProps()
setShaderModuleProps(...
props):void
Update shader input parameters
Parameters
props
...[Partial<{[key: string]: Partial<Record<string, unknown> | undefined>; }>]
Returns
void
Inherited from
IconLayer.setShaderModuleProps
setState()
setState(
partialState):void
Updates selected state members and marks the layer for redraw
Parameters
partialState
any
Returns
void
Inherited from
IconLayer.setState
shouldUpdateState()
shouldUpdateState(
params):boolean
Controls if updateState should be called. By default returns true if any prop has changed
Parameters
params
UpdateParameters<Layer<TExtraProps & Required<_SymbolLayerProps<TData>> & Required<_IconLayerProps<TData>>>>
Returns
boolean
Inherited from
IconLayer.shouldUpdateState
toString()
toString():
string
Returns a string representation of an object.
Returns
string
Inherited from
IconLayer.toString
unproject()
unproject(
xy):number[]
Unprojects a screen pixel to the current view's default coordinate system
Note: this does not reverse project.
Parameters
xy
number[]
Returns
number[]
Inherited from
IconLayer.unproject
updateAttributes()
protectedupdateAttributes(changedAttributes):void
Send updated attributes to the WebGL model
Parameters
changedAttributes
Returns
void
Inherited from
IconLayer.updateAttributes
updateAutoHighlight()
updateAutoHighlight(
info):void
(Internal) Called by deck picker when the hovered object changes to update the auto highlight
Parameters
info
color
Uint8Array<ArrayBufferLike> | null
coordinate?
number[]
devicePixel?
[number, number]
index
number
layer
Layer<{ }> | null
object?
any
picked
boolean
pixel?
[number, number]
pixelRatio
number
sourceLayer?
Layer<{ }> | null
viewport?
Viewport
x
number
y
number
Returns
void
Inherited from
IconLayer.updateAutoHighlight
updateState()
updateState(
params):void
Default implementation, all attributes will be invalidated and updated when data changes
Parameters
params
UpdateParameters<SymbolLayer<TData, TExtraProps>>
Returns
void
Inherited from
IconLayer.updateState
use64bitPositions()
use64bitPositions():
boolean
Returns
boolean
Inherited from
IconLayer.use64bitPositions
validateProps()
validateProps():
void
(Internal) called by layer manager to perform extra props validation (in development only)
Returns
void
Inherited from
IconLayer.validateProps
Properties
context
context:
LayerContext
Inherited from
IconLayer.context
count
count:
number
Inherited from
IconLayer.count
defaultOptions
protecteddefaultOptions:SymbolOptions
Internal
The default symbol options to use when rendering symbols.
generationCache
protectedgenerationCache:Map<string,string>
Internal
Caches the results of the icon generation
Todo
Use LRU cache to limit memory usage.
id
id:
string
Inherited from
IconLayer.id
internalState
internalState:
LayerState<SymbolLayer<TData,TExtraProps>> |null
Inherited from
IconLayer.internalState
lifecycle
lifecycle:
Lifecycle
Inherited from
IconLayer.lifecycle
parent
parent:
Layer<{ }> |null
Inherited from
IconLayer.parent
props
props:
StatefulComponentProps<TExtraProps&Required<_SymbolLayerProps<TData>> &Required<_IconLayerProps<TData>> &Required<LayerProps>>
Inherited from
IconLayer.props
state
state:
object
iconManager
iconManager:
IconManager
model?
optionalmodel:Model
Inherited from
IconLayer.state
defaultProps
staticdefaultProps:DefaultProps<SymbolLayerProps<unknown>>
Overrides
IconLayer.defaultProps
layerName
staticlayerName:string='SymbolLayer'
Overrides
IconLayer.layerName