Restrict Map Planning
To restrict the map move within an area:
Sample web page:
To restrict the map move within an area:
// init maplibre-gl map
const maplibreMap = new maplibregl.Map({
container: 'map'
});
// use maplibre setMaxBounds function
maplibreMap.setMaxBounds([[114.15867, 22.30276], [114.16503, 22.30729]]);Sample web page:

