mapbox/mapbox-gl-js

Fitbounds with center option not doing expected thing

オープン

#11,337 opened on 2021/12/10

 (7 件のコメント) (2 件のリアクション) (0 人の担当者)JavaScript (2,203 件のフォーク)batch import
good first issue

Repository metrics

Stars
 (10,532 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド