phegman / vue-mapbox-gl

A Vue.js component for Mapbox GL JS
GNU General Public License v3.0
270 stars 33 forks source link

Access to mapbox-gl-draw events #78

Open vfs-code opened 4 years ago

vfs-code commented 4 years ago

Hi! I trying to listen the events fired by mapbox-gl-draw, but I dont get the way to do that. I have tried with this code:

@map-draw.created ="elementCreated" ... methods: { elementCreated(map, e){ console.log(e); },

But i don't get the event, are supported mapbox-gl-draw events or any workaround to be able to know when a line have been created using linestring tool?

Thanks!