notum-cz / strapi-plugin-location

This plugin allows users to create location inputs and store latitude and longitude values as geometry types in a PostGIS database. It also provides functionality to filter items based on their location.
MIT License
24 stars 13 forks source link

feat: Allow address string search to find coordinates #198

Closed guicalmeida closed 3 months ago

guicalmeida commented 3 months ago

Resolves #45

Hi! I just implemented the following feature for a personal project and wondered that it might be of worth to the project or other developers. The following pull request implements a text input field where the user can input an address string and get the coordinates for it automatically. It uses OpenStreetMap API, which has a severe rate limiting (1 request/sec) thatr will hardly be a problem in this context.

I'm sure the code can be improved, especially the Strapi components styling which I struggled with, but the core idea is right here. Feel free to refuse, add it to a branch, make it optional through configs or whatever fits your vision for this project.

Thank you very much for creating this!

Screenshot from 2024-06-04 21-37-45

omikulcik commented 3 months ago

I have just tested it and it works like a charm! Thank you very much. Will merge and release.