[Feat] better console.log behavior for events
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 32/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- react, typescript
Línea de trabajo
Comienza con la documentación de interactiveLayerIds y del evento onClick; después, compara el objeto de evento del ejemplo oficial de cluster con la salida de consola descrita aquí. Determina si el comportamiento solicitado o una indicación en la documentación es apropiado; se considera terminado cuando la propiedad features se puede descubrir mediante una inspección normal o la documentación explica claramente cómo inspeccionarla.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Target Use Case
As a first time user with react-map-gl, when using a map with interactiveLayerIds=[SomeLayer..id] and doing console.log(event) in the onClick EventHandler, you see the following output in console:
Now you start wondering where the crucial "features" property is and try to fix things in your code. Of course nothing will change whatever you do .Then, after copy/pasting an official example (cluster example) into my codebase and also doing console.log(), you see that its the same there too. Now you realize, that console.log() just doesnt print out the "features" property. The only way to print out this property is the following:
console.log(Object.getOwnPropertyNames(event));
Which gets you this:
So you fought an error which wasnt one in the first place and thats kind of horrible.
Proposal
Dont know a proposal. Would like to see console.log include this important property when its there. Not a JS pro so i cant even figure out why its not there in the first place. Perhaps something todo with the js prototype property?
What would have helped is a hint in the docs for the interactiveLayerIds=[SomeLayer..id] property so that developers dont search for the resulting "features" property in the event via console.log() which is a quite normal quck and dirty way to inspect stuff. After this, most likely i will start sooner firing up a debugger with a breakpoint
Appendix: thanks for this great library.
- 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