[Bug] Map crashes on Android WebView
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- android, react, typescript
- Área
- frontend, mobile-dev
Línea de trabajo
Empieza inspeccionando index.tsx:85 y la lógica de useMapInstance() mostrada en el issue; después reproduce el problema con un Android WebView, 150+ Advanced Markers y zoom repetido. El objetivo se cumple cuando el mapa ya no recibe coordenadas no válidas ni se congela o se bloquea durante las actualizaciones de los marcadores y los cambios de centro.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
Hello Everyone,
Recently we moved to use react-google-maps library, and we are displaying around 120-200 Advanced Markers.
The logic is straightforward, we have an on-idle listener in the map -> we trigger a call to the backend -> backend respond with set of markers that we can use to create an Advanced Marker.
The Advanced Marker we create is an HTML component that might contain an svg with a text next to it and all wrapped inside a div tag
Once you zoom in and out multiple times and load the markers multiple times, randomly the map crashes and the whole webview crashes. in the console we see the following error:
setCenter: not a LatLng or LatLngLiteral with finite coordinates: in property lng: Infinity is not an accepted value
I saw similar logic in the component useMapInstance()
setTimeout(() => map.setCenter(map?.getCenter()!), 0);
So what it looks like is that the map is becoming undefined once we have the reuseMaps turned on but once I turned it off -> the map at some point reset to the initial center value.
I considered moving to visgl deck gl but couldn't add markers with HTMLElements there. (Should have more documentation to see if it's possible)
Steps to Reproduce
I'm working on creating a demo but you will require android studio to build the mobile app.
You need a simple webview in Android
Map component with 150+ Advanced Marker.
OnIdle listener that changes those Advanced markers.
zooming in and out will cause a grey area in the map and the whole web view become freezed.
https://github.com/user-attachments/assets/47596801-538c-4e6b-ba7f-f10dd1fcb886
Environment
- Library version: 1.7.1
- Google maps version: weekly
- Browser and Version: 'Mozilla/5.0 (Linux; Android 15; 23078PND5G Build/AP3A.240617.008; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/144.0.7559.109 Mobile Safari/537.36'
- OS: Android
Logs
InvalidValueError: setCenter: not a LatLng or LatLngLiteral with finite coordinates: in property lng: Infinity is not an accepted value
(anonymous) @ index.tsx:85
_.Fm @ main.js:176
_.Rm @ main.js:180
(anonymous) @ main.js:200
(anonymous) @ map.js:98
(anonymous) @ map.js:132
nh @ map.js:121
(anonymous) @ map.js:58
release @ map.js:127
Kn @ map.js:116
Ml @ common.js:178
Ml @ common.js:175
Mka @ common.js:64
Toa.qh._.Dq.Lm @ common.js:182
r @ index.tsx:85
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.9k
- Forks
- 192
- Merge medio
- 3 d 7 h
- PR fusionados (30 d)
- 29
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-google-maps
-
google maps issue
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
visgl/react-google-maps#1080 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
bug needs more info
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
visgl/react-google-maps#1039 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
visgl/react-google-maps#905 ·
Los mantenedores suelen responder en 2 días
-
google maps issue
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
visgl/react-google-maps#889 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
visgl/react-google-maps#884 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de visgl/react-google-maps
Issues similares
-
Add API: BlockVectra Data APIAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
remotion-dev/remotion#12905 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
supermomonga/paseo-plugin-zcode-provider#83 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
oxidecomputer/skepsis#102 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
voidzero-dev/void#677 ·
Los mantenedores suelen responder en 1 día