Announcing deprecation of PlaceResult.opening_hours.open_now and PlaceResult.utc_offset in Maps JavaScript API’s Places Library

391 views
Skip to first unread message

Google Maps Platform technical support

unread,
Nov 22, 2019, 6:58:29 PM11/22/19
to Google Maps JS API v3 Notify

Hello Google Maps Platform Developers,


On November 20, 2019, the PlaceResult.opening_hours.open_now and PlaceResult.utc_offset properties in the Google Maps JavaScript API’s Places Library are deprecated and replaced by new properties and methods. 


You have until November 20, 2020 to perform the changes in your code as described below. 

We have notified owners of API projects which our records indicate are requesting these properties in Place Details and Find Place requests or might be reading them from PlaceResult object returned in the response from Place Details, Find Place, Nearby Search or Text Search requests.

What do I need to know?

Currently, the Maps JavaScript API’s Places Library exposes in its PlaceResult object the properties:

  • utc_offset, which is returned in Place Details response

  • opening_hours.open_now, which is returned in Place Details, Find Place, Nearby Search and Text Search responses

On November 20, 2019, we are deprecating these properties to bring consistency across Places API clients on different platforms (the Maps Javascript API, the Places SDK for Android, the Places SDK for iOS). 

These properties have been replaced as follows:


  • utc_offset, by utc_offset_minutes 

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


Additionally, for Find Place, Nearby Search and Text Search requests, we provide alternative solutions for determining whether a place is open.

As a result, starting November 20, 2020, the Maps JavaScript API’s Places Library will stop accepting those properties in the fields parameter and stop returning them in the response for the corresponding requests. Instead, developers will receive the ‘Unsupported field name’ error when using them in the fields parameter and the value ‘undefined’ when reading these properties from the PlaceResult object in the response.  

What do I need to do?

Before November 20, 2020, follow the Place Field Migration guide to make the necessary property and method substitutions and to see the alternative options for obtaining opening_hours data to prevent user experience degradation.  


Thank you for choosing Google Maps Platform.


Sincerely,

The Google Maps Platform Team

Reply all
Reply to author
Forward
0 new messages