Svelte Maplibre

API / Layers

RasterLayer

Add a MapLibre raster layer to the map. It shows raster tiles, such as from a RasterTileSource.

This is a thin wrapper around Layer with type set to raster. Place it inside a source component such as GeoJSON, or set the source prop.

import { RasterLayer } from 'svelte-maplibre';

Generic parameters: FEATURE extends Feature = Feature

Examples

Props

  • paint required RasterLayerSpecification["paint"]
  • layout RasterLayerSpecification["layout"]

Inherited from CommonLayerProps

Source: src/lib/RasterLayer.svelte