【问题标题】:get address (zipcode) auto geolacate using bing map api?使用 bing map api 获取地址(邮政编码)自动地理定位?
【发布时间】:2017-01-26 22:58:43
【问题描述】:

如何使用 bing map api 获取地址(邮政编码)自动地理定位?

在下面找到此代码但无法正常工作

        $.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
        }
    })

有谁知道如何完成它?提前感谢您提供工作示例

【问题讨论】:

    标签: javascript jquery geolocation bing-maps bing


    【解决方案1】:

    看起来您缺少 dataType 参数。看看这个文档:https://msdn.microsoft.com/en-US/library/mt793281.aspx 它有一个用于访问 Bing 地图 REST 服务的 jQuery 示例。

    【讨论】:

    • 那么您传入的纬度/经度值是多少。可能没有该位置可用的任何地址信息。
    • 自动定位纬度/经度以获取邮政编码
    • 如果坐标不在道路约 150 米范围内,则反向地理编码服务不会返回任何数据。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-26
    • 1970-01-01
    • 2017-10-04
    相关资源
    最近更新 更多