Skip to content
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

[Geolocate control] Fix removing #6977

Merged
merged 1 commit into from
Jul 24, 2018
Merged

Conversation

sergei-zelinsky
Copy link
Contributor

Fix removing of Geolocate control for situations when user denied location and _setupUI has not been called.

It fails in onRemove, because this._userLocationDotMarker is undefined.

Here is demo video when user' location is available.

And here is demo video when user denied location tracking.

Here is demo pen which reproduces the bug.

check if 'this._userLocationDotMarker' exists before calling 'remove'
@andrewharvey
Copy link
Collaborator

Looks good, thanks.

@andrewharvey andrewharvey merged commit 39f3913 into mapbox:master Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants