Skip to content

Feature Request: Geocoding events #412

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

Open
jamesmacwhite opened this issue May 26, 2025 · 0 comments
Open

Feature Request: Geocoding events #412

jamesmacwhite opened this issue May 26, 2025 · 0 comments

Comments

@jamesmacwhite
Copy link

We use the GeoService for geocoding/reverse geocoding lookups which works great. We have use case where we want to reduce the amount of geocoding API requests to providers like Google as it is a metered API and costs. To do this we have implemented a geocoding DB cache, where we store the result of a successful geocoding request through Simplemap into a database table with various properties like, lat, lng, postcode, address, parts. We can then do a DB query to check if that record exists and if it does return it from the DB, to save requesting the same geocoding data again.

This helps with scenarios like Feed Me when importing geocoding data, particularly in Matrix blocks.

Currently, I am wrapping my own service around the GeoService::latLngFromAddress() and GeoService::addressFromLatLng(), however it would be really awesome, if a plugin event was raised when the GeoService makes a geocoding request with the configured provider and returns data. This would allow other plugins to know when this request happens and get the geocoding response data, to do further things with it like, write it to a database or whatever.

I'd be happy to send a PR for it as it would be pretty straightforward.

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