7

Is there a Bing API for finding nearby cities given a city name or lat/long combination?

4

4 回答 4

1

我不知道 Bing 是否提供此功能,但您可以根据geonames.org提供的数据构建自己的

他们提供了一个 API 来获取给定 lat/lng 附近的位置:http ://api.geonames.org/findNearby?lat=47.3&lng=9&username=demo

或者,您也可以全力以赴,使用他们的数据为您自己的需求实施解决方案,根据这个答案:给定纬度/经度坐标,我们如何找出城市/国家?

于 2011-06-16T10:14:53.737 回答
0

The short answer is no, there is no Bing API for finding nearby cities.

That said, it would be possible to 'cook your own' using the existing APIs. However, one thing that would need clarification is what 'nearby' means. I presume you mean within a specific radius of a given point (determined by a city name or lat/long combination).

Using the Bing Api it would be fairly trivial to implement an algorithm to reverse geocode a location and then test for places within x distance.

Failing that, you could use something like geoPlugin, it is free and you can put it on your sever - thus avoiding 3rd party up-time issues. http://www.geoplugin.com/webservices/php#php_class

Take a look at the nearby places features, this does exactly what you want. http://www.geoplugin.com/webservices/extras

于 2012-03-09T01:56:50.120 回答
0

不,没有。但是,获取给定坐标的边界框然后使用 Bing Maps API 相对简单。我正在这样做并使用这个解决方案来获得我需要的东西......

https://stackoverflow.com/a/14314146/73680

于 2013-10-19T15:37:47.800 回答
0

我认为这就是您要查找的内容:Bing Maps API 示例

于 2011-01-10T19:34:19.973 回答