Google Maps AdvancedMarkerElement

I noticed from the browser console that “As of February 21st, 2024, google.maps.Marker is deprecated. Please use google.maps.marker.AdvancedMarkerElement instead. At this time, google.maps.Marker is not scheduled to be discontinued, but google.maps.marker.AdvancedMarkerElement is recommended over google.maps.Marker. While google.maps.Marker will continue to receive bug fixes for any major regressions, existing bugs in google.maps.Marker will not be addressed. At least 12 months notice will be given before support is discontinued.

Are there plans of adding the Advanced Marker to Anvil?

More information on the migration at מעבר לסימונים מתקדמים  |  Maps JavaScript API  |  Google for Developers

1 Like

Was this ever answered at all @juho.harme?

No, I think the issue still remains. Haven’t checked the browser console in a while, though.

I found that the more I tried to customize Google Maps the more issues I ran into. I finally just switch over to using Leaflet for mapping and have been very happy with the results.

2 Likes

Hi all!

We are currently looking into updating our GoogleMaps integration to use google.maps.AdvancedMarkerElement. We’ll update this thread when it’s been implemented.

3 Likes

I don’t suppose you have an example app or some tips on how you would make use of Leaflet within Anvil?

I’m still a bit noob on the embedding custom javascript components into the layouts etc.

I could probably put something together. I’m stepping out for a bit so give me a couple of hours.

No rush at all! Thank you

Could you let me know what functionality you are after?

I was looking at the dependency that I put together for Leaflet and I think it is too specific to my needs to be helpful as is. I could strip things down to some core concepts if I had a good idea of what you are after.

Hey, @mattstibbs,

Here is a quick demo for Leaflet that walks through their quick start tutorial. The app is available to clone and I’ve tried to put notes to help out. Hope this helps!

3 Likes

Thank you @racersmith - that’s great! I’ll have a play with that!