Skip to content

raster_tile_source

Stable

Adds raster image tiles for a raster layer to draw.

Generated from the component's definition in the library, so it always matches the version this demo runs.

Attribute Type Default Description
id required string — Unique identifier for the source
map_id required string — ID of the map to attach to
url string nil TileJSON URL, or a pmtiles:// URL (see "PMTiles" in the module documentation) (either url or tiles must be provided)
tiles list nil List of tile URL templates (e.g., ["https://a.tile.com/{z}/{x}/{y}.png"])
tile_size integer nil Size of tiles in pixels (default: 512, common values: 256, 512)
min_zoom integer nil Minimum zoom level (default: 0)
max_zoom integer nil Maximum zoom level (default: 22)
attribution string nil Attribution text
bounds list nil Geographic bounds [west, south, east, north]
scheme string nil Tile scheme: "xyz" (default) or "tms"
tms boolean false true for tiles in the TMS scheme, the same as scheme="tms" (default: false). A scheme given too wins over it
volatile boolean false Whether data should be cached (default: false)
events any [] a list of event names, or :all