当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Google maps or other service to get list of places within specified bounds?

问题描述:

I am looking for a web service that will allow me to get a list of places within a given map area.

The type of place returned should depend on the size of the bounds - for very large bounds I would want a list of countries, and for smaller ones a list of cities, and possibly other levels in between e.g. state or county.

I have looked through the Google Maps Javascript API documentation and it seems that the Place Search function would be most appropriate, except that you can only specify a radius of up to 50km to search within, so obviously this wouldn't work for large-area views (or I would have to make hundreds of individual requests).

Is there a service (free or paid) that supports this type of query? Either a real-time web based API or something where I can just download all the data at once would be OK.

网友答案:

The National Geospatial Intelligence Agency website has an advanced search function that supports querying on country, type of place, map bounds and many other criteria:

http://geonames.nga.mil/ggmagaz/

You can also download the whole database as a zip file, but unfortunately they don't seem to have any data on the US.

网友答案:

This website has data for all countries and offers multiple web services including reverse geocoding based on the administrative division level (province, county, city etc): geonames.org

分享给朋友:
您可能感兴趣的文章:
随机阅读: