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

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

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

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

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

哪里可以找到胎盘

解决方法

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

the documentation

  1. {
  2. "html_attributions" : [],"results" : [
  3. {
  4. "geometry" : {
  5. "location" : {
  6. "lat" : -33.870775,"lng" : 151.199025
  7. }
  8. },"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/travel_agent-71.png","id" : "21a0b251c9b8392186142c798263e289fe45b4aa","name" : "Rhythmboat Cruises","opening_hours" : {
  9. "open_now" : true
  10. },"photos" : [
  11. {
  12. "height" : 270,"html_attributions" : [],"photo_reference" : "CnRnAAAAF-LjFR1ZV93eawe1cU_3QNMCNmaGkowY7CnOf-kcNmPhNnPEG9W979jOuJJ1sGr75rhD5hqKzjD8vbMbSsRnq_Ni3ZIGfY6hKWmsOf3qHKJInkm4h55lzvLAXJVc-Rr4kI9O1tmIblblUpg2oqoq8RIQRMQJhFsTr5s9haxQ07EQHxoUO0ICubVFGYfJiMUPor1GnIWb5i8","width" : 519
  13. }
  14. ],"place_id" : "ChIJyWEHuEmuEmsRm9hTkapTCrk",// <----------------------------------------------
  15. "scope" : "GOOGLE","alt_ids" : [
  16. {
  17. "place_id" : "D9iJyWEHuEmuEmsRm9hTkapTCrk","scope" : "APP"
  18. }
  19. ],

猜你在找的JavaScript相关文章