-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Customized map control will lose when set reuseMaps
to true in StaticMap
#699
Comments
|
Why not pass I have a judgement like this in my project, would it save me from the unexpected error?
|
And I thought it means currently I can only set |
No reason, already flagged as a bug. I will try to put up a fix this weekend. If this is blocking you you're welcome to open a PR. |
@hijiangtao is #683 essentially reporting the same bug? Can we merge these? |
@Pessimistress you remind me of that |
Fixed and closed. |
Problem description
I found
reuseMaps
will keep all the things the same but except the added controls. Once, I add a map control when map is loaded (such as a language controlA
), then I switch to another page, which also usereact-map-gl
, I found map in the new page will go back to its original control withoutA
.Reproduce steps
component.js
in two different pages, such as/pageA
and/pageB
;If I use
reuseMaps
, theonLoad
will never be fired again in the new page, so I can't add control manually, too.The text was updated successfully, but these errors were encountered: