如何从 BING 地图 api 按纬度和经度获取地址(城市、州、国家、邮政编码)?

发布于 2024-10-09 01:39:36 字数 48 浏览 0 评论 0原文

如何从 BING 地图 api 按纬度和经度获取地址(城市、州、国家、邮政编码)?

How to get address(city,state, country, zipcode) from BING map api by latitude and longitude?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

却一份温柔 2024-10-16 01:39:36

您可以使用 Bing 地图 REST 服务

对于您的情况,您可以在此页面:按点查找位置

一个示例是:http://dev.virtualearth.net/REST/v1 /Locations/47.64054,-122.12934?o=xml&key=BingMapsKey

使用 jquery 是这样的:

$.ajax({
    url: 'http://dev.virtualearth.net/REST/v1/Locations/' + latitude + ',' + longitude,
    data: {
        o: 'xml',
        key: BingMapsKey
    },
    jsonp: "jsonp",
    success: function (data) {
        //Process the result
    },
    error: function(){
        //Process the error
    }
});

You can use the Bing Maps REST Services

For your case you have info in this page: Find a Location by Point

One example is: http://dev.virtualearth.net/REST/v1/Locations/47.64054,-122.12934?o=xml&key=BingMapsKey

Using jquery is something like this:

$.ajax({
    url: 'http://dev.virtualearth.net/REST/v1/Locations/' + latitude + ',' + longitude,
    data: {
        o: 'xml',
        key: BingMapsKey
    },
    jsonp: "jsonp",
    success: function (data) {
        //Process the result
    },
    error: function(){
        //Process the error
    }
});
花落人断肠 2024-10-16 01:39:36

Shaulin - 您正在尝试进行“反向地理编码”。您是否尝试过使用Bing 地图地理编码服务 API 文档中描述的 bing api

希望这有帮助(如果没有,也许你可以更具体地回答这个问题)。至少,搜索“反向地理编码 bing 地图”会有帮助。

祝你好运,
丹尼斯

Shaulin - You are trying to do "reverse geocoding". Have you tried to use the bing api's described in the Bing Map Geocode Service API docs

Hope this helps (if not, maybe you can be more specific with the question). At the very least, search for "reverse geocoding bing maps" will be helpful.

Good Luck,
Dennis

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文