[Bug] Map is distorted when reuseMaps is true
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- react, typescript
Hướng nghiên cứu
Bắt đầu với bản tái hiện CodeSandbox được liên kết bằng [email protected] và Map library 3.18.0; thêm token Mapbox bắt buộc và thực hiện theo đường dẫn unmount/remount của reuseMaps sau khi pan và zoom. So sánh việc hiển thị bản đồ trước và sau remount, sau đó xác minh rằng việc chuyển đổi lặp lại không còn làm biến dạng bản đồ hoặc ngăn các tile tải xuống.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
The map renders correctly on the initial load (see Image 1). However, the map becomes distorted or fails to load tiles properly (see Image 2) when the component is unmounted and remounted while the reuseMaps property is enabled. It appears as though the map container dimensions or tile coordinates are not being recalculated correctly upon re-insertion into the DOM.
The issue can be reproduced here (the mapbox token need to add): https://codesandbox.io/p/sandbox/reactjs-playground-forked-n5nfrk
Expected Behavior
The map must work well even after remount with reuseMap as true
Steps to Reproduce
- Load the map and perform pan (drag) and zoom actions.
- Click the "Toggle Map" button to unmount the component.
- Click the "Toggle Map" button again to remount the component.
- Observe the distorted map. (Note: If it doesn't happen immediately, repeat the steps 2-3 times, ensuring you interact with the map between toggles).
The issue can be reproduced here (the mapbox token need to add): https://codesandbox.io/p/sandbox/reactjs-playground-forked-n5nfrk
Environment
- Framework version: [email protected]
- Map library: 3.18.0
- Browser: Chrome
- OS: Mac
Logs
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 8.5k
- Fork
- 1.3k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của visgl/react-map-gl
-
DEFAULT_SETTINGS.maxBounds in @vis.gl/react-maplibre has 360° longitude span, triggers maplibre-gl-js#6148 crash via _updateSettings fallbackCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
visgl/react-map-gl#2591 · 2 bình luận ·
-
[Bug] Mapbox geocoder example crashes: "i is not a function"Có thể đã có người làm @yuiseki đã nhận 20 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
visgl/react-map-gl#2628 ·
-
[Bug] Scroll zoom stops short of maxZoom in controlled mode with MapLibreCó thể đã có người làm @sviat-barbutsa đã nhận 33 ngày trước. Đang mởbug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 74/100
visgl/react-map-gl#2626 ·
-
[Bug] reuseMaps: Mapbox.reuse() infinite-loops (tab freeze) when the recycled map's container is the mount containerCó thể đã có người làm @mikeyfarina đã nhận 82 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
visgl/react-map-gl#2613 ·
-
feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
visgl/react-map-gl#2603 · 1 reaction ·
Tất cả issue của visgl/react-map-gl
Issue tương tự
-
accessibility area:ci ci-test level:low priority:high type:test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 71/100
skytuhua-org/Gen-V1#3132 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
drmrd/vernacular#1238 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
enhancement migration-prioritized
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Hudson-Pufferfish/local-party-console#136 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày