Closed vladox closed 2 years ago
Hi @vladox and thanks for the PR! Sadly I cannot accept it because of:
SRID=5432;POINT(12.0 13.0)
is a string representation of a geo point and is done by Django/Postgres, extending upon it to include additional values would break compabilityWidgets 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
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!
Also implements
hide_latlng
for streamfields Fixes #85