Where I can find a place id on google maps

后端 未结 4 1927
北海茫月
北海茫月 2021-01-04 07:17

I want to get the place images accord to the introductions here:

https://developers.google.com/places/documentation/details#PlaceDetailsRequests

According th

4条回答
  •  無奈伤痛
    2021-01-04 07:40

    The place_id is in the SearchResults from any of the SearchRequests:

    from the documentation:

    {
       "html_attributions" : [],
       "results" : [
          {
             "geometry" : {
                "location" : {
                   "lat" : -33.870775,
                   "lng" : 151.199025
                }
             },
             "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/travel_agent-71.png",
             "id" : "21a0b251c9b8392186142c798263e289fe45b4aa",
             "name" : "Rhythmboat Cruises",
             "opening_hours" : {
                "open_now" : true
             },
             "photos" : [
                {
                   "height" : 270,
                   "html_attributions" : [],
                   "photo_reference" : "CnRnAAAAF-LjFR1ZV93eawe1cU_3QNMCNmaGkowY7CnOf-kcNmPhNnPEG9W979jOuJJ1sGr75rhD5hqKzjD8vbMbSsRnq_Ni3ZIGfY6hKWmsOf3qHKJInkm4h55lzvLAXJVc-Rr4kI9O1tmIblblUpg2oqoq8RIQRMQJhFsTr5s9haxQ07EQHxoUO0ICubVFGYfJiMUPor1GnIWb5i8",
                   "width" : 519
                }
             ],
             "place_id" : "ChIJyWEHuEmuEmsRm9hTkapTCrk",  // <----------------------------------------------
             "scope" : "GOOGLE",
             "alt_ids" : [
                {
                   "place_id" : "D9iJyWEHuEmuEmsRm9hTkapTCrk",
                   "scope" : "APP"
                }
             ],
    

提交回复
热议问题