Skip to main content

Developers – action required! Google is deprecating two properties in Maps Javascript API’s Places Library.

By November 28, 2019July 8th, 2020Blog
open_hour

The Places fields opening_hours.open_now and utc_offset are deprecated as of November 20, 2019, and will be turned off on November 20, 2020. These fields are deprecated ONLY in the Places Library, Maps JavaScript API. This guide shows you how to update your code to stop using these fields (Google, 2019). Until November 20, 2020 you have to perform necessary changes to your code. Please, follow the guide below.

What do I need to know?

At this moment, the Maps Javascript API’s Places Library responds with these properties:

  • utc_offset, which is received in Place Details response
  • opening_hours.open_now, which is received in Place Details, Find Place, Nearby Search and Text Search response.

To bring consistency across different platforms (Maps Javascript API, Places SDK for Android, Places SDK for iOs), Google is deprecating these properties as of November 20, 2019.

Changes will be made, and properties will be substituted:

  • utc_offset, by utc_offset_minutes
  • opening_hours.open_now, by the isOpen () method in Place Details requests only.

Plus, for Find Places, Nearby Search and Text Search, Google provides alternative solutions for determining whether a place is open.

As of 20th November 2020, the Maps Javascript API’s Places Library will stop accepting these properties in the field parameter and will stop answering these properties in request responses. If no changes are made, developers will receive Unsupported field name error with undefined value when reviewing PlacesResult object in the response.

What do I need to do?

Necessary changes need to be done before 20th November 2020. Developers need to make parameters substitution following this guide for obtaining opening_hours data to prevent UX degradation.

If you are not using the fields parameter in Place Details requests yet, using of this parameter will save you money on your monthly bill. The reason is the Places requests are billed based on what parameters you obtain in the answer. This means, if you do not specify any value for fields parameter, you will be billed for all data included for the given place/address point.

As each user of Google Maps Platform, you will receive an informative email from Google in case your projects are influenced. Also, customers registered with Globema, will receive separate email notice if their action is required.

In any case, please, feel free to contact us to get more information on this topic, our experts will be more than glad to assist you with smooth transition.

Source: Google. (2019, November 22). Place Field Migration (open_now, utc_offset). Retrieved November 28, 2019, from https://developers.google.com/maps/documentation/javascript/place_field_js_migration