phegman / vue-mapbox-gl

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

Custom Interactive Controls #107

Closed sdrios closed 2 years ago

sdrios commented 2 years ago

What is the best way to implement custom interactive controls (https://docs.mapbox.com/mapbox-gl-js/api/markers/#icontrol) using this library?

Here is a better example: https://codepen.io/roblabs/pen/zJjPzX?editors=0110

I need the event fired on icontrol click to change the state of my Vue component.

sdrios commented 2 years ago

Figured it out by passing the vue instance to my class constructor.