|
发表帖子
API/SDK版本号: |
安卓6.0 |
产品: |
定位 |
手机型号: |
|
使用接口: |
|
LatLng latLng = new LatLng(aMap.getMyLocation().getLatitude() ,aMap.getMyLocation().getLongitude());
aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng,18));
想用这两句代码实现默认地图中心在我定位的位置,但是aMap.getMyLocation()一直返回null,导致报错。ps:能够定位到我所在位置,但是怎么获取它的经纬度呢?我用的是高德5.1版本开发包。谢谢大家了。
|
|