|
- var aMap;
- function start() {
- if (aMap) {
- aMap.startLocation(function (ret, err) {
- if (ret.status) {
- console.log(JSON.stringify(ret));
- }
- });
- }
- }
- function end() {
- aMap.stopUpdatingLocation();
- }
- apiready = function () {
- //输出Log,Log将显示在APICloud Studio控制台
- console.log("Hello World! Hello APICloud!");
- aMap = api.require("aMapLBS");
- aMap.updateLocationPrivacy({
- privacyAgree: "didAgree",
- privacyShow: "didShow",
- containStatus: "didContain",
- });
- aMap.configManager(
- {
- accuracy: "hundredMeters",
- filter: 1,
- },
- function (ret, err) {
- if (ret.status) {
- console.log("定位管理器初始化成功!");
- }
- }
- );
- };
-
复制代码 |
|