unregisterGeofence

⚠️

Deprecated

unregister

Requires:
MapKit≥3.0.1@ray-js/ray≥1.2.10
Platforms:
iOSAndroid
import { map } from '@ray-js/ray';

const { unregisterGeofence } = map;

// Promise usage
try {
  const res = await unregisterGeofence({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Method signature
unregisterGeofence(params: )
Minimum SDK versions
iOSThingSmartMapKitBizBundle
≥ 5.2.0
Androidcom.thingclips.smart:thingsmart-bizbundle-mapkit
≥ 5.2.0

Description

Unregister a geofence. Permission: [scope.location]

Parameters

PropertyTypeRequiredDefaultDescriptionMinimum SDK versions
geoTitlestringNo-Geofence name—
longitudenumberNo0.0Longitude—
latitudenumberNo0.0Latitude—
radiusnumberNo0Radius—
geofenceIdstringNo-id—
typenumberNo0Radius 0: enter geofence 1: leave geofence—
complete() => voidNo-Completion callback (executed on both success and failure)—
success() => voidNo-Callback on successful API call—
fail(params: Object) => voidNo-Failure callback—
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

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

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