提交 29f99a45 authored 作者: 祁增奎's avatar 祁增奎

Android增加经纬度

上级 3811c8ab
## 【3.0.1】 - 2021-12-02.
* 修复iOS和Android逆地理编码时经纬度为空问题
## 【3.0.0】 - 2021-11-23.
* AMapWidget初始化时需要传入高德隐私合规配置参数privacyStatement
* 高德SDK合规使用方案请参考:https://lbs.amap.com/news/sdkhgsy
......
......@@ -504,6 +504,7 @@ public class MapController
*/
@Override
public void onRegeocodeSearched(RegeocodeResult result, int code) {
LogUtil.i(CLASS_NAME, "getMyLocation===> res: " + amap.getMyLocation());
if (null != methodChannel) {
final Map<String, Object> arguments = new HashMap<>(2);
LogUtil.i(CLASS_NAME, "camera#searchRegeocode===> result: " + result);
......
......@@ -5,6 +5,8 @@ import android.util.Log;
import com.amap.api.services.core.AMapException;
import com.amap.api.services.core.PoiItem;
import com.amap.api.services.geocoder.RegeocodeAddress;
import com.amap.api.services.geocoder.RegeocodeQuery;
import com.amap.api.services.core.LatLonPoint;
import com.amap.api.services.geocoder.RegeocodeResult;
import com.amap.api.services.help.Tip;
import com.amap.api.services.poisearch.PoiResult;
......@@ -110,6 +112,14 @@ public class Utils {
result.put("country", address.getCountry());
result.put("neighborhood", address.getNeighborhood());
result.put("townCode", address.getTowncode());
RegeocodeQuery query = regeocode.getRegeocodeQuery();
if (query != null) {
LatLonPoint locationPoint = query.getPoint();
if (locationPoint != null) {
result.put("latitude", locationPoint.getLatitude());
result.put("longitude", locationPoint.getLongitude());
}
}
}
}
return result;
......
name: amap_flutter_map
description: 高德地图SDK Flutter插件
version: 3.0.0
version: 3.0.1
homepage: https://lbs.amap.com/
environment:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论