[2.13.2][opt]全览地图中经纬度数据根据坐标系字段进行兼容转换

This commit is contained in:
chenfufeng
2023-01-12 17:06:21 +08:00
parent 7c5dd8f674
commit b4cddf8e45
4 changed files with 18 additions and 4 deletions

View File

@@ -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

View File

@@ -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())));

View File

@@ -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)"
}
}

View File

@@ -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