updateGeofence(params: Object)

⚠️

已废弃

register

版本要求:
MapKit≥3.0.1@ray-js/ray≥1.2.10
支持平台:
iOSAndroid
import { map } from '@ray-js/ray';

const { updateGeofence } = map;

// Promise 调用
try {
  const res = await updateGeofence({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

描述

更新地理围栏 权限: [scope.location]

参数

属性类型必填说明
是注册的地理围栏
是取消的地理围栏
complete() => void否接口调用结束的回调函数(调用成功、失败都会执行)
success(params: Object) => void否接口调用成功的回调函数
fail(params: Object) => void否接口调用失败的回调函数
success 回调参数
属性类型说明MapKit 最低版本
successboolean更新成功v3.0.5
fail 回调参数
属性类型说明
errorMsgstring错误信息
errorCodestring | number错误码
错误扩展

返回值

无

示例代码

import { map } from '@ray-js/ray'

map.updateGeofence({
  registerGeoFence: [
    {
      geoTitle: "xx",
      longitude: 116.39747,
      latitude: 39.908823,
      radius: 200,
      geofenceId: "xx",
      type: 0,
    },
  ],
  unregisterGeoFence: [],
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});