[Bug] zoom value causing type warning when using Amazon Location Service map
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- aws, react, typescript
Línea de trabajo
Empieza por el manejo de zoom de initialViewState del componente Map y un estilo de mapa de Amazon Location Service, y después sigue las entradas de la pila loadTile y evaluate indicadas. Reproduce las advertencias de tipo con un valor zoom numérico y verifica que las advertencias ya no se produzcan mientras zoom siga establecido.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 8.5k
- Forks
- 1.3k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de visgl/react-map-gl
-
DEFAULT_SETTINGS.maxBounds in @vis.gl/react-maplibre has 360° longitude span, triggers maplibre-gl-js#6148 crash via _updateSettings fallbackQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
visgl/react-map-gl#2591 · 2 comentarios ·
-
[Bug] Mapbox geocoder example crashes: "i is not a function"Posiblemente ocupada @yuiseki la tomó hace 20 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
visgl/react-map-gl#2628 ·
-
[Bug] Scroll zoom stops short of maxZoom in controlled mode with MapLibrePosiblemente ocupada @sviat-barbutsa la tomó hace 33 días. Abiertobug
Dificultad 3/5 Medio día Aptitud para principiantes 74/100
visgl/react-map-gl#2626 ·
-
[Bug] reuseMaps: Mapbox.reuse() infinite-loops (tab freeze) when the recycled map's container is the mount containerPosiblemente ocupada @mikeyfarina la tomó hace 82 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
visgl/react-map-gl#2613 ·
-
feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
visgl/react-map-gl#2603 · 1 reacción ·
Todos los issues de visgl/react-map-gl
Issues similares
-
accessibility area:ci ci-test level:low priority:high type:test
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
skytuhua-org/Gen-V1#3132 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
drmrd/vernacular#1238 ·
Los mantenedores suelen responder en 1 día
-
question
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
enhancement migration-prioritized
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Hudson-Pufferfish/local-party-console#136 ·
Los mantenedores suelen responder en 1 día
-
priority:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día