Wykks/ngx-mapbox-gl

Popup Feature Input wrong type

RasmusKW opened this issue · 0 comments

Hello,
So I started using this nice library recently and I followed the "Popup on click" example to make popups for my features in a layer.
This is when I found out that the input type for the Popups might be wrong. I changed it locally from GeoJSON.Feature<GeoJSON.Point> to mapboxgl.MapboxGeoJSONFeature which worked.

Having it as GeoJSON.Feature<GeoJSON.Point> makes the feature input complain about the type of selectedPoint variable (as it is currently in the example).
I forked the project and put my suggested solution (changing the type of the Feature Input) here.
https://github.com/RasmusKW/ngx-mapbox-gl/blob/master/projects/ngx-mapbox-gl/src/lib/popup/popup.component.ts

It could be that i'm misunderstanding or made something wrong in my own code.