toAMapLocationErrorCode method

AMapLocationErrorCode toAMapLocationErrorCode()

Implementation

AMapLocationErrorCode toAMapLocationErrorCode() {
  switch (this) {
    case 1: return AMapLocationErrorCode.AMapLocationErrorUnknown;
    case 2: return AMapLocationErrorCode.AMapLocationErrorLocateFailed;
    case 3: return AMapLocationErrorCode.AMapLocationErrorReGeocodeFailed;
    case 4: return AMapLocationErrorCode.AMapLocationErrorTimeOut;
    case 5: return AMapLocationErrorCode.AMapLocationErrorCanceled;
    case 6: return AMapLocationErrorCode.AMapLocationErrorCannotFindHost;
    case 7: return AMapLocationErrorCode.AMapLocationErrorBadURL;
    case 8: return AMapLocationErrorCode.AMapLocationErrorNotConnectedToInternet;
    case 9: return AMapLocationErrorCode.AMapLocationErrorCannotConnectToHost;
    case 10: return AMapLocationErrorCode.AMapLocationErrorRegionMonitoringFailure;
    case 11: return AMapLocationErrorCode.AMapLocationErrorRiskOfFakeLocation;
    case 12: return AMapLocationErrorCode.AMapLocationErrorNoFullAccuracyAuth;
    default: return AMapLocationErrorCode.values[this + 1];
  }
}