[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())));
|
||||
|
||||
@@ -434,8 +434,10 @@ class V2XMarkerExploreWay: Serializable {
|
||||
*/
|
||||
var infoCheckNode = 0
|
||||
|
||||
var coordinateType: Int? = null
|
||||
|
||||
override fun toString(): String {
|
||||
return "V2XMarkerExploreWay(infoId=$infoId, type=$type, poiType=$poiType, sn=$sn, location=$location, direction=$direction, canLive=$canLive, fileType=$fileType, addr=$addr, generateTime=$generateTime, cityName=$cityName, distance=$distance, userInfo=$userInfo, items=$items, uploadType=$uploadType, isFabulous=$isFabulous, infoCheckNode=$infoCheckNode)"
|
||||
return "V2XMarkerExploreWay(infoId=$infoId, type=$type, poiType=$poiType, sn=$sn, location=$location, direction=$direction, canLive=$canLive, fileType=$fileType, addr=$addr, generateTime=$generateTime, cityName=$cityName, distance=$distance, userInfo=$userInfo, items=$items, uploadType=$uploadType, isFabulous=$isFabulous, infoCheckNode=$infoCheckNode, coordinateType=$coordinateType)"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user