-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do you access Geolocation (or similar) events? #39
Comments
Also tried:
|
Control events are not currently implemented yet. There is a pull request #38 for that though. |
Ok great I will pull that branch and try it out |
Thanks to @LKajan control events have now been implemented. If you pull down the latest NPM package you should be able to use them. Documentation has also been updated to explain how. |
I upgraded but it doesn't look like it is working properly. Looking at the pull request, it doesn't look like $emit is implemented correctly. According to the docs the second argument is a callback. In PR #38 it is passing Also in this example the final event is called |
Hi Todd, It looks like the example you sent is referring to the Geocoder control which is actually not built into the main Mapbox library so is not implemented in this Vue component. The Geolocation events are working for me. The Vue $emit event uses the Rest Parameter to allow you to define additional arguments that are passed into the listener’s callback function. This allows you to do Hope that is helpful! |
It's not clear how one would access the geolocation control's events through Vue. (https://www.mapbox.com/mapbox-gl-js/api/#geolocatecontrol.event:geolocate) I thought it would be as simple as doing
@map-geolocate
,@map-trackuserlocationend
but neither bubbled up.The text was updated successfully, but these errors were encountered: