Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 the URL?

I can't seem to find anything detailing this in the docs. I've tried below, but it just gets me the standard google maps page:

https://maps.google.com/maps?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4
like image 241
David Mckee Avatar asked May 26 '15 19:05

David Mckee


1 Answers

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!

like image 146
xomena Avatar answered Sep 29 '22 03:09

xomena