- Issue created by @john.oltman
- Assigned to samit.310@gmail.com
- Status changed to Needs work
11 months ago 8:21am 23 February 2024 - Status changed to Needs review
11 months ago 6:36pm 23 February 2024 - ๐ฎ๐นItaly itamair
Thanks for reporting this.
It looks that more generally requiring a Google Maps API v3 fixes this.
Please Test, QA and Review the attached patch that looks getting rid of that google.maps APIs warning to me,
and if confirmed could be committed into dev and be part of the next Geofield Map module release. - Status changed to Needs work
11 months ago 9:16pm 23 February 2024 - ๐บ๐ธUnited States john.oltman
The patch didn't help, so i did some more digging, and found this:
https://stackoverflow.com/questions/78042237/deprecation-of-the-marker-c...
Not sure if/how you can pin to 3.55 of Google Maps. If you can with a different patch, I'll give it a try. For now I put this in "Needs work" status, but this could end up being a Won't Fix if pinning the version is outside your scope.
- Status changed to Needs review
11 months ago 2:39pm 24 February 2024 - ๐ฎ๐นItaly itamair
@john.oltman could you better elaborate why the #3 patch didn't help you?
Please bear in mind that it applies (should be applied) to the actual 3.0.x-dev HEAD (and not to 3.0.14 version).
Actually that patch is being applied to this Geofield Map demo page:
https://www.geodemocracy.com/drupal_geofield_stack_demo/web/fixing / resolving that warning, as you can see form the web browser console,
how it is being documented in the attached screenshots.It looks that change is going to require / load latest Google Maps v.3 library version ...
and also accomplishing your suggestion in your latest comment.Please correctly apply the #3 patch, and clear your drupal & browser cache, and come back again to this review.
Eventually explain what is not working for you, because #3 looks a general fix to this, to me. - ๐บ๐ธUnited States john.oltman
Yes I did apply the patch to dev branch (as you mentioned, it doesn't apply anywhere else). I will dig a bit more to see if a second usage of maps is sneaking into our site somehow. But reviewing your patch, it doesn't seem to do anything except switch from Maps API v3 Experimental to Maps API v3 - both are version 3. That wouldn't seem to switch the marker usage.
- Issue was unassigned.
- Status changed to Needs work
11 months ago 5:39am 26 February 2024 - ๐ฎ๐นItaly itamair
Please clear Drupal & Browser cache after applying.
It removes the warning reported in this issue, in my general use cases (inspect the mentioned demo page above).It wonโt be possible to switch to a general use of google.maps.marker.AdvancedMarkerElement in the context of this issue, because the module still relies on wrapping libraries (such spiderify and markerclusterer that would need refactoring upstream).
Simply having removed the reported warning from Google maps library looks good here.
And please donโt move back to โneeds workโ unless you clearly reported a negative outcome of the #3 patch.
- Status changed to Needs review
11 months ago 7:48am 26 February 2024 - ๐บ๐ธUnited States john.oltman
Hi @itamair, turns out we were loading the Maps API JS file via a different method - Geofield Map does check this, so it did not attempt to load the library a second time, thankfully. This means our site is not a good test of your patch. However, I did see that version 3.56 is officially released, which includes the deprecation message. So I wonder if your patch will continue to work. Therefore I am uploading a version of the patch that pins the release to v3.55, which is the last release prior to the deprecation message:
https://developers.google.com/maps/documentation/javascript/releases
I changed our method of the Maps API load to specify v3.55 in the URL, and that solved the issue for our site, so in this way I can confirm that pinning to v3.55 gets rid of the message. Less than ideal though since anyone pinning to a version will start to fall behind on security patches and features that Google adds to the library over time. In any case, neither of our patches are good long term solutions regardless, as you noted, since the real answer is going to mean a rewrite of a lot of code eventually.
- Status changed to RTBC
11 months ago 9:50pm 26 February 2024 - ๐ฎ๐นItaly itamair
Ok. Got all this ...
according to this: https://developers.google.com/maps/documentation/javascript/versions
the v=weekly is the way to go to align with the most current and up-to-date version ...New patch attached is still fixing this issue to me.
-
itamair โ
committed e1e3f780 on 3.0.x
Issue #3423207 by itamair, john.oltman: google.maps.Marker is deprecated
-
itamair โ
committed e1e3f780 on 3.0.x
- Status changed to Fixed
11 months ago 9:55pm 26 February 2024 - ๐ฎ๐นItaly itamair
Patch #12 committed into dev, will be part of the next incoming Geofield Map release.
Thanks ... closing this as Fixed. - Status changed to Active
11 months ago 10:22pm 26 February 2024 - ๐ฎ๐นItaly itamair
errata corrige ... the patch #13 and the latest geofield map module release 3.0.15,
still don't get rid of this issue warning, hence I am reopening this,
though with "minor" state (as it is ... ).
Don't have a clear fix for this at the moment ...Will welcome any solid and general fix to this issue, if any incoming.
- ๐บ๐ธUnited States john.oltman
Weekly isn't going to work as that brings in v3.56, then v3.57 when that is released, etc etc. Literally, one has to pin the library to v3.55 to stop the message, since 3.56 and later displays it. It's that simple. Hence the patch I uploaded that was tested but then ignored. I agree that v=weekly is best from a "I want the latest updates" perspective, but that will never prevent the deprecation message if that is the goal. I'm not even sure preventing the message by "hiding it via version constraint" is a worthwhile goal any more, but that is a different conversation.
I agree with keeping this open as a Minor issue. Eventually (and it could be years from now), the existing Marker code will need to be replaced with Advanced Marker to resolve this the right way.