On this page

Type Alias DiffOperationsMap

Operations that can be performed by the diff. Below are the operations and their arguments, the arguments should be aligned with the style methods in maplibre-gl-js.

type DiffOperationsMap = {
    addLayer: [LayerSpecification, string | null];
    addSource: [string, SourceSpecification];
    removeLayer: [string];
    removeSource: [string];
    setBearing: [number];
    setCenter: [number[]];
    setCenterAltitude: [number];
    setFilter: [string, unknown];
    setGeoJSONSourceData: [string, unknown];
    setGlobalState: [StateSpecification];
    setGlyphs: [string];
    setLayerProperty: [string, string, unknown];
    setLayerZoomRange: [string, number, number];
    setLayoutProperty: [string, string, unknown, string | null];
    setLight: [LightSpecification];
    setPaintProperty: [string, string, unknown, string | null];
    setPitch: [number];
    setProjection: [ProjectionSpecification];
    setRoll: [number];
    setSky: [SkySpecification];
    setSprite: [SpriteSpecification];
    setStyle: [StyleSpecification];
    setTerrain: [TerrainSpecification];
    setTransition: [TransitionSpecification];
    setZoom: [number];
}
Index

Properties

addLayer: [LayerSpecification, string | null]
addSource: [string, SourceSpecification]
removeLayer: [string]
removeSource: [string]
setBearing: [number]
setCenter: [number[]]
setCenterAltitude: [number]
setFilter: [string, unknown]
setGeoJSONSourceData: [string, unknown]
setGlobalState: [StateSpecification]
setGlyphs: [string]
setLayerProperty: [string, string, unknown]
setLayerZoomRange: [string, number, number]
setLayoutProperty: [string, string, unknown, string | null]
setLight: [LightSpecification]
setPaintProperty: [string, string, unknown, string | null]
setPitch: [number]
setProjection: [ProjectionSpecification]
setRoll: [number]
setSprite: [SpriteSpecification]
setStyle: [StyleSpecification]
setTerrain: [TerrainSpecification]
setTransition: [TransitionSpecification]
setZoom: [number]
Was this helpful?
SDK JS
Reference
DiffOperationsMap