LeafletGlMapOptions
LeafletGlMapOptions =
object
Defined in: leaflet/map.ts:97
Map creation options. Compared to leaflet, several fields are omitted:
worldCopyJump: always truezoomAnimationThreshold: irrelevant, zoom is always animatedfadeAnimation: always false, settings doesn't seem to have any effect in MapLibrezoomAnimation: always true, animated zoom is non-issue in MapLibremarkerZoomAnimation
Properties
attributionControl?
optionalattributionControl:boolean
Defined in: leaflet/map.ts:179
Whether attribution is displayed.
center?
optionalcenter:LatLngExpression
Defined in: leaflet/map.ts:101
The initial center of the map.
closePopupOnClick?
optionalclosePopupOnClick:boolean
Defined in: leaflet/map.ts:164
Set it to false if you don't want popups to close when user clicks the map.
Default
displayDuringZoom?
optionaldisplayDuringZoom:boolean
Defined in: leaflet/map.ts:184
Optional setting to enable DOM-content being visibile (and updated) during zooming
doubleClickZoom?
optionaldoubleClickZoom:boolean
Defined in: leaflet/map.ts:205
Enable or disable double click zoom.
Default
dragging?
optionaldragging:boolean
Defined in: leaflet/map.ts:217
Enable or disable drag panning.
Default
forceWebGL1?
optionalforceWebGL1:boolean
Defined in: leaflet/map.ts:194
When true, WebGL1 will be used even when WebGL2 is available.
keyboard?
optionalkeyboard:boolean
Defined in: leaflet/map.ts:174
When true, allows the user to zoom and pan the map using the keyboard.
layers?
optionallayers:Layer[]
Defined in: leaflet/map.ts:125
Layers of the map.
maxBounds?
optionalmaxBounds:Util.MapBounds|null
Defined in: leaflet/map.ts:133
When this option is set, the map restricts the view to the given geographical bounds, bouncing the user back if the user tries to pan outside the view. To set the restriction dynamically, use LeafletGlMap.setMaxBounds method.
maxCanvasRatio?
optionalmaxCanvasRatio:number|null
Defined in: leaflet/map.ts:189
Max allowed pixel ratio for CanvasLayer instances. Set to undefined for unlimited pixel ratio.
maxZoom?
optionalmaxZoom:number|null
Defined in: leaflet/map.ts:120
Maximum zoom level of the map.
If not specified and at least one GridLayer or TileLayer is in the map,
the highest of their maxZoom options will be used instead.
minZoom?
optionalminZoom:number|null
Defined in: leaflet/map.ts:113
Minimum zoom level of the map.
If not specified and at least one GridLayer or TileLayer is in the map,
the lowest of their minZoom options will be used instead.
preferCanvas?
optionalpreferCanvas:boolean
Defined in: leaflet/map.ts:169
Whether to use canvas to render paths instead of SVG.
renderer?
optionalrenderer:RendererBase|null
Defined in: leaflet/map.ts:139
The default method for drawing vector layers on the map. SVGRenderer
or CanvasRenderer by default depending on browser support.
scrollWheelZoom?
optionalscrollWheelZoom:boolean|AroundCenterOptions
Defined in: leaflet/map.ts:211
Enable or disable scroll wheel zoom.
Default
touchZoom?
optionaltouchZoom:boolean|AroundCenterOptions
Defined in: leaflet/map.ts:223
Enable or disable touch zoom.
Default
zoom?
optionalzoom:number
Defined in: leaflet/map.ts:106
The initial zoom level of the map.
zoomControl?
optionalzoomControl:boolean
Defined in: leaflet/map.ts:199
Whether a zoom control is added to the map by default.
zoomDelta?
optionalzoomDelta:number
Defined in: leaflet/map.ts:158
Controls how much the map's zoom level will change after a
LeafletGlMap.zoomIn, LeafletGlMap.zoomOut, pressing +
or - on the keyboard, or using the zoom control.
Values smaller than 1 (e.g. 0.5) allow for greater granularity.
Default
zoomSnap?
optionalzoomSnap:number
Defined in: leaflet/map.ts:149
Forces the map's zoom level to always be a multiple of this, particularly
right after a LeafletGlMap.fitBounds or a pinch-zoom.
By default, the zoom level snaps to the nearest integer; lower values
(e.g. 0.5 or 0.1) allow for greater granularity. A value of 0
means the zoom level will not be snapped after LeafletGlMap.fitBounds or a pinch-zoom.