|
[插件使用]
aMap 安卓定位经纬度一直是0 ,ios上没有这个问题
[复制链接]
- apiready = function() {
- var aMap = api.require('aMap');
- aMap.open({
- rect: {
- x: 0,
- y: 0,
- w: 'auto',
- h: api.pageParam.h
- },
- showUserLocation: true,
- zoomLevel: 11,
- center: {
- lon: 116.4021310000,
- lat: 39.9994480000
- },
- fixedOn: api.frameName,
- fixed: true
- }, function(ret, err) {
- if (ret.status) {
- alert(JSON.stringify(ret));
- aMap.getLocation(function(ret1, err1) {
- if (ret1.status) {
- alert(JSON.stringify(ret1));
- console.log(JSON.stringify(ret1));
- } else {
- alert(JSON.stringify(err1));
- console.log(JSON.stringify(ret1));
- }
- });
- } else {
- alert(JSON.stringify(err));
- }
- });
- }
复制代码
|
|