Overview
RasterArraySource is a map content source that supplies raster array image tiles to be shown on the map. This source type is typically used for particle animations like wind or precipitation patterns with RasterParticleLayer.Import
Basic Usage
Using Tile URL Templates
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.
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. Defaults to 512.
Platform Note: This property is not supported on iOS due to SDK limitations. On iOS,
tileSize will be derived from the TileJSON when using url, or use the default value. If you need custom tile size on iOS, include it in your TileJSON response.An array containing the longitude and latitude of the southwest and northeast corners of the source’s bounding box in the following order:
[sw.lng, sw.lat, ne.lng, ne.lat].When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.Platform Note: This property is not supported on iOS due to SDK limitations. On iOS, bounds will be derived from the TileJSON when using
url. If you need custom bounds on iOS, include them in your TileJSON response.Child layer components (typically RasterParticleLayer) that will use this source.
Platform Limitations
Due to iOS SDK limitations, the following properties are only supported on Android:
tileSize- On iOS, this is derived from TileJSON or uses the defaultsourceBounds- On iOS, this is derived from TileJSON
url property.Methods
RasterArraySource inherits methods from AbstractSource. Use a ref to access these methods.Related Components
- RasterSource - For raster image tiles
- RasterDemSource - For elevation data
- RasterParticleLayer - Used to render particle animations