maplibre / maplibre-gl-inspect

Maplibre GL Inspect adds an inspect control to maplibre-gl-js to view all features of the vector sources and allows hovering over features to see their properties.
https://maplibre.org/maplibre-gl-inspect/
BSD 3-Clause "New" or "Revised" License
40 stars 7 forks source link

Fix typo in `generateInspectStyle` #6

Closed erik closed 1 year ago

erik commented 1 year ago

Tiny typo I noticed while tracing through the code in the debugger.

Seems to date back to mapbox-gl-inspect, and prevented the forEach(sourceId) loop from actually doing anything.

Typo introduced here: https://github.com/lukasmartinelli/mapbox-gl-inspect/commit/6bbe9848d695a72cba7ddae95ce5fe8eb3c8e115

acalcutt commented 1 year ago

Code wise this makes sense to me. Do you have a screenshot of what this actually changes?

erik commented 1 year ago

I don't, the issue that led me to this was actually entirely unrelated (a misconfiguration on my part). My understanding is that if you have a style mixing raster and vector sources (which I do not), this loop intends to hide the rasters from the inspect view

acalcutt commented 1 year ago

I did a bit of looking to understand the code and it seems like this eventually gets sent to maplibre SetStyle.

I agree this is a typo, since 'soources' would be of no use to SetStyle.