Svelte Maplibre

API / Layers

FillLayer

Add a MapLibre fill layer to the map. It shows polygon features as filled areas.

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

Set manageHoverState to set the hover feature state on the feature under the mouse. Bind to hovered to get that feature.

import { FillLayer } from 'svelte-maplibre';

Generic parameters: FEATURE extends Feature = Feature

Examples

Props

  • paint required FillLayerSpecification["paint"]
  • layout FillLayerSpecification["layout"]

Inherited from CommonLayerProps

Source: src/lib/FillLayer.svelte