How do I get a direct link to a place on google maps with the Place Id

前端 未结 4 1712
天涯浪人
天涯浪人 2021-02-04 05:29

I have the Place Id of a place on google maps in my app. Is there a way to put the place Id in a URL and have it directly link to the page? Or does it have to be done through

4条回答
  •  一整个雨季
    2021-02-04 05:57

    Recently, in May 2017, Google launched the new Google Maps URLs API. You can read about this API in the official documentation

    https://developers.google.com/maps/documentation/urls/guide

    So, from now on you can construct a URL for Google Maps using the place ID. In your particular case this URL will be

    https://www.google.com/maps/search/?api=1&query=Google&query_place_id=ChIJN1t_tDeuEmsRUsoyG83frY4

    Hope this helps!

提交回复
热议问题