地图模块适配
This commit is contained in:
@@ -7,6 +7,7 @@ import com.zhidaoauto.map.sdk.inner.CompileConfig;
|
||||
import com.zhidaoauto.map.sdk.inner.road.RoadResultController;
|
||||
|
||||
public class MapBox {
|
||||
private static final String TAG = "MapBox";
|
||||
static {
|
||||
System.loadLibrary("map");
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//package com.autonavi.nge.guidance;
|
||||
package com.autonavi.nge.guidance;//package com.autonavi.nge.guidance;
|
||||
//
|
||||
//import android.util.Log;
|
||||
//
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
package com.autonavi.nge.guidance
|
||||
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.zhidaoauto.map.sdk.R
|
||||
import com.zhidaoauto.map.sdk.inner.CompileConfig
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class RouteBookAdapter : BaseQuickAdapter<RouteBookItem, BaseViewHolder>(R.layout.routebook_child_item) {
|
||||
|
||||
private val TAG = javaClass.simpleName
|
||||
|
||||
|
||||
override fun getDefItemCount(): Int {
|
||||
return super.getDefItemCount()
|
||||
}
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: RouteBookItem) {
|
||||
if (CompileConfig.DEBUG) {
|
||||
Log.i(TAG, "routebookop--helper.adapterPosition:${helper.adapterPosition}")
|
||||
}
|
||||
when (helper.adapterPosition) {
|
||||
0 -> {
|
||||
helper.getView<LinearLayout>(R.id.routebook_child_item_info_ll).visibility = View.VISIBLE
|
||||
helper.getView<ImageView>(R.id.imgView).setImageResource(NaviDirRes.getResID(501))
|
||||
helper.getView<TextView>(R.id.orientation).text = "从${item.routeName?:"起点"}出发"
|
||||
helper.getView<TextView>(R.id.length).visibility = View.GONE
|
||||
}
|
||||
else -> {
|
||||
helper.getView<TextView>(R.id.orientation).text = item.routeName
|
||||
helper.getView<ImageView>(R.id.imgView).setImageResource(NaviDirRes.getResID(item.turnID))
|
||||
if (item.routeName == "目的地") {
|
||||
helper.getView<TextView>(R.id.length).visibility = View.GONE
|
||||
} else {
|
||||
helper.getView<TextView>(R.id.length).visibility = View.VISIBLE
|
||||
val i = item.routelength
|
||||
if (i > 1000) {
|
||||
val df = DecimalFormat("#.0")
|
||||
val string = df.format(i.toDouble() / 1000)
|
||||
val strs = string.split(".")
|
||||
if (strs.size >= 2 && strs[1] == "0") {
|
||||
helper.getView<TextView>(R.id.length).text = """继续前行${strs[0]}km${item.routeSpeech}""".trimIndent()
|
||||
} else {
|
||||
helper.getView<TextView>(R.id.length).text = """继续前行${string}km${item.routeSpeech}""".trimIndent()
|
||||
}
|
||||
} else {
|
||||
helper.getView<TextView>(R.id.length).text = """继续前行${i}m${item.routeSpeech}""".trimIndent()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//package com.autonavi.nge.guidance
|
||||
//
|
||||
//import android.util.Log
|
||||
//import android.view.View
|
||||
//import android.widget.ImageView
|
||||
//import android.widget.LinearLayout
|
||||
//import android.widget.TextView
|
||||
//import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
//import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
//import com.zhidaoauto.map.sdk.R
|
||||
//import com.zhidaoauto.map.sdk.inner.CompileConfig
|
||||
//import java.text.DecimalFormat
|
||||
//
|
||||
//class RouteBookAdapter : BaseQuickAdapter<RouteBookItem, BaseViewHolder>(R.layout.routebook_child_item) {
|
||||
//
|
||||
// private val TAG = javaClass.simpleName
|
||||
//
|
||||
//
|
||||
// override fun getDefItemCount(): Int {
|
||||
// return super.getDefItemCount()
|
||||
// }
|
||||
//
|
||||
// override fun convert(helper: BaseViewHolder, item: RouteBookItem) {
|
||||
// if (CompileConfig.DEBUG) {
|
||||
// Log.i(TAG, "routebookop--helper.adapterPosition:${helper.adapterPosition}")
|
||||
// }
|
||||
// when (helper.adapterPosition) {
|
||||
// 0 -> {
|
||||
// helper.getView<LinearLayout>(R.id.routebook_child_item_info_ll).visibility = View.VISIBLE
|
||||
// helper.getView<ImageView>(R.id.imgView).setImageResource(NaviDirRes.getResID(501))
|
||||
// helper.getView<TextView>(R.id.orientation).text = "从${item.routeName?:"起点"}出发"
|
||||
// helper.getView<TextView>(R.id.length).visibility = View.GONE
|
||||
// }
|
||||
// else -> {
|
||||
// helper.getView<TextView>(R.id.orientation).text = item.routeName
|
||||
// helper.getView<ImageView>(R.id.imgView).setImageResource(NaviDirRes.getResID(item.turnID))
|
||||
// if (item.routeName == "目的地") {
|
||||
// helper.getView<TextView>(R.id.length).visibility = View.GONE
|
||||
// } else {
|
||||
// helper.getView<TextView>(R.id.length).visibility = View.VISIBLE
|
||||
// val i = item.routelength
|
||||
// if (i > 1000) {
|
||||
// val df = DecimalFormat("#.0")
|
||||
// val string = df.format(i.toDouble() / 1000)
|
||||
// val strs = string.split(".")
|
||||
// if (strs.size >= 2 && strs[1] == "0") {
|
||||
// helper.getView<TextView>(R.id.length).text = """继续前行${strs[0]}km${item.routeSpeech}""".trimIndent()
|
||||
// } else {
|
||||
// helper.getView<TextView>(R.id.length).text = """继续前行${string}km${item.routeSpeech}""".trimIndent()
|
||||
// }
|
||||
// } else {
|
||||
// helper.getView<TextView>(R.id.length).text = """继续前行${i}m${item.routeSpeech}""".trimIndent()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.inner.marker
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.abs.marker.InfoWindowAdapter
|
||||
|
||||
class MarkerAdapterManager {
|
||||
|
||||
var mInfoWindowAdapter:InfoWindowAdapter? = null
|
||||
|
||||
private constructor(){
|
||||
|
||||
}
|
||||
|
||||
companion object {
|
||||
var mInstance: MarkerAdapterManager? = null
|
||||
fun getInstance(): MarkerAdapterManager {
|
||||
if (mInstance == null) {
|
||||
synchronized(MarkerAdapterManager::class.java) {
|
||||
if (mInstance == null) {
|
||||
mInstance = MarkerAdapterManager()
|
||||
}
|
||||
}
|
||||
}
|
||||
return mInstance!!
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.inner.marker
|
||||
|
||||
import android.graphics.Rect
|
||||
|
||||
class MarkerInfoViewClickController {
|
||||
private val TAG = javaClass.simpleName
|
||||
|
||||
private constructor() {
|
||||
|
||||
}
|
||||
|
||||
companion object {
|
||||
val instance by lazy { MarkerInfoViewClickController() }
|
||||
}
|
||||
|
||||
private val infoViewClickMap = HashMap<String, HashMap<Rect, IInfoViewClick>>()
|
||||
|
||||
fun add(markerId: String, rect: Rect, iInfoViewClick: IInfoViewClick) {
|
||||
var map: HashMap<Rect, IInfoViewClick>?
|
||||
if (infoViewClickMap.containsKey(markerId)) {
|
||||
map = infoViewClickMap.get(markerId)
|
||||
} else {
|
||||
map = HashMap<Rect, IInfoViewClick>()
|
||||
}
|
||||
map?.let {
|
||||
it.put(rect, iInfoViewClick)
|
||||
infoViewClickMap.put(markerId, it)
|
||||
}
|
||||
}
|
||||
|
||||
fun get(markerId: String): HashMap<Rect, IInfoViewClick>? {
|
||||
return infoViewClickMap.get(markerId)
|
||||
}
|
||||
|
||||
fun remove(markerId: String) {
|
||||
infoViewClickMap.remove(markerId)
|
||||
}
|
||||
|
||||
fun clear() {
|
||||
infoViewClickMap.clear()
|
||||
}
|
||||
}
|
||||
@@ -507,7 +507,7 @@ class MarkerNativeInterface(private val mMapController: IMapController): IMarker
|
||||
refreshMap()
|
||||
}
|
||||
|
||||
fun addDynamicAnchorPostion(id: String, points: List<LonLatPoint>, angle:Float, isGps:Boolean, current:Long, duration: Int) {
|
||||
fun addDynamicAnchorPostion(id: String, points: List<LonLatPoint>,angle:Float, isGps:Boolean,current:Long,duration: Int) {
|
||||
val data = MapTools.listToArray(points,!isGps)
|
||||
if(CompileConfig.DEBUG){
|
||||
Log.i(TAG,"markerop--addDynamicAnchorPostion:${id},${points},isGps:${isGps},duration:${duration}")
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.inner.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.StatFs;
|
||||
|
||||
import com.zhidaoauto.map.sdk.inner.controller.CommonController;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class CheckStorageSpaceTool {
|
||||
|
||||
private final static int MSG_CHKSDCARD = 0;
|
||||
private Context mContext;
|
||||
|
||||
public interface StorageSpaceListener {
|
||||
public void onLackSpace();
|
||||
}
|
||||
|
||||
private StorageSpaceListener mStorageSpaceListener;
|
||||
|
||||
private Handler mHandler = new Handler() {
|
||||
public void handleMessage(Message msg) {
|
||||
switch (msg.what) {
|
||||
case MSG_CHKSDCARD:
|
||||
checkStorageSpace();
|
||||
mHandler.sendEmptyMessageDelayed(MSG_CHKSDCARD, 1800000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public CheckStorageSpaceTool(Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
public void stopStorageSpaceListener(){
|
||||
mHandler.removeMessages(MSG_CHKSDCARD);
|
||||
}
|
||||
|
||||
public void setStorageSpaceListener(StorageSpaceListener storageSpaceListener){
|
||||
mStorageSpaceListener = storageSpaceListener;
|
||||
mHandler.removeMessages(MSG_CHKSDCARD);
|
||||
mHandler.sendEmptyMessageDelayed(MSG_CHKSDCARD, 3000);
|
||||
}
|
||||
|
||||
private boolean checkStorageSpace() {
|
||||
long avalible = 0;
|
||||
try {
|
||||
String dir = CommonController.getInstance().getWorkingDirectory();
|
||||
if (new File(dir).exists()) {
|
||||
StatFs fss = new StatFs(dir);
|
||||
avalible = (long) fss.getAvailableBlocks() * fss.getBlockSize();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
if (avalible < 1048576) {
|
||||
// if (avalible < 1000000000) {
|
||||
mStorageSpaceListener.onLackSpace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,6 @@ import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.autonavi.nge.guidance.RouteBook
|
||||
import com.autonavi.nge.guidance.RouteBookAdapter
|
||||
import com.autonavi.nge.obj.SubCategory
|
||||
import com.autonavi.nge.routing.RoutingProvider
|
||||
import com.zhidaoauto.map.sdk.R
|
||||
@@ -288,7 +287,7 @@ object Constant {
|
||||
Environment.MEDIA_MOUNTED
|
||||
) {
|
||||
mbExternalStorage = true
|
||||
res = context.externalCacheDir.absolutePath +"/map/"
|
||||
res = context.externalCacheDir?.absolutePath +"/map/"
|
||||
// res = (Environment.getExternalStorageDirectory().absolutePath
|
||||
// + "/Android/data/" + context.packageName+"/map/")
|
||||
} else {
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.zhidaoauto.map.sdk.inner.utils
|
||||
|
||||
import android.content.Context
|
||||
import com.amap.api.location.CoordinateConverter
|
||||
import com.amap.api.location.CoordinateConverter.CoordType
|
||||
import com.amap.api.location.DPoint
|
||||
import com.zhidaoauto.map.sdk.inner.abs.IMapController
|
||||
import java.math.BigDecimal
|
||||
|
||||
@@ -201,41 +198,10 @@ object TransformUtils {
|
||||
}
|
||||
|
||||
|
||||
fun tempTrans(param:DoubleArray,context: Context?){
|
||||
var doubleArrayParam = param
|
||||
// System.out.println("origin:${doubleArrayParam.joinToString() }");
|
||||
transform(doubleArrayParam,context)
|
||||
// System.out.println("middle:${index},${if(index%2==0){"GPS:"}else{"GCJ:"}}--${doubleArrayParam.joinToString()}")
|
||||
// System.out.println("result:${doubleArrayParam.joinToString()}")
|
||||
}
|
||||
|
||||
|
||||
fun transform(doubleArray: DoubleArray,context: Context?){
|
||||
System.out.println("origin:${doubleArray.joinToString()}")
|
||||
val point = gd_Transform(context, DPoint(doubleArray[1],doubleArray[0]))
|
||||
val gdarray = doubleArrayOf(point.longitude,point.latitude)
|
||||
System.out.println("gaode:${gdarray.joinToString()}")
|
||||
|
||||
val mogo = transformWgs84ToGcj02(doubleArray[1], doubleArray[0])
|
||||
System.out.println("mogo:${mogo.joinToString()}")
|
||||
|
||||
val gaodetoOrigin = transformGcj02toWgs84(gdarray[1], gdarray[0])
|
||||
System.out.println("gaode-to-origin:${gaodetoOrigin.joinToString()}")
|
||||
|
||||
val mogotoOrigin = transformGcj02toWgs84(mogo[1], mogo[0])
|
||||
System.out.println("mogo-to-origin:${mogotoOrigin.joinToString()}")
|
||||
}
|
||||
|
||||
|
||||
fun gd_Transform(context: Context?,sourceLatLng:DPoint):DPoint{
|
||||
val converter = CoordinateConverter(context)
|
||||
// CoordType.GPS 待转换坐标类型
|
||||
converter.from(CoordType.GPS)
|
||||
// sourceLatLng待转换坐标点 LatLng类型
|
||||
converter.coord(sourceLatLng)
|
||||
// 执行转换操作
|
||||
return converter.convert()
|
||||
}
|
||||
|
||||
fun outOfScreen(context: Context, lon: Double, lat: Double,mapController: IMapController?): Boolean{
|
||||
val displayMetrics = context.resources.getDisplayMetrics()
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.data
|
||||
|
||||
class CityInfo{
|
||||
var cityCode: Int = 0
|
||||
var chineseCityName: String = ""
|
||||
var englishCityName: String = ""
|
||||
var isCache: Boolean = false
|
||||
override fun toString(): String {
|
||||
return "CityInfo(cityCode=$cityCode, chineseCityName='$chineseCityName', englishCityName='$englishCityName', isCache=$isCache)"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ object MapDataApi {
|
||||
return mContext
|
||||
}
|
||||
|
||||
fun startZeus(context: Context) {
|
||||
fun startZeus(context: Context?) {
|
||||
if (CompileConfig.DEBUG) {
|
||||
Log.i(TAG, "mapop-start")
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.data
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
|
||||
class SinglePointRoadInfo {
|
||||
var tileId: Long? = null
|
||||
var roadId: Long? = null
|
||||
// 车道编号:
|
||||
//按照参考线数字化方向从左到右、从大到小编号; 中心线编号为0, 中心线右侧编号为负数,中心线左侧编号为正数。如:一个双向6车道通行Road的车道编号, 3,2,1,0,-1,-2,-3
|
||||
var laneNo: Int? = null
|
||||
//车道宽度
|
||||
var laneWidth: Float? = null
|
||||
//当前车道信息
|
||||
var coords: ArrayList<LonLatPoint>? = null
|
||||
//剩余车道信息
|
||||
var leftCoords: ArrayList<LonLatPoint>? = null
|
||||
//剩余车道长度
|
||||
var leftLen: Float? = null
|
||||
override fun toString(): String {
|
||||
return "SinglePointRoadInfo(tileId=$tileId, roadId=$roadId, laneNo=$laneNo, laneWidth=$laneWidth, coords=$coords, leftCoords=$leftCoords, leftLen=$leftLen)"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -122,17 +122,23 @@ class TmcBarView : View {
|
||||
////计算tmcBar在绘制过程中每一小段的长度
|
||||
val itemHeight = Math.round(trafficStatus.getLength() * rateDistanceToViewHeight * 100.0f) * 0.01f
|
||||
realDistanceSum += itemHeight
|
||||
canvas.drawRect(0.0f, realDistanceSum - itemHeight, width.toFloat(), realDistanceSum, getPaintInColor(getColor(trafficStatus.getStatus())))
|
||||
getPaintInColor(getColor(trafficStatus.getStatus()))?.let {
|
||||
canvas.drawRect(0.0f, realDistanceSum - itemHeight, width.toFloat(), realDistanceSum, it)
|
||||
}
|
||||
--tmcBarLength
|
||||
}
|
||||
tmcBarLength = height + (mCarHeight shr 1)
|
||||
//补全光柱图,使用颜色==第一段的颜色
|
||||
if (realDistanceSum < tmcBarLength.toFloat()) {
|
||||
canvas.drawRect(0.0f, realDistanceSum, width.toFloat(), tmcBarLength.toFloat(), getPaintInColor(getColor((mTmcBarItems!![0]).getStatus())))
|
||||
getPaintInColor(getColor((mTmcBarItems!![0]).getStatus()))?.let {
|
||||
canvas.drawRect(0.0f, realDistanceSum, width.toFloat(), tmcBarLength.toFloat(), it)
|
||||
}
|
||||
}
|
||||
//补全光柱图,使用颜色==第一段的颜色
|
||||
if (this.height.toFloat() > mCursorPos) {
|
||||
canvas.drawRect(0.0f, mCursorPos + (mCarHeight shr 1).toFloat(), width.toFloat(), this.height.toFloat(), getPaintInColor(getColor(-1)))
|
||||
getPaintInColor(getColor(-1))?.let {
|
||||
canvas.drawRect(0.0f, mCursorPos + (mCarHeight shr 1).toFloat(), width.toFloat(), this.height.toFloat(), it)
|
||||
}
|
||||
}
|
||||
if (mTmcBarListener != null) {
|
||||
mTmcBarListener!!.dismissBottomTag()
|
||||
|
||||
@@ -12,13 +12,13 @@ import kotlinx.android.synthetic.main.view_trafficbar.view.tmcBarTxt
|
||||
import kotlinx.android.synthetic.main.view_trafficbar.view.tmcBarView
|
||||
|
||||
class TrafficProgressBar : FrameLayout {
|
||||
constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super(context, attrs, defStyle) {
|
||||
constructor(context: Context, attrs: AttributeSet?, defStyle: Int) : super(context, attrs, defStyle) {
|
||||
init()
|
||||
}
|
||||
constructor(context: Context?) : super(context) {
|
||||
constructor(context: Context) : super(context) {
|
||||
init()
|
||||
}
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
|
||||
init()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.query;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class LonLatPoint implements Serializable {
|
||||
|
||||
@JSONField(name="lon")
|
||||
private double longitude;
|
||||
@JSONField(name="lat")
|
||||
private double latitude;
|
||||
@JSONField(name="alt")
|
||||
private double altitude;
|
||||
@JSONField(serialize = false)
|
||||
private int duration;
|
||||
@JSONField(serialize = false)
|
||||
private double angle = 0;
|
||||
@JSONField(serialize = false)
|
||||
private String provider;
|
||||
@JSONField(serialize = false)
|
||||
private double distance;
|
||||
@JSONField(serialize = false)
|
||||
private double speed;
|
||||
private long satelliteTime;
|
||||
|
||||
private boolean isConvertAngle = true;
|
||||
|
||||
public LonLatPoint() {
|
||||
}
|
||||
|
||||
public LonLatPoint(double longitude, double latitude) {
|
||||
this.longitude = longitude;
|
||||
this.latitude = latitude;
|
||||
}
|
||||
public LonLatPoint(double longitude, double latitude, double angle) {
|
||||
this.longitude = longitude;
|
||||
this.latitude = latitude;
|
||||
this.angle = angle;
|
||||
}
|
||||
public LonLatPoint(double longitude, double latitude, double altitude,double angle) {
|
||||
this.longitude = longitude;
|
||||
this.latitude = latitude;
|
||||
this.altitude = altitude;
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public String getProvider() {
|
||||
return provider;
|
||||
}
|
||||
|
||||
public void setProvider(String provider) {
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public void setDuration(int duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public double getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(double longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public double getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(double latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public double getAltitude() {
|
||||
return altitude;
|
||||
}
|
||||
|
||||
public void setAltitude(double altitude) {
|
||||
this.altitude = altitude;
|
||||
}
|
||||
|
||||
public double getAngle() {
|
||||
return angle;
|
||||
}
|
||||
|
||||
public void setAngle(double angle) {
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public double getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(double distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
public boolean isConvertAngle() {
|
||||
return isConvertAngle;
|
||||
}
|
||||
|
||||
public void setConvertAngle(boolean convertAngle) {
|
||||
isConvertAngle = convertAngle;
|
||||
}
|
||||
|
||||
public long getSatelliteTime() {
|
||||
return satelliteTime;
|
||||
}
|
||||
|
||||
public void setSatelliteTime(long satelliteTime) {
|
||||
this.satelliteTime = satelliteTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{" +
|
||||
"lon=" + longitude +
|
||||
", lat=" + latitude +
|
||||
", angle=" + angle +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
|
||||
|
||||
class CenterLine {
|
||||
var id = "" //id
|
||||
var tile_id ="" //瓦片id
|
||||
var road_id = ""//道路id
|
||||
var lane_id = ""//车道id
|
||||
var points: MutableList<LonLatPoint>? = null//道路经纬度
|
||||
var angle: Double? = 0.0//道路角度
|
||||
|
||||
|
||||
constructor(id: String, tile_id: String, road_id: String, lane_id: String, points: MutableList<LonLatPoint>?) {
|
||||
this.id = id
|
||||
this.tile_id = tile_id
|
||||
this.road_id = road_id
|
||||
this.lane_id = lane_id
|
||||
this.points = points
|
||||
}
|
||||
|
||||
constructor()
|
||||
|
||||
|
||||
override fun toString(): String {
|
||||
return "CenterLine(id='$id', tile_id='$tile_id', road_id='$road_id', lane_id='$lane_id', points=$points, angle=$angle)"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
|
||||
|
||||
class Lane {
|
||||
var laneId: Int = 0
|
||||
var laneWidth: Float = 0f
|
||||
var laneLatLonPoints: List<LonLatPoint> = ArrayList<LonLatPoint>()
|
||||
|
||||
override fun toString(): String {
|
||||
return "SubLaneInfo(laneId='$laneId', laneWidth=$laneWidth, laneLatlonPoints=$laneLatLonPoints)"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
class RoadCross {
|
||||
var status = 0 // 0: 不在路口 1:在路口
|
||||
var tile_id ="" //起始路口tile id或当前路口tile id
|
||||
var cross_id = ""//起始路口id或当前路口tile id
|
||||
var tile_id_end = ""//结束路口tile id
|
||||
var cross_id_end = ""//结束路口id
|
||||
override fun toString(): String {
|
||||
return "RoadCross(status=$status, tile_id='$tile_id', cross_id='$cross_id', tile_id_end='$tile_id_end', cross_id_end='$cross_id_end')"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
class RoadNameInfo {
|
||||
var tile_id ="" //瓦片id
|
||||
var road_id = ""//道路id
|
||||
var road_name = ""//道路名称
|
||||
override fun toString(): String {
|
||||
return "RoadNameInfo(tile_id='$tile_id', road_id='$road_id', road_name='$road_name')"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
|
||||
class RoadRect {
|
||||
var topLeft: LonLatPoint? = null
|
||||
var topRight: LonLatPoint? = null
|
||||
var bottomLeft: LonLatPoint? = null
|
||||
var bottomRight: LonLatPoint? = null
|
||||
override fun toString(): String {
|
||||
return "RoadRect(topLeft=$topLeft, topRight=$topRight, bottomLeft=$bottomLeft, bottomRight=$bottomRight)"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
class RoadRectInfos {
|
||||
var angle = 0.0//道路弯曲程度
|
||||
var roadRects: ArrayList<RoadRect>? = null
|
||||
override fun toString(): String {
|
||||
return "RoadRectInfos(angle=$angle, roadRects=$roadRects)"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
class RoadSign {
|
||||
var id = 0
|
||||
var tileId = 0
|
||||
var roadId = 0
|
||||
var type = 0
|
||||
var shape = 0
|
||||
var color = 0
|
||||
var content = 0
|
||||
var position: ArrayList<RoadSignPostion>? = null
|
||||
override fun toString(): String {
|
||||
return "RoadSign(tileId=$tileId, roadId=$roadId, type=$type, shape=$shape, color=$color, content=$content, position=$position)"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
class RoadSignPostion {
|
||||
var lon = 0.0
|
||||
var lat = 0.0
|
||||
var hight = 0.0
|
||||
override fun toString(): String {
|
||||
return "RoadSignPostion(lon=$lon, lat=$lat, hight=$hight)"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
class RouteInfo {
|
||||
|
||||
var routeLines: ArrayList<RouteLine>? = null
|
||||
override fun toString(): String {
|
||||
return "RouteInfo{" +
|
||||
"routeLines=" + routeLines +
|
||||
'}'
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
|
||||
|
||||
class RouteLine {
|
||||
var funcRoadClass = 0
|
||||
var linkType = 0
|
||||
var linkDir = 0
|
||||
var ferry = false
|
||||
var tunnel = false
|
||||
var bridge = false
|
||||
var name: String? = null
|
||||
var CoorArray: ArrayList<LonLatPoint>? = null
|
||||
override fun toString(): String {
|
||||
return "RouteLine{" +
|
||||
"funcRoadClass=" + funcRoadClass +
|
||||
", linkType=" + linkType +
|
||||
", linkDir=" + linkDir +
|
||||
", ferry=" + ferry +
|
||||
", tunnel=" + tunnel +
|
||||
", bridge=" + bridge +
|
||||
", name='" + name + '\'' +
|
||||
", CoorArraySize=" + CoorArray!!.size +
|
||||
", CoorArray=" + CoorArray +
|
||||
'}'
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
|
||||
|
||||
class StopLine {
|
||||
var tile_id =""//瓦片id
|
||||
var road_id: List<String>? = null//道路id
|
||||
var lane_id: List<String>? = null//车道id
|
||||
var length = 0.0//停止线长度
|
||||
var points: ArrayList<LonLatPoint>? = null//停止线经纬度
|
||||
var distance = 0.0//自车到停止线距离
|
||||
override fun toString(): String {
|
||||
return "StopLine(tile_id='$tile_id', road_id=$road_id, lane_id=$lane_id, length=$length, points=$points, distance=$distance)"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.road
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
|
||||
|
||||
class ZebraLine {
|
||||
var dis = 0f
|
||||
var tileId = ""
|
||||
var id = ""
|
||||
var zebraLineList = mutableListOf<LonLatPoint>()
|
||||
override fun toString(): String {
|
||||
return "ZebraLine(dis=$dis, tileId='$tileId', id='$id', zebraLineList=$zebraLineList)"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.routeinfo
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField
|
||||
|
||||
class LineLonLat {
|
||||
|
||||
@JSONField(name="t")
|
||||
var lat: Double = 0.0
|
||||
|
||||
@JSONField(name="n")
|
||||
var lon: Double = 0.0
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.routeinfo;
|
||||
|
||||
public class RoadInfo {
|
||||
|
||||
private long tileID;
|
||||
private long roadID;
|
||||
private int speed;
|
||||
|
||||
public long getTileID() {
|
||||
return tileID;
|
||||
}
|
||||
|
||||
public void setTileID(long tileID) {
|
||||
this.tileID = tileID;
|
||||
}
|
||||
|
||||
public long getRoadID() {
|
||||
return roadID;
|
||||
}
|
||||
|
||||
public void setRoadID(long roadID) {
|
||||
this.roadID = roadID;
|
||||
}
|
||||
|
||||
public int getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(int speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.routeinfo;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class SPRouteLine {
|
||||
@JSONField(name="f")
|
||||
public int funcRoadClass;
|
||||
@JSONField(name="l")
|
||||
public int linkType;
|
||||
@JSONField(name="d")
|
||||
public int linkDir;
|
||||
@JSONField(name="e")
|
||||
public int ferry;
|
||||
@JSONField(name="t")
|
||||
public int tunnel;
|
||||
@JSONField(name="b")
|
||||
public int bridge;
|
||||
@JSONField(name="c")
|
||||
public ArrayList<LineLonLat> coorArray;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RouteLine{" +
|
||||
"funcRoadClass=" + funcRoadClass +
|
||||
", linkType=" + linkType +
|
||||
", linkDir=" + linkDir +
|
||||
", ferry=" + ferry +
|
||||
", tunnel=" + tunnel +
|
||||
", bridge=" + bridge +
|
||||
", CoorArraySize=" + coorArray.size() +
|
||||
", CoorArray=" + coorArray +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.routeinfo;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class TileLine {
|
||||
@JSONField(name="ls")
|
||||
public ArrayList<SPRouteLine> ls;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package com.zhidaoauto.map.sdk.open.routeinfo
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField
|
||||
|
||||
class TilesInfo {
|
||||
@JSONField(name="tiles")
|
||||
var tiles: ArrayList<TileLine>? = null
|
||||
}
|
||||
@@ -53,10 +53,12 @@ dependencies {
|
||||
// 高精地图
|
||||
// implementation rootProject.ext.dependencies.mogocustommap
|
||||
implementation project(':libraries:mapmodule')
|
||||
implementation 'com.zhidaoauto.machine:data:1.0.0.1'
|
||||
// 高德地图
|
||||
// api rootProject.ext.dependencies.amaplocation
|
||||
api rootProject.ext.dependencies.amapnavi3dmap
|
||||
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogomapapi
|
||||
|
||||
@@ -60,7 +60,6 @@ import com.mogo.map.utils.ObjectUtils;
|
||||
import com.mogo.map.utils.ResIdCache;
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi;
|
||||
import com.zhidaoauto.map.sdk.open.abs.IResult;
|
||||
import com.zhidaoauto.map.sdk.open.abs.MapStatusListener;
|
||||
import com.zhidaoauto.map.sdk.open.abs.OnCameraChangeListener;
|
||||
import com.zhidaoauto.map.sdk.open.abs.OnHdDataDownByCityListener;
|
||||
import com.zhidaoauto.map.sdk.open.abs.OnMapClickListener;
|
||||
@@ -75,16 +74,12 @@ import com.zhidaoauto.map.sdk.open.business.PointCloudHelper;
|
||||
import com.zhidaoauto.map.sdk.open.camera.CameraPosition;
|
||||
import com.zhidaoauto.map.sdk.open.camera.CameraUpdateFactory;
|
||||
import com.zhidaoauto.map.sdk.open.camera.LatLngBounds;
|
||||
import com.zhidaoauto.map.sdk.open.data.CityInfo;
|
||||
import com.zhidaoauto.map.sdk.open.data.MapDataApi;
|
||||
import com.zhidaoauto.map.sdk.open.location.LocationClient;
|
||||
import com.zhidaoauto.map.sdk.open.location.MyLocationStyle;
|
||||
import com.zhidaoauto.map.sdk.open.marker.BitmapDescriptorFactory;
|
||||
import com.zhidaoauto.map.sdk.open.marker.Marker;
|
||||
import com.zhidaoauto.map.sdk.open.marker.OnMarkClickListener;
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint;
|
||||
import com.zhidaoauto.map.sdk.open.road.RoadCross;
|
||||
import com.zhidaoauto.map.sdk.open.road.StopLine;
|
||||
import com.zhidaoauto.map.sdk.open.tools.MapTools;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoViewHelper;
|
||||
|
||||
@@ -2,12 +2,8 @@ package com.mogo.map;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Point;
|
||||
import android.util.Pair;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.center.CenterLine;
|
||||
import com.mogo.map.overlay.proxy.line.IMapPolylineOverlay;
|
||||
import com.mogo.map.overlay.proxy.point.IMapPointOverlay;
|
||||
import com.mogo.map.overlay.wrapper.point.AMapPointWrapper;
|
||||
@@ -15,7 +11,6 @@ import com.mogo.map.road.RoadNameInfo;
|
||||
import com.mogo.map.uicontroller.AMapUIController;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.map.utils.ObjectUtils;
|
||||
import com.zhidaoauto.map.sdk.open.abs.IResult;
|
||||
import com.zhidaoauto.map.sdk.open.data.MapDataApi;
|
||||
import com.zhidaoauto.map.sdk.open.data.SinglePointRoadInfo;
|
||||
import com.zhidaoauto.map.sdk.open.marker.BatchMarkerOptions;
|
||||
@@ -24,15 +19,12 @@ import com.zhidaoauto.map.sdk.open.marker.MarkerOptions;
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerSimpleData;
|
||||
import com.zhidaoauto.map.sdk.open.poyline.Polyline;
|
||||
import com.zhidaoauto.map.sdk.open.poyline.PolylineOptions;
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint;
|
||||
import com.zhidaoauto.map.sdk.open.tools.MapTools;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoViewHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.mogo.eagle.core.data.map.CenterLine
|
||||
import com.mogo.map.utils.ObjectUtils
|
||||
import com.zhidaoauto.map.sdk.open.abs.IResult
|
||||
import com.zhidaoauto.map.sdk.open.data.MapDataApi
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
import com.zhidaoauto.map.sdk.open.road.RoadRectInfos
|
||||
import com.zhidaoauto.map.sdk.open.routeinfo.RoadInfo
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.mogo.map.overlay.point.Point.Options
|
||||
import com.mogo.map.overlay.proxy.point.*
|
||||
import com.mogo.map.utils.ObjectUtils
|
||||
import com.zhidaoauto.map.sdk.open.marker.*
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.map.utils;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.exception.MogoMapException;
|
||||
import com.zhidaoauto.map.sdk.open.camera.LatLngBounds;
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.zhidaoauto.map.sdk.open.marker.BitmapDescriptorFactory;
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerOptions;
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerSimpleData;
|
||||
import com.zhidaoauto.map.sdk.open.poyline.PolylineOptions;
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
Reference in New Issue
Block a user