mapbox/mapbox-gl-js

Fitbounds with center option not doing expected thing

开放

#11,337 创建于 2021年12月10日

 (7 条评论) (2 个反应) (0 位负责人)JavaScript (2,203 个派生)batch import
good first issue

仓库指标

星标
 (10,532 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南