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

Some RMap properties cannot be dynamically updated #94

Closed
mmomtchev opened this issue Nov 10, 2022 · 1 comment
Closed

Some RMap properties cannot be dynamically updated #94

mmomtchev opened this issue Nov 10, 2022 · 1 comment

Comments

@mmomtchev
Copy link
Owner

mmomtchev commented Nov 10, 2022

I've noticed many other properties are not updating dynamically like on the RMap component: noDefaultControls, noDefaultInteractions, maxZoom.

The docs only state a few specific props that don't update, but the above examples don't...

I see this is because the RMap constructor creates a new Map, and never reinitializes it after props change:

this.ol = new Map({

Originally posted by @TrySpace in #85 (comment)

@mmomtchev
Copy link
Owner Author

noDefaultControls and noDefaultInteractions are not expected to be support updating as they are related to the map initialization, but maxZoom and minZoom should work and as far as I can see - they do work. I have added a special unit test for updating those.

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

No branches or pull requests

1 participant