Skip to content
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

clicking search results in search box does not change the map #103

Open
monzer15 opened this issue May 8, 2024 · 10 comments
Open

clicking search results in search box does not change the map #103

monzer15 opened this issue May 8, 2024 · 10 comments
Assignees

Comments

@monzer15
Copy link

monzer15 commented May 8, 2024

clicking search results does not change the map, any idea what could be the issue?

@monzer15 monzer15 changed the title clicking search results does not change the map clicking search results in search box does not change the map May 8, 2024
@RafhaanVilla
Copy link

Same thing is hapening to me too. Did you find a fix?

@monzer15
Copy link
Author

Not really still waiting for a fix

@YoussefIbraheem
Copy link

I'm having the same issue too, is there any update on it??

@codezz
Copy link

codezz commented Jul 14, 2024

Same issue here. Anyone found a solution?

@ahmadsalah
Copy link

Same issue here

@Heyian
Copy link
Collaborator

Heyian commented Dec 18, 2024

I can indeed reproduce the problem. I'll try to work on it this week.

@Heyian Heyian self-assigned this Dec 18, 2024
@MohDokan
Copy link

MohDokan commented Dec 19, 2024

Hello @Heyian

The main issue occurs when I enable "searchBoxControl" in "mapControls" and start searching for a location. After selecting a location, the marker does not move to the chosen location and does not choose it as (lat, lng). Additionally, there are warnings regarding the compatibility of the Google Maps API, indicating the use of deprecated Google Maps markers and recommending the use of "google.maps.marker.AdvancedMarkerElement" instead. Please refer to the attached screenshot.

google-maps

@Heyian
Copy link
Collaborator

Heyian commented Dec 19, 2024

Thank you for posting more details, this always helps.

We're aware of the deprecated Markers and we'll have a solution when it gets discontinued. There are problems with the Advanced Marker that we need to fix first, so this won't be done in the short term.

@MohDokan
Copy link

@Heyian
the most important issue to solve is fixing search issue

@gerc23
Copy link

gerc23 commented Feb 5, 2025

After reviewing the JS code a bit, I noticed that the issue can be resolved by changing just this line of code in filament-google-maps-field.js.

// Before:
this.markerLocation = searchBox.getPlaces()[0].geometry.location;

// After:
this.marker.setPosition(searchBox.getPlaces()[0].geometry.location);

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

8 participants