[2.13.2][opt]全览地图中经纬度数据根据坐标系字段进行兼容转换
This commit is contained in:
@@ -39,7 +39,10 @@ data class V2XEvent(
|
||||
var radius: Double,
|
||||
|
||||
@SerializedName("poiType")
|
||||
var poiType: String?
|
||||
var poiType: String?,
|
||||
|
||||
@SerializedName("coordinateType")
|
||||
var coordinateType:Int? = null
|
||||
)
|
||||
|
||||
@Keep
|
||||
|
||||
@@ -268,7 +268,13 @@ public class AMapCustomView
|
||||
if (center != null) {
|
||||
center.getLon();
|
||||
MarkerOptions markerOption = new MarkerOptions();
|
||||
LatLng latLng = MarkerDrawerManager.INSTANCE.coordinateConverterWgsToGcj(mContext, center.getLat(), center.getLon());
|
||||
LatLng latLng;
|
||||
if (event.getCoordinateType() == null || event.getCoordinateType() == 0) {
|
||||
latLng = new LatLng(center.getLat(), center.getLon());
|
||||
} else {
|
||||
// wgs84坐标系需转成高德坐标系
|
||||
latLng = MarkerDrawerManager.INSTANCE.coordinateConverterWgsToGcj(mContext, center.getLat(), center.getLon());
|
||||
}
|
||||
markerOption.position(latLng);
|
||||
markerOption.anchor(0.13f, 1f);
|
||||
markerOption.icon(BitmapDescriptorFactory.fromBitmap(getV2XBitmap(event.getPoiType())));
|
||||
|
||||
Reference in New Issue
Block a user