javascript – 我可以在谷歌地图上找到地方ID

前端之家收集整理的这篇文章主要介绍了javascript – 我可以在谷歌地图上找到地方ID前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想让这些地方的图像符合这里的介绍:

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

根据这个文件,我需要这个地方的“地方ID”.

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

哪里可以找到胎盘

解决方法

place_id在 SearchResults中的任何一个 SearchResults中:

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"
            }
         ],

猜你在找的JavaScript相关文章