stevage / map-gl-utils

A utility library that makes Mapbox GL JS or Maplibre GL a bit more convenient to work with.
https://npmjs.com/package/map-gl-utils
210 stars 24 forks source link

Error with clickPopup on line features #34

Open bmcbride opened 2 years ago

bmcbride commented 2 years ago

I'm trying to use clickPopup on a layer with line features and am receiving the following error:

Uncaught Error: LngLatLike argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]

It works fine on point layers and hoverPopup seems to work with line features, so I'm wondering if I'm doing something wrong or this is a bug.

Example: https://jsfiddle.net/nh7dsgj6/2/. Click the blue water layer to see the issue.

Thanks!