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

Set zoom level dynamically from a GeoPanel #85

Closed
m5seppal opened this issue Jun 9, 2021 · 2 comments
Closed

Set zoom level dynamically from a GeoPanel #85

m5seppal opened this issue Jun 9, 2021 · 2 comments
Labels

Comments

@m5seppal
Copy link

m5seppal commented Jun 9, 2021

Currently it's possible to zoom in and out the map widget, but after you save the map and open it again for edit, last zoom level in the map widget is not preserved but instead the hardcoded zoom level is used (either from settings or GeoPanel(zoom=...)).

What I need is to set the zoom level dynamically for each map, so that different maps can use different zoom levels. When I save the map, I want to read the "zoom" from map widget and store it to the database for the map. When the map is opened for edit, GeoPanel should read "zoom" from the database and initialise the widget with that zoom level instead of the default one. Optionally, there could be also "zoom" field shown in the edit page if user wants to set it via text input instead of using the map.

@vladox
Copy link

vladox commented Sep 29, 2021

Hi @marteinn please have a look, I've also updated the docker-compose for the nonspatial configuration to run without using make.
So far it's been working correctly.
BTW, thanks for the awesome widget!

@marteinn
Copy link
Member

marteinn commented Jan 5, 2022

Hi @m5seppal and @vladox! I decided to not accept the PR (my reasoning here #91 (comment)) and instead do my own take on it. As of v5.3.0 it is now possible to have a persistent zoom by using a separate zoom field, it works in a similar way as the address field and works no matter if the field is a spatial field or regular string. The commit containing this feature can be found here: eefcc73

With this I'm closing this issue.

@marteinn marteinn closed this as completed Jan 5, 2022
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.

3 participants