release: 1.0.9, add map language support
This commit is contained in:
@ -51,6 +51,8 @@ class AMapOptionsBuilder implements AMapOptionsSink, UISettingsSink {
|
||||
|
||||
private Object initialPolygons;
|
||||
|
||||
private String mapLanguage;
|
||||
|
||||
AMapPlatformView build(int id,
|
||||
Context context,
|
||||
BinaryMessenger binaryMessenger,
|
||||
@ -107,6 +109,8 @@ class AMapOptionsBuilder implements AMapOptionsSink, UISettingsSink {
|
||||
List<Object> polygonList = (List<Object>) initialPolygons;
|
||||
aMapPlatformView.getPolygonsController().addByList(polygonList);
|
||||
}
|
||||
|
||||
aMapPlatformView.getMapController().setMapLanguage(mapLanguage);
|
||||
return aMapPlatformView;
|
||||
} catch (Throwable e) {
|
||||
LogUtil.e(CLASS_NAME, "build", e);
|
||||
@ -242,5 +246,9 @@ class AMapOptionsBuilder implements AMapOptionsSink, UISettingsSink {
|
||||
this.initialPolygons = polygonsObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMapLanguage(String mapLanguage) {
|
||||
this.mapLanguage = mapLanguage;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,4 +58,11 @@ public interface AMapOptionsSink extends UISettingsSink {
|
||||
public void setInitialPolylines(Object initialPolylines);
|
||||
|
||||
public void setInitialPolygons(Object initialPolygons);
|
||||
|
||||
/**
|
||||
* 设置地图语言
|
||||
*
|
||||
* @param mapLanguage {@link com.amap.api.maps.AMap#CHINESE }, {@link com.amap.api.maps.AMap#ENGLISH }
|
||||
*/
|
||||
void setMapLanguage(String mapLanguage);
|
||||
}
|
||||
|
@ -355,6 +355,13 @@ public class MapController
|
||||
//不实现
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMapLanguage(String mapLanguage) {
|
||||
if (null != amap) {
|
||||
amap.setMapLanguage(mapLanguage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setLogoPosition(int logoPosition) {
|
||||
|
@ -293,6 +293,11 @@ public class ConvertUtil {
|
||||
if (null != logoLeftMargin) {
|
||||
sink.setLogoLeftMargin(toInt(logoLeftMargin));
|
||||
}
|
||||
|
||||
final Object mapLanguage = data.get("mapLanguage");
|
||||
if (null != mapLanguage) {
|
||||
sink.setMapLanguage(toString(mapLanguage));
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
LogUtil.e(CLASS_NAME, "interpretAMapOptions", e);
|
||||
}
|
||||
|
Reference in New Issue
Block a user