destroyLocation method

void destroyLocation({
  1. required String clientKey,
})

摧毁持续定位

Implementation

void destroyLocation({required String clientKey}) {
  //地图上开启定位(持续定位)必须跟随销毁,否则UI显示时会报错
  if (clientMap.containsKey(clientKey)) {
    clientMap[clientKey]?.stopLocation();
    clientMap[clientKey]?.destroy();
    currentLocation = null;
    clientMap.remove(clientKey);
  }
}