How to get a direct link to a place on Google maps using a place id

I have a Google Maps location id in my application. Is there a way to put the place id in the url and directly link it to this page? Or does it need to be done through the URL?

I can not find anything detailed in the documentation. I tried below, but it just gets the standard Google Maps page:

https://maps.google.com/maps?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4 
+7
google-maps google-maps-api-3
source share
5 answers

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

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

So now you can create 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!

+8
source share

Based on this answer: fooobar.com/questions/498972 / ...

You can use:

 https://www.google.com/maps/place/?q=place_id:ChIJp4JiUCNP0xQR1JaSjpW_Hms 
+3
source share

Not directly, using the identifier placeID, you can get a variety of information in JSON or XML format, among which there is also the Latin language and its address, with which you can easily find the map Google developer document

0
source share

The URL of a particular Google Place is returned by the endpoint API of the place details API.

If, for example, you request:

 https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJV2BQ4laeekgRFauLvdXbFXE&key=YOUR_API_KEY 

You will see that the returned JSON has a key "url" that points to https://maps.google.com/?cid=8148660811851344661

0
source share

The correct format for creating a shared link right now that goes directly to the right google place is: https://maps.google.com/?cid=[place_idapter&t=[maptype]

A map type indicator "t" is apparently necessary. Without it, Google maps seem to perform a more general search when a link opens, which is sometimes successful, and sometimes not. With it, maps open for the right place every time, regardless of whether it opens in a browser or in an application on a mobile device.

Set this parameter to “m” for street map and “k” for satellite map.

Many answers to SO show the following syntax, which often pulls out unwanted results if there are two locations with the same name nearby, for example: https://www.google.com/maps/place/Starbucks/@43.088554,-88.06579, 17z /

If you are already using google api sites, you have place_id, so I recommend using it to avoid ambiguity.

-2
source share

All Articles