Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Google Maps link from place_id

HeIIo, using google map API with search I'm able to find a certain place and then store it's details. However, the array doesn't contain google maps link which would open this place on google maps.

Via API I receive place_id which, as I feel, should be enough to build a full google maps link; however, I can't find a way to do that. Can anyone advise me on how to do that.

Thank you for your time.

like image 944
A L Avatar asked Jun 16 '15 00:06

A L


People also ask

What is the URL of Google Maps?

Launching Google Maps and performing a specific action The only valid value is 1. If api=1 is NOT present in the URL, all parameters are ignored and the default Google Maps app will launch, either in a browser or the Google Maps mobile app, depending on the platform in use (for example, https://www.google.com/maps).


2 Answers

Try below syntax. I hope it helps

https://www.google.com/maps/place/?q=place_id:ChIJp4JiUCNP0xQR1JaSjpW_Hms 
like image 133
Sedat Kumcu Avatar answered Sep 23 '22 20:09

Sedat Kumcu


Here is an official url to search for a placeId with a fallback to an address if the placeId does not exist

https://www.google.com/maps/search/?api=1&query=<address>&query_place_id=<placeId>

no token required, works on Android, iOS (as well as iOS 11) and web

like image 45
Kirill Kulakov Avatar answered Sep 24 '22 20:09

Kirill Kulakov