Tile Layer
Represents a layer that renders data from a tile-based data source. This is the base class for all tile-based layers and is not intended to be used directly.
Inheritors
Constructors
Types
Holds the internal DataQuality-to-scale-factor lookup used to compute dataQualityMult.
Listener for per-layer lifecycle/data events dispatched via addTileLayerEventListener.
Event types this layer can notify TileLayerEventListeners about via triggerEvent.
Properties
Tile coordinates already queued for download by requestVisibleTiles this session.
The most recently computed tile bounds for this layer's viewport.
Scale factor derived from quality via the internal DataQuality lookup table.
Coroutine scope used for this layer's background tile-download and prep work.
Optional ISO alpha-2 for COUNTRY base masks.
GLES stencil base mask kind for this layer (LAND/WATER/TRANSPORTATION/COUNTRY).
When true, glStencilMaskKind runs first (marine clip), then line-only stencilLayerMask layers are intersected on land (highways on land, not oceans).
Unique identifier for this layer within the map, used to look it up (e.g. via MapController).
Unimplemented on TileLayer.
Whether this layer needs to be redrawn; set via setNeedsUpdate.
Tile bounds computed prior to the current currentTileBounds.
The per-frame render state (paint style, renderables, elapsed time, zoom) passed to tileLayerRenderer.
The map controller this layer is attached to; set by onAdd when the layer is added to the map.
The paint/style configuration used to render this layer's data.
Tile bounds computed by the most recent requestVisibleTiles call, retained for later reference.
Data quality/resolution to request and render tiles at. Defaults to DataQuality.exact.
Unimplemented on TileLayer; the actual GL renderer used is tileLayerRenderer, a more specific TileLayerRenderer type.
The tile data source this layer downloads and renders tiles from.
Handlers registered via MapLayer.addSourceEventHandler to react to this layer's data-source events.
Optional custom multi-layer stencil mask (JS-style mask.layerIds).
Whether the tile bounds have changed since they were last checked.
The GL renderer that builds and draws this layer's tile geometry each frame.
HTTP request options (method, headers, reload/pending behavior, radar flag, etc.) used for this layer's tile downloads.
The time series associated with this layer, if any.
This layer's time-series animation configuration (mode, clamp, valid date range, interval count, etc.).
Whether this layer is currently waiting on a tile download to complete.
Whether this layer was waiting on a tile download as of the previous check.
Offset applied to the map's zoom level when computing which tile z/x/y to request and draw for this layer.
Functions
Registers listener to receive this layer's TileLayerEventType events. No-op if already registered.
Returns the time series data provider to use for animating the layer, if any.
Returns the current tile-index bounds (zoom/left/right/top/bottom) covering this layer's visible viewport, recomputing from bounds only when the render bounds are dirty or the zoom tier has changed since the last call.
Used in TileTimeSeriesDataProvider. Needs testing
Recieves LatLonBounds and zoom level
Not yet implemented on TileLayer; simple no-context registration is not used by this layer.
Attaches this layer to controller, wires up its GL renderer, and starts observing the timeline's play/pause state.
Not yet implemented on TileLayer; this render-context/owning-layer overload is used by renderer classes instead.
Notifies tileLayerRenderer that the layer was hidden and marks it dirty so it updates accordingly.
Called once a camera movement settles. Re-syncs bounds, and either re-binds already-resident tiles (when a full-range playback load is held resident and the timeline isn't playing) or requests visible tiles for the settled viewport, skipping the request while playback is already handling a coalesced refresh.
No-op on TileLayer; this layer does not need to react to the start of a camera move.
Like onMove, but always calls requestVisibleTiles for the new bounds, without the playback/zoom-tier gating onMove applies to limit download churn during timeline playback.
Called when the data source's metadata has been loaded.
Notifies tileLayerRenderer that the layer became visible and marks it dirty so it redraws.
Same viewport and coord selection as requestVisibleTiles, but only counts how many new encoded (coord×time) pairs would be queued — no HTTP, no cache or pending-list mutation. Summed across layers in MapController.refreshVisibleLayers to set a fixed download % denominator.
Refreshes layerRenderContext's renderables/paint style for this frame, then delegates to tileLayerRenderer.
Refreshes the layer by re-rendering it. If a complete refresh is needed including triggering the associated data source to reload, then pass an argument of true when calling the method. Otherwise, existing cached data will be used when the layer is re-rendered.
Unregisters a previously added TileLayerEventListener; no-op if not registered.
Marks this layer dirty so it redraws on the next frame, propagates the request to tileLayerRenderer, and asks mapController to redraw. Does nothing if the layer is currently hidden, unless force is true.