Js 10
Mapbox Map parameters and methods
new mapboxgl.Map({
container: "map",
style: "mapbox://styles/mapbox/streets-v11",
center: [12, 42,
zoom: 9,
});new mapboxgl.Map({
...
antialias: true,
bearing: 20, //initial degree rotation
bearingSnap: 45, //max degree rotation before map snap to normal
clickTolerance: 20, //the pixels that need to be swept to get a drag before being a click
cooperativeGestures: true, //the zoom will need the crtl button but doesn't stops double click to zoom
doubleClickZoom: false, //to disable double-click zoom
dragPan: false, //will disable the drag move map
dragRotate: false, //won't allow rotate nor pitch 3D
interactive: false, //will disable any movement or zoom
maxZoom, minZoom, maxPitch, minPitch: //for limits (max) or immediate(min)
pitchWithRotate: false //will disable pitch
})Querying features of Mapbox layers





Last updated