Frojd / wagtail-geo-widget

Wagtail-Geo-Widget is the complete map solution for your Wagtail site.
MIT License
138 stars 37 forks source link

feat: first iteration to implement zoom level persistence in DB #91

Closed vladox closed 2 years ago

vladox commented 3 years ago

Also implements hide_latlng for streamfields Fixes #85

marteinn commented 2 years ago

Hi @vladox and thanks for the PR! Sadly I cannot accept it because of:

Widgets in Django/Wagtail are a bit tricky to work with, but I think a better approach would be to use a hidden input field that handles the zoom value (we have a similar approach for the location search field). Another way would be to introduce some sort of meta field (for values not related to location), this field could be of a json type and contain zoom and other arbitrary values.

Apologies for not accepting this PR, it's always a good idea to contact the maintainer if you plan on building a larger feature :)

When it comes to implementing hide_latlng I think it's a good idea! Will look through your PR and see if I can make a commit out of it. Will keep this PR open until I have done this.

/ M

marteinn commented 2 years ago

hide_latlng is now implemented in GeoBlock. https://github.com/Frojd/wagtail-geo-widget/commit/0c0a3c6c05998a48ea67510cc769951af184699f. Thanks for the help @vladox!

When it comes to the other part of the PR (persisting zoom), I'm closing this with my reasoning on the comment above, but would be open to review a PR with another approach!