cheesegrits / filament-google-maps

Google Maps package for Filament PHP
212 stars 60 forks source link

Is there a reason that the place name is not concatenated with the address? #101

Open mabdelfattah opened 2 months ago

mabdelfattah commented 2 months ago

Unfortunately, place['formatted_address'] does not include the place name by default. However, in most cases, the place name should be concatenated with the address.

So, if there is no specific reason that this package does not concatenate both, I think the following line should be updated to: Current: https://github.com/cheesegrits/filament-google-maps/blob/39c33d8097d71535e397e9a1f62ee1e4227c12d0/resources/js/filament-google-geocomplete.js#L177

Suggestion:

await setStateUsing(statePath, place['name']+', '+place[placeField]); 

If this does not make sense to the package maintainer/owner because it will be applied to all addresses.

Then, Is it OK to add a new attribute to the Geocomplete field called includePlaceName()? If this makes sense, please let me know and I'll submit a pull request.