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

Adding bounds support. #9

Open
wants to merge 5 commits into
base: 1.x
Choose a base branch
from
Open

Adding bounds support. #9

wants to merge 5 commits into from

Conversation

david-batranu
Copy link
Member

We are using this widget on an EEA project and have received a request for the map zoom to reflect the result of the geocoding accuracy. Bounds are also saved on map click, pan and zoom.

The changes required for the implementation have been:

I did manual testing with and without these changes on existing and new content types. No migration step is necessary.

Patching the ParseJSON function in L.GeoSearch.Provider.Esri to also
include the bounds so that Leaflet can set the proper zoom according to
geolocation accuracy.

Also pinning L.GeoSearch.git to specific commit used by this repo; since
`master` is now at version 2.0 which is a complete rewrite using ES6.
Adding extra `bounds` field to the IGeolocation interface. This is needed to
remember the map viewport of the saved location.

Partially implemented bounds in maps.js: only save and update on search.

Remaining: update map bounds on view and edit.
Also updating bound values when dragging or moving the map.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants