Find all parks for a given zipcode with google maps

送分小仙女□ 提交于 2019-12-06 05:26:37

The Google geocoder API doesn't have a provision for specifying a "type" such as "park" in the query. It will identify the feature type in the response, but you can't put it in the the request.

You might be able to do what you want in the Google Places API, now out for developer preview. I haven't tried it. You still can't specify a type in the request, but you specify a location and radius, and it returns all places, and each place has one or more associated type codes (which might include park). You can search through the returned results to see if parks appear. See http://code.google.com/apis/maps/documentation/places/

xxLITxx

Use Google Places API and the text search.

Change the [zipcode] and the key [apikey]:

https://maps.googleapis.com/maps/api/place/textsearch/json?query=park+in+[zipcode]&key=[apikey]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!