Overview
RasterDemSource is a map content source that supplies raster DEM (Digital Elevation Model) tiles to be shown on the map. This source type is typically used with HillshadeLayer to display terrain elevation data.Import
Basic Usage
Using Custom DEM Tiles
Props
A string that uniquely identifies the source.Default:
Mapbox.StyleSource.DefaultSourceIDThe id refers to an existing source in the style. Does not create a new source.
A URL to a TileJSON configuration file describing the source’s contents and other metadata.Example:
"mapbox://mapbox.mapbox-terrain-dem-v1"An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.Example:
["https://example.com/raster-tiles/{z}/{x}/{y}.png"]An unsigned integer that specifies the minimum zoom level at which to display tiles from the source. The value should be between 0 and 22, inclusive, and less than
maxZoomLevel, if specified.Default: 0An unsigned integer that specifies the maximum zoom level at which to display tiles from the source. The value should be between 0 and 22, inclusive, and greater than
minZoomLevel, if specified.Default: 22Size of the map tiles. Mapbox URLs default to 256, all others default to 512.
Child layer components (typically HillshadeLayer) that will use this source.
Methods
RasterDemSource inherits methods from AbstractSource. Use a ref to access these methods.Related Components
- RasterSource - For raster image tiles
- RasterArraySource - For particle animations
- HillshadeLayer - Used to render DEM data as hillshading
- Terrain - For 3D terrain visualization