Maps JavaScript API Version Update

394 views
Skip to first unread message

Darcy Koch

unread,
Feb 3, 2021, 6:21:16 PMFeb 3
to google-maps-js...@googlegroups.com
We will be making the current weekly version the new quarterly version on the week of February 16, 2021. The versions will then be:

Weekly: 3.44
Quarterly: 3.43
Frozen: 3.42

3.41 will be retired.

If you don't specify a version (or request a retired version), you will be served a default version, which depending on your key configuration will be either 3.43 or 3.44. But a developer specified version will always be honored and served when requested when it's an existing version.

For more information about Maps API versioning, see:
https://developers.google.com/maps/documentation/javascript/versions

To report issues with any version of the API, see:
https://issuetracker.google.com/savedsearches/558438

Along with this version update, we released a Beta version of Maps JavaScript API that reduces its impact onto the JavaScript global namespace of the parent webpage, a.k.a the window object.


Our intention with this change is to avoid involuntarily overwriting global variables or polyfills.


The changes described below ‒ currently only in Beta ‒ will be included in the next version (3.45), which will be mainstreamed into the Weekly release channel in Q2 2021.


What do I need to know?


When JavaScript polyfills are needed by a user's browser for Maps JavaScript API, the API will no longer export those as global variables. As a consequence, pages that mistakenly relied on the API providing polyfills for third-party or embedded code may stop functioning correctly.


Due to these changes, the placeTypePreferences property of the Local Context Library will no longer accept Iterable objects (such as Sets) on Internet Explorer, but only Array-like objects as demonstrated in the documentation.


Additionally, when using the Geometry Library the following variables will no longer be exported into the global namespace: Spherical, PolyGeometry, and PolylineCodec. These facilities will remain available in their intended namespace within google.maps.geometry.


What do I need to do?


If you use Maps JavaScript API, please verify that your pages still work as intended with the Beta version of the API, for instance using a script tag such as this one to load the API:


<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap&v=beta"></script>


While we took every precaution to minimize the chance of disruption and estimate the risk of breaking existing pages as very low, we evaluated that customers using the API with the Geometry Library or the Local Context Library are the most likely to be affected by side-effects of these clean-ups, as well as users of Internet Explorer.


How can I get help?


If you determine that your web page requires polyfills, we recommend https://polyfill.io to that effect.


Should you need further help to ensure your web pages remain compatible with Maps JavaScript API, please check out our support options.

Reply all
Reply to author
Forward
0 new messages