脚本宝典收集整理的这篇文章主要介绍了php – 如何在Google Maps API上查看区域内的地址,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
如果地址位于新西兰的北岛或南岛,我需要解决这个问题.
如果我将地址传递给GOOGLE maps api,我收到的数据会在下面,不幸的是它虽然没有告诉我它在哪个岛.所以,我该如何检查?
{ "results": [ { "address_components": [ { "long_name": "12","short_name": "12","tyPEs": [ "street_number" ] },{ "long_name": "Swiss Avenue","short_name": "Swiss Ave","types": [ "route" ] },{ "long_name": "Gonville","short_name": "Gonville","types": [ "sublocalITy","political" ] },{ "long_name": "Wanganui","short_name": "Wanganui","types": [ "locality",{ "long_name": "Manawatu-Wanganui","short_name": "Manawatu-Wanganui","types": [ "administrative_area_level_1",{ "long_name": "New Zealand","short_name": "NZ","types": [ "country",{ "long_name": "4501","short_name": "4501","types": [ "postal_code" ] } ],"formatted_address": "12 Swiss Avenue,Wanganui 4501,New Zealand","geometry": { "location": { "lat": -39.9444245,"lng": 175.0239575 },"location_type": "ROOFTOP","viewport": { "northeast": { "lat": -39.9430755197085,"lng": 175.0253064802915 },"southwest": { "lat": -39.9457734802915,"lng": 175.0226085197085 } } },"types": [ "street_address" ] } ],"status": "OK" }
Example using Polygons defined by KML和geoxml3
Proof of concept(使用fusion Tables中的自然地球数据集和“州到岛”地图)
以上是脚本宝典为你收集整理的php – 如何在Google Maps API上查看区域内的地址全部内容,希望文章能够帮你解决php – 如何在Google Maps API上查看区域内的地址所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。