[Bug] getCenter() seems broken in Chrome on MacOs since 8.0 update

未关闭
#2,546 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
react, typescript
领域
frontend

调研方向

首先,在 macOS 上的 Chrome 中使用 [email protected] 重现报告的 getCenter() 序列:读取中心点,平移地图,然后再次读取。将结果与 Ubuntu 以及之前正常工作的 7.1.x 设置进行比较;当平移后 getCenter() 返回更新后的位置,或问题被缩小到一个已有文档说明的环境或集成原因时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

bug
Description

Previously we were using 7.1.x and map.getCenter() was working fine, but since we moved to 8.0.4 we have at least one person for whom getCenter() always returns the initial map position center, not the updated position after panning, etc...

Not 100% sure it's a Mac issue but the exact same code/branch still works fine on Ubuntu and they're both on Chrome so not sure what else could be the cause.

Expected Behavior

No response

Steps to Reproduce
  • Open map app on Chrome on MacOs
  • call map.getCenter()
  • pan camera somewhere else
  • call map.getCenter() again
  • same value is returned for getCenter both times
Environment
  • Framework version: [email protected]
  • Map library: I'm not sure, I did not set up this project, all I see is @mapbox/[email protected]
  • Browser: Chrome 136
  • OS: MacOS (newer, not sure exact version)
Logs

No response

主要语言
TypeScript
星标
8.5k
派生
1.3k
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

visgl/react-map-gl 的其他 Issue

查看 visgl/react-map-gl 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。