-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Amend the geocoder example to draw a marker at the result's location #2692
Comments
We dispatch a geolocate event on success, so the listening code can display a marker if they want to. Is this ok? It gives developers a bit more flexibility rather than just forcing a marker on them. |
I agree with @bhousel. This behaviour isn't want an end user would want in all cases and should be implemented downstream. (This'll get a even easier when we land @mourner plugin for #656 soon!) What we can do is amend the geocoder example to include a marker. |
How can I listen for an event after geolocate is triggered |
@danielduhh |
Oh! Hm. this already existed. http://127.0.0.1:4000/mapbox-gl-js/example/point-from-geocoder-result/ |
URL update for the example: https://www.mapbox.com/mapbox-gl-js/example/point-from-geocoder-result/ |
The GL implementation of geolocate does not visually show a position marker after successful geolocation, this makes it hard to identify where the user is located.
This is very handy for tools that is based on user position. Here is an example map to try the existing Geolocate() behavior for which i'd like to add a position marker. This app is being used to map trees locations.
cc @bhousel
The text was updated successfully, but these errors were encountered: