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

When the style of the map changes, the map is always translated in "English". #26

Closed
mike7515 opened this issue Nov 14, 2018 · 2 comments · Fixed by #46
Closed

When the style of the map changes, the map is always translated in "English". #26

mike7515 opened this issue Nov 14, 2018 · 2 comments · Fixed by #46
Labels

Comments

@mike7515
Copy link

mike7515 commented Nov 14, 2018

Trying to change the map style from "mapbox://mapbox-streets-v10" to "mapbox://mapbox-satellite-streets-v9", but when map.setStyle is called, the map is translated to "English" .

I suppose that the library needs to update the style with the true language, because if I remove this line of code "this._map.off ('styledata', this._initialStyleUpdate);" the _initialStyleUpdate method is called from the library and the map is translated correctly.

Thanks

@coocy
Copy link

coocy commented Feb 13, 2020

I have forked and made an improved version.
Changing the map's style won't reset the language.
Please check this https://github.com/coocy/mapbox-gl-language/
Demo: http://coocy.github.io/mapbox-gl-language/example/

@andrewharvey
Copy link

@coocy that's great, are you interested in putting together a PR? I can help review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants