Type Signatures
These are the type signatures used in solidjs-maplibre-gl
Styling
Section titled “Styling”StyleSpecification
Section titled “StyleSpecification”An object conforming to the Maplibre Style Specification.
SkySpecification
Section titled “SkySpecification”An object conforming to the Sky Style Specification.
LightSpecification
Section titled “LightSpecification”An object conforming to the Light Style Specification.
TerrainSpecification
Section titled “TerrainSpecification”An object conforming to the Terrain Style Specification.
ProjectionSpecification
Section titled “ProjectionSpecification”An object conforming to the Projection Style Specification.
BackgroundLayerSpecification
Section titled “BackgroundLayerSpecification”A JSON object that defines a background
layer according to the Maplibre Style Specification.
CircleLayerSpecification
Section titled “CircleLayerSpecification”A JSON object that defines a circle
layer according to the Maplibre Style Specification.
FillExtrusionLayerSpecification
Section titled “FillExtrusionLayerSpecification”A JSON object that defines a fill-extrusion
layer according to the Maplibre Style Specification.
FillLayerSpecification
Section titled “FillLayerSpecification”A JSON object that defines a fill
layer according to the Maplibre Style Specification.
HeatmapLayerSpecification
Section titled “HeatmapLayerSpecification”A JSON object that defines a heatmap
layer according to the Maplibre Style Specification.
HillshadeLayerSpecification
Section titled “HillshadeLayerSpecification”A JSON object that defines a hillshade
layer according to the Maplibre Style Specification.
LineLayerSpecification
Section titled “LineLayerSpecification”A JSON object that defines a line
layer according to the Maplibre Style Specification.
RasterLayerSpecification
Section titled “RasterLayerSpecification”A JSON object that defines a raster
layer according to the Maplibre Style Specification.
SymbolLayerSpecification
Section titled “SymbolLayerSpecification”A JSON object that defines a symbol
layer according to the Maplibre Style Specification.
GeoJSONSourceSpecification
Section titled “GeoJSONSourceSpecification”A JSON object that defines a geojson
source according to the Maplibre Style Specification.
VideoSourceSpecification
Section titled “VideoSourceSpecification”A JSON object that defines a video
source according to the Maplibre Style Specification.
ImageSourceSpecification
Section titled “ImageSourceSpecification”A JSON object that defines a image
source according to the Maplibre Style Specification.
VectorSourceSpecification
Section titled “VectorSourceSpecification”A JSON object that defines a vector
source according to the Maplibre Style Specification.
RasterSourceSpecification
Section titled “RasterSourceSpecification”A JSON object that defines a raster
source according to the Maplibre Style Specification.
RasterDEMSourceSpecification
Section titled “RasterDEMSourceSpecification”A JSON object that defines a raster-dem
source according to the Maplibre Style Specification.
CanvasSourceSpecification
Section titled “CanvasSourceSpecification”A JSON object that defines a canvas
source type. See CanvasSourceSpecification.
Configurations
Section titled “Configurations”ControlPosition
Section titled “ControlPosition”One of 'top-right'
, 'top-left'
, 'bottom-right'
and 'bottom-left'
.
PaddingOptions
Section titled “PaddingOptions”An object with the following fields:
left
: number - in pixels.top
: number - in pixels.right
: number - in pixels.bottom
: number - in pixels.
Data Types
Section titled “Data Types”LngLat
Section titled “LngLat”A Maplibre LngLat object.
LngLatLike
Section titled “LngLatLike”A Maplibre LngLatLike object.
LngLatBounds
Section titled “LngLatBounds”A Maplibre LngLatBounds object.
LngLatBoundsLike
Section titled “LngLatBoundsLike”A Maplibre LngLatBoundsLike object.
A Maplibre Point object.
PointLike
Section titled “PointLike”A Maplibre PointLike object.
MapGeoJSONFeature
Section titled “MapGeoJSONFeature”A GeoJSON feature that also contains the following library-specific fields:
layer
: Layersource
: stringsourceLayer
: stringstate
:{ [key: string]: any }
ViewState
Section titled “ViewState”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.
Events
Section titled “Events”MapEvent
Section titled “MapEvent”An object with the following fields:
MapLayerMouseEvent
Section titled “MapLayerMouseEvent”An object with the following fields:
type
: stringtarget
: MaporiginalEvent?
: MouseEventpoint
: PointlngLat
: LngLatpreventDefault
: () => voiddefaultPrevented
: booleanfeatures?
: MapGeoJSONFeature[]
MapWheelEvent
Section titled “MapWheelEvent”An object with the following fields:
type
: stringtarget
: MaporiginalEvent?
: WheelEventpreventDefault
: () => voiddefaultPrevented
: boolean
MapLayerTouchEvent
Section titled “MapLayerTouchEvent”An object with the following fields:
type
: stringtarget
: MaporiginalEvent?
: TouchEventpoint
: PointlngLat
: LngLatpoints
: Point[]lngLats
: LngLat[]preventDefault
: () => voiddefaultPrevented
: booleanfeatures?
: MapGeoJSONFeature[]
ViewStateChangeEvent
Section titled “ViewStateChangeEvent”An object with the following fields:
type
: string - Event typetarget
: MapviewState
: ViewState - the next view state that the camera wants to change to based on user input or transition.
MapBoxZoomEvent
Section titled “MapBoxZoomEvent”An object with the following fields:
type
: stringtarget
: MaporiginalEvent?
: MouseEventboxZoomBounds
: LngLatBounds
MapStyleDataEvent
Section titled “MapStyleDataEvent”An object with the following fields:
type
: stringtarget
: MapdataType
: ‘style’
MapSourceDataEvent
Section titled “MapSourceDataEvent”An object with the following fields:
type
: stringtarget
: MapdataType
: ‘source’isSourceLoaded
: booleansource
: stringsourceId
: stringsourceDataType
: ‘metadata’ | ‘content’tile
: anycoord
: Coordinate
See MapDataEvent.
ErrorEvent
Section titled “ErrorEvent”An object with the following fields:
GeolocateEvent
Section titled “GeolocateEvent”An object with the following fields:
type
: stringtarget
: GeolocateControl
GeolocateResultEvent
Section titled “GeolocateResultEvent”An object with the following fields:
type
: stringtarget
: GeolocateControlcoords
: GeolocationCoordinates - the current location.timestamp
: number - the time at which the location was retrieved.
GeolocateErrorEvent
Section titled “GeolocateErrorEvent”An object with the following fields:
type
: stringtarget
: GeolocateControlcode
: PERMISSION_DENIED | POSITION_UNAVAILABLE | TIMEOUT - see GeolocationPositionErrormessage
: 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.
MarkerEvent
Section titled “MarkerEvent”An object with the following fields:
type
: stringtarget
: Marker
MarkerDragEvent
Section titled “MarkerDragEvent”An object with the following fields:
PopupEvent
Section titled “PopupEvent”An object with the following fields:
type
: stringtarget
: Popup