Overview
TheTiled2dMapLayerConfig interface allows you to configure custom tiled layers for different map tile services. This is essential when working with non-standard tile pyramids, custom coordinate systems, or specialized map services.
Tiled2dMapLayerConfig Interface
The configuration interface defines how the layer computes visible tiles and loads them:Creating a Custom Layer Config
Android Example
iOS Example
Configuration Parameters
Tiled2dMapZoomInfo
Controls how tiles are displayed at different zoom levels:| Parameter | Type | Description |
|---|---|---|
zoomLevelScaleFactor | float | Multiplier applied to the scale (e.g., 0.6667 for slightly larger tiles) |
numDrawPreviousLayers | int32 | How many lower-resolution layers to show while loading |
numDrawPreviousOrLaterTLayers | int32 | Temporal layers for time-series data |
adaptScaleToScreen | bool | Scale tiles based on WMTS ScaleDenominator and screen PPI |
maskTile | bool | Enable masking for tile boundaries |
underzoom | bool | Continue drawing when zoomed out beyond minimum |
overzoom | bool | Continue drawing when zoomed in beyond maximum |
Tiled2dMapZoomLevelInfo
Defines each zoom level in the tile pyramid:| Parameter | Type | Description |
|---|---|---|
zoom | double | Camera zoom value that triggers this level |
tileWidthLayerSystemUnits | float | Width of one tile in layer coordinate units |
numTilesX | int32 | Total tiles in X direction at this zoom |
numTilesY | int32 | Total tiles in Y direction at this zoom |
numTilesT | int32 | Temporal dimension (usually 1) |
zoomLevelIdentifier | int32 | Zoom parameter passed to getTileUrl() |
bounds | RectCoord | Valid bounds for tiles at this level |
Common Use Cases
Custom Tile Service
When using a tile service with non-standard URL patterns:Non-Standard Coordinate System
For regional maps with custom projections:Limited Zoom Range
For specialized maps that only work at certain zoom levels:WMTS Support
The SDK can automatically create layer configurations from WMTS capabilities:Best Practices
Zoom Level Configuration
Zoom Level Configuration
- Define zoom levels that match your tile service exactly
- Include appropriate overlap with
numDrawPreviousLayersfor smooth transitions - Use
adaptScaleToScreen: truefor consistent appearance across devices - Consider enabling
underzoomandoverzoomfor better UX at extreme zoom levels
Performance Optimization
Performance Optimization
- Limit
numDrawPreviousLayersto reduce overdraw (2-3 is usually sufficient) - Set appropriate bounds to avoid loading tiles outside your area of interest
- Use
zoomLevelScaleFactorto fine-tune tile loading behavior - Test with different network conditions to ensure smooth tile loading
Coordinate Systems
Coordinate Systems
- Ensure bounds match your coordinate system
- Convert coordinates correctly when mixing different projections
- Test boundary conditions at the edges of your valid area
- Document which coordinate system your layer uses
Related Topics
Styling
Customize colors, patterns, and visual properties
Touch Handlers
Customize gesture handling and interactions