Closed pschocke closed 3 years ago
Hello @pschocke , thank you for your contribution!
Being an OpenStreetMap contributor myself, I understand the point of your PR but I must admit I don't think keeping adding tags like this is a viable solution ; especially with tags that are not directly related to the address itself.
I think we need to find a better way to implement this and registering tags from the location.
Hey @jbelien, I totally understand that point and I thought about that too. OSM offers a lot of different categories.
Maybe adding a way to access the original response would be an option. I am building an autocomplete where I do not want to use the display name since its very long and has a lot of information that I don't need, but I can't get something like the shop name when not using the display name.
Thanks for this awesome package!
Just gave a quick thought : maybe adding extratags=1
to the Nominatim request and then storing all the tags key-value in a tags
property of NominatimAddress
could be a solution. That should allow access to all the information tagged and keep it generic.
This should work. However, I still have no access to the name of the tourism/store/amenisty. Since the address key-value's are also changing, I would suggest storing the address key-value as well.
Yes, you're right the name
tag doesn't seem to be available in extratags
property of the result.
I think it does make sense to keep both address
and extratags
(properties that are already used in Geocoder PHP could be filtered out from address
).
I've updated the pr to store additional address data and added the ability to request extra tags.
Nice, I'll review it ASAP.
Could you make sure it passes Style CI check ?
Hey, do you have any eta of a review? I need this in a work project and don't want to temporarily create a fork of the single nominatim package and update this just as a temporary workaround.
Thanks for your time!
@pschocke I'll try to do this this week but worst case next weekend (19-20 June).
@pschocke Fixes are ready ; could you give me write access to this PR ? I don't know if it's possible to change maintainer access after the PR is created ; if not, could you give me write access in your repository so I can push my commits ? Thanks!
Done! You have access to the repo. Thanks for your work!
🚀 New version 5.5 is released (https://packagist.org/packages/geocoder-php/nominatim-provider) !
Thanks @pschocke !
This PR adds support for the optional fields shop, amenity and tourism.