cheesegrits / filament-google-maps

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

Is there a way to hide the map control and only use the AutoComplete on the field? #98

Open abishekrsrikaanth opened 2 months ago

abishekrsrikaanth commented 2 months ago

I am trying to only have Autocomplete on the TextInput on the form and have the map control hidden. Is there a way to do this?

duncan-chig commented 2 months ago

hey @abishekrsrikaanth . just to understand: why would you want to hide map feature when its the core, primary feature? yes you can do anything but why go to lengths hiding that which ought not be hidden? happy coding.

abishekrsrikaanth commented 2 months ago

well, I have a large form with a list of fields and I only want the user to enter the Address and offer the Autocomplete functionality on the Text field. I really don't have a need for the Map control, so just want to hide it and only have the Text Input with the AutoComplete enabled.

abishekrsrikaanth commented 2 months ago

Additionally, I have noticed few console errors that I wanted to bring to your notice. I get this error when I use the Geocomplete control. I do have the Maps Javascript API enabled on my Google API Services and still get this error. Can you please advice if there are any other Service that needs to be enabled?

CleanShot 2024-04-25 at 21 38 28 CleanShot 2024-04-25 at 21 40 04

duncan-chig commented 2 months ago

i see isee...

  1. some map functionalities need subscription.

  2. depending on choice of tools... iknow laravel filament you can make form field hidden e.g. Hidden::make('mycoordinates_field') but Map:: is a separate component in a custom package..: hacking may be option.. but must you ? but without full use case imay not be well equiped to advise.