This commit is contained in:
zhongchao
2022-04-08 12:27:43 +08:00
parent 1b72b6c9a2
commit c06b17cb82
9 changed files with 274 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
package com.mogo.map;
import com.mogo.eagle.core.data.traffic.TrafficData;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.map.overlay.IMogoPolyline;

View File

@@ -352,4 +352,10 @@ public interface IMogoMapUIController {
* 设置地图视线角度
*/
void setMapDAngle(float angle);
/**
* 获取行车方向
* @return
*/
float getAngle(double startLon, double startLat, double endLon, double endLat);
}

View File

@@ -1079,4 +1079,9 @@ public class AMapViewWrapper implements IMogoMapView,
mMapView.getMapAutoViewHelper().setMapDAngle(angle);
}
@Override
public float getAngle(double startLon, double startLat, double endLon, double endLat) {
return MapAutoApi.INSTANCE.getAngle(startLon,startLat,endLon,endLat);
}
}

View File

@@ -454,4 +454,13 @@ public class MogoMapUIController implements IMogoMapUIController {
mDelegate.setMapDAngle(angle);
}
}
@Override
public float getAngle(double startLon, double startLat, double endLon, double endLat) {
initDelegate();
if (mDelegate != null) {
return mDelegate.getAngle(startLon, startLat, endLon, endLat);
}
return 0.0f;
}
}

View File

@@ -374,4 +374,12 @@ public class AMapUIController implements IMogoMapUIController {
mClient.setMapDAngle(angle);
}
}
@Override
public float getAngle(double startLon, double startLat, double endLon, double endLat) {
if (mClient != null) {
return mClient.getAngle(startLon,startLat,endLon,endLat);
}
return 0;
}
}