[Bug] zoom value causing type warning when using Amazon Location Service map
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- aws, react, typescript
Hướng nghiên cứu
Bắt đầu với việc xử lý zoom của initialViewState trong component Map và một kiểu bản đồ của Amazon Location Service, sau đó theo dõi các mục stack loadTile và evaluate được báo cáo. Tái hiện các cảnh báo kiểu bằng một giá trị zoom dạng số và xác minh rằng các cảnh báo không còn xảy ra trong khi zoom vẫn được thiết lập.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When I use the maplibre Map with Amazon Location Service as the tile provider I'm getting some type warnings, when passing zoom to initialViewState:
Expected value to be of type number, but found string instead.
import { Map, } from "react-map-gl/maplibre";
...
return (
<Map
initialViewState={{
longitude: longitude,
latitude: latitude,
zoom: 14,
}}
mapStyle={`https://maps.geo.eu-central-1.amazonaws.com/v2/styles/Standard/descriptor?key=${amazonApiKey}&color-scheme=Light`}
attributionControl={false}
style={{ width: "100%", height: "100%" }}
onLoad={() => setLoading(false)}
onError={(e) => {
console.error("Error loading map:", e);
setError(true);
}}
/>
)
I noticed when I use remove the zoom param or set it to undefined the warning goes away.
Expected Behavior
No type warnings should be happening when passing the zoom property.
Steps to Reproduce
Can't because I don't want to share a amazon location service api key, but using Amazon as the tile provider and then passing the zoom property to the initialViewState will show the warnings all over console.
Environment
- Framework version: "react-map-gl": "^8.0.4",
- Map library: "maplibre-gl": "^5.5.0",
- Browser: Chrome Version 137.0.7151.55 (Official Build) (arm64)
- OS: Running in Docker Container (node:20-alpine - Linux)
Logs
Stack in the console after (Expected value to be of type number, but found null instead.)
| evaluate | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
-- | -- | -- | --
| filter | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| populate | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| (anonymous) | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| (anonymous) | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| e | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| parse | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| (anonymous) | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| a | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| Promise.then | |
| l | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| (anonymous) | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| e | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| loadTile | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| (anonymous) | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| (anonymous) | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| (anonymous) | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| e | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| processTask | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| process | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| (anonymous) | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
| MessageChannel._channel.port2.onmessage | @ | 1f28c7d8-fa56-4e41-85f9-18854632164e:1
- 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ự
-
combobox: highlighted item never scrolls into view when there's no content part (Ark Command)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
bug P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày