提交 a1373633 authored 作者: 张国庆's avatar 张国庆

Update AMapLocationClientImpl.java

上级 d57fa9f4
......@@ -10,6 +10,7 @@ import com.amap.api.location.AMapLocationListener;
import com.amap.api.location.CoordinateConverter;
import com.amap.api.location.DPoint;
import java.util.HashMap;
import java.util.Map;
import io.flutter.plugin.common.EventChannel;
......@@ -38,6 +39,10 @@ public class AMapLocationClientImpl implements AMapLocationListener {
}
} catch (Exception e) {
e.printStackTrace();
Map<String, Object> result=new HashMap<>();
result.put("errorCode", -1);
result.put("errorInfo", "locationClient is error");
mEventSink.success(result);
}
}
......@@ -51,6 +56,10 @@ public class AMapLocationClientImpl implements AMapLocationListener {
}
} catch (Exception e) {
e.printStackTrace();
Map<String, Object> result=new HashMap<>();
result.put("errorCode", -1);
result.put("errorInfo", "locationClient is error");
mEventSink.success(result);
}
if (null != locationOption) {
locationClient.setLocationOption(locationOption);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论