You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this in a Vue app, so the problem might be there, but I'm getting this no source with this ID Error whenever I destroy an instance of mapbox (e.g. changing pages, etc.).
Psuedo stack trace: this.map.removeSource(SOURCE_LINE);
in Ruler.measuringOff()
called by Ruler.onRemove()
called by a mapbox onRemove() (not 100% sure where, but I would guess the bit that removes controls)
This only occurs if I haven't used the ruler yet, or if the ruler has been cleared. If I still have ruler lines/points on the map, I get an i[e].onRemove is not a function Error instead (I'm using webpack).
Either way everything seems to function normally, it's mostly just annoying to see errors all the time when I'm trying to debug! Plus it might break something important for someone later..
Maybe it's as simple as doing an isMeasuring check or an if map.getLayer(SOURCE_LINE)? I've poked around a bit and haven't got it working yet but I'm not really set up to test module edits at the moment. I'll give it a try later
The text was updated successfully, but these errors were encountered:
I now get i[e].onRemove is not a function whether or not the ruler has been used, but that is likely a vue+webpack/babel or mapbox-gl problem. I'm in the middle of a refactor so after that I'll see if I can narrow it down later and post the result here. I'm fairly sure it's not a problem with this library..
I'm using this in a Vue app, so the problem might be there, but I'm getting this
no source with this ID
Error whenever I destroy an instance of mapbox (e.g. changing pages, etc.).Psuedo stack trace:
this.map.removeSource(SOURCE_LINE);
in
Ruler.measuringOff()
called by
Ruler.onRemove()
called by a
mapbox onRemove()
(not 100% sure where, but I would guess the bit that removes controls)This only occurs if I haven't used the ruler yet, or if the ruler has been cleared. If I still have ruler lines/points on the map, I get an
i[e].onRemove is not a function
Error instead (I'm using webpack).Either way everything seems to function normally, it's mostly just annoying to see errors all the time when I'm trying to debug! Plus it might break something important for someone later..
.
.
Possibly related to this fixed issue: mapbox/mapbox-gl-js#7478?
Maybe it's as simple as doing an
isMeasuring
check or an ifmap.getLayer(SOURCE_LINE)
? I've poked around a bit and haven't got it working yet but I'm not really set up to test module edits at the moment. I'll give it a try laterThe text was updated successfully, but these errors were encountered: