-
|
Hi all, i'm currently working with MapTiler which uses MapLibre under the hood, my setup is Vue 3 + TS. I'm facing a missing type declaration issue inside map listeners and in
But in reality this works fine, coordinates end up being In the source code the implementation looks good, but for some reason
maplibre-gl-js version: 5.6 browser: Chrome Steps to Trigger Behavior
Link to Demonstrationhttps://codesandbox.io/p/devbox/relaxed-curran-44333n?file=%2Fsrc%2FApp.vue%3A4%2C1 Expected Behavior
Actual BehaviorTS is rising an error: WorkaroundIs it possible to suppress this error by commenting above the line: // @ts-expect-error - Property 'coordinates' does not exist on type 'Geometry'.
const coords = e.features[0].geometry.coordinates |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Some geojson features have coordinate and other have coordinates. You need to cast or check the type. |
Beta Was this translation helpful? Give feedback.


Some geojson features have coordinate and other have coordinates. You need to cast or check the type.