zoukankan      html  css  js  c++  java
  • 百度地图定位API,精度提高

    我使用百度定位API DEMO上面好像就可以setCoorType("bd09ll");//百度地图坐标。
    然后我找了下从其它坐标体系迁移到百度坐标。

    问下:
    1、那我还能不能在百度定位API的基础上对定位进行优化?因为实测定位精度不怎么准确。
    2、定位时能否获取到小区或街道的名字呢? 而不是国家+省+市(县)+XXX路。。。


    坐标转换百度地图SDK采用的是百度自有的地理坐标系(bdll09),因此开发者在做位置标注的时候,需要将其他类型的坐标转换为百度坐标。相应的接口和转换方式如下:
    <span style="font-size:14px;">
    
    // 将GPS设备采集的原始GPS坐标转换成百度坐标
    CoordinateConverter converter = new CoordinateConverter();
    converter.from(CoordType.GPS);
    // sourceLatLng待转换坐标
    converter.coord(sourceLatLng);
    LatLng desLatLng = converter.convert();
    
    
    </span>



    我在使用百度定位API时
    <span style="font-size:14px;">
    
    LocationClientOption option = new LocationClientOption();
    option.setOpenGps(true);
    option.setLocationMode(LocationMode.Hight_Accuracy);//设置定位模式
    option.setAddrType("all");//返回的定位结果包含地址信息
    option.setCoorType("bd09ll");//返回的定位结果是百度经纬度,默认值gcj02国家测绘局坐标
    option.setScanSpan(5000);//设置发起定位请求的间隔时间为5000ms
    option.setIsNeedAddress(true);////返回的定位结果包含地址信息
    
    
    </span>

    from: http://tieba.baidu.com/p/3647860650


  • 相关阅读:
    SAP MM MIGO过账报错
    SAP MM MB5L事务代码'仅总计'选项初探
    SAP MM 巴西采购订单中的NCM Code
    SAP MM Storage Location Missing in MD04 Result?
    SAP MM 预留单据的历史修改记录?
    2018-8-10-上传代码-CodePlex
    2019-9-2-win10-uwp-九幽图床
    2018-2-13-win10-UWP-应用设置
    2018-2-13-win10-UWP-你写我读
    2018-2-13-win10-UWP-九幽登录
  • 原文地址:https://www.cnblogs.com/molashaonian/p/7445862.html
Copyright © 2011-2022 走看看