mapbox/mapbox-gl-js

Fitbounds with center option not doing expected thing

Open

#11.337 geöffnet am 10. Dez. 2021

Auf GitHub ansehen
 (7 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)JavaScript (2.203 Forks)batch import
good first issue

Repository-Metriken

Stars
 (10.532 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

mapbox-gl-js version:2.6.1

browser:Chrome

Steps to Trigger Behavior

1.create LngLatBounds as bounds 2 .use map.fitBounds and pass the center option to it

Link to Demonstration

check out this link for more info: https://jsbin.com/zodotod/edit?html,output

Expected Behavior

The bounds should be in the view and the center of the map should be the center option

Actual Behavior

Just flyTo the center

Contributor Guide