Skip to content

Type Signatures

These are the type signatures used in solidjs-maplibre-gl


An object conforming to the Maplibre Style Specification.

An object conforming to the Sky Style Specification.

An object conforming to the Light Style Specification.

An object conforming to the Terrain Style Specification.

An object conforming to the Projection Style Specification.

A JSON object that defines a background layer according to the Maplibre Style Specification.

A JSON object that defines a circle layer according to the Maplibre Style Specification.

A JSON object that defines a fill-extrusion layer according to the Maplibre Style Specification.

A JSON object that defines a fill layer according to the Maplibre Style Specification.

A JSON object that defines a heatmap layer according to the Maplibre Style Specification.

A JSON object that defines a hillshade layer according to the Maplibre Style Specification.

A JSON object that defines a line layer according to the Maplibre Style Specification.

A JSON object that defines a raster layer according to the Maplibre Style Specification.

A JSON object that defines a symbol layer according to the Maplibre Style Specification.

A JSON object that defines a geojson source according to the Maplibre Style Specification.

A JSON object that defines a video source according to the Maplibre Style Specification.

A JSON object that defines a image source according to the Maplibre Style Specification.

A JSON object that defines a vector source according to the Maplibre Style Specification.

A JSON object that defines a raster source according to the Maplibre Style Specification.

A JSON object that defines a raster-dem source according to the Maplibre Style Specification.

A JSON object that defines a canvas source type. See CanvasSourceSpecification.


One of 'top-right', 'top-left', 'bottom-right' and 'bottom-left'.

An object with the following fields:

  • left: number - in pixels.
  • top: number - in pixels.
  • right: number - in pixels.
  • bottom: number - in pixels.

A Maplibre LngLat object.

A Maplibre LngLatLike object.

A Maplibre LngLatBounds object.

A Maplibre LngLatBoundsLike object.

A Maplibre Point object.

A Maplibre PointLike object.

A GeoJSON feature that also contains the following library-specific fields:

  • layer: Layer
  • source: string
  • sourceLayer: string
  • state: { [key: string]: any }

An object with the following fields:

  • longitude: number - The longitude of the map center.
  • latitude: number - The latitude of the map center.
  • zoom: number - The zoom level.
  • pitch: number - The pitch (tilt) of the map, in degrees.
  • bearing: number - The bearing (rotation) of the map, in degrees.

An object with the following fields:

  • type: string - Event type
  • target: Map
  • originalEvent?: Event

An object with the following fields:

An object with the following fields:

  • type: string
  • target: Map
  • originalEvent?: WheelEvent
  • preventDefault: () => void
  • defaultPrevented: boolean

An object with the following fields:

An object with the following fields:

  • type: string - Event type
  • target: Map
  • viewState: ViewState - the next view state that the camera wants to change to based on user input or transition.

An object with the following fields:

An object with the following fields:

  • type: string
  • target: Map
  • dataType: ‘style’

An object with the following fields:

  • type: string
  • target: Map
  • dataType: ‘source’
  • isSourceLoaded: boolean
  • source: string
  • sourceId: string
  • sourceDataType: ‘metadata’ | ‘content’
  • tile: any
  • coord: Coordinate

See MapDataEvent.

An object with the following fields:

  • type: ‘error’
  • target: Map
  • error: Error

An object with the following fields:

An object with the following fields:

An object with the following fields:

  • type: string
  • target: GeolocateControl
  • code: PERMISSION_DENIED | POSITION_UNAVAILABLE | TIMEOUT - see GeolocationPositionError
  • message: string - the details of the error. Specifications note that this is primarily intended for debugging use and not to be shown directly in a user interface.

An object with the following fields:

An object with the following fields:

  • type: string
  • target: Marker
  • lngLat: LngLat - the new location of the marker

An object with the following fields:

  • type: string
  • target: Popup