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);
  }
}