|
- bMap.getLocation({
- accuracy: '10m',
- autoStop: false,
- filter: 1,
- enableLocInForeground: true,
- notification:
- {
- id: 1, //(必选项) 数字类型;为通知栏notifation设置唯一id,必须大于0
- contentTitle: '标题', //(必选项) 字符串类型;标题
- contentText: '内容' //(必选项) 字符串类型;内容
- }
- }, function (ret, err) {
- console.warn(JSON.stringify(ret));
- i++;
- console.log(i)
- // if (ret.status) {
- // lon = ret.lon;
- // lat = ret.lat;
- // bMap.getNameFromCoords({
- // lon: lon,
- // lat: lat
- // }, function (ret, err) {
- // console.warn(JSON.stringify(ret));
- // // console.warn(JSON.stringify(err));
- // });
- // //open_bmap(lon, lat);
- // }
- });
复制代码 |
|