[3.4.0-map-sdk] update ,wait to test
This commit is contained in:
@@ -1,127 +1,119 @@
|
||||
package com.mogo.map.uicontroller;
|
||||
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RawRes;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
|
||||
import java.util.List;
|
||||
package com.mogo.map.uicontroller
|
||||
|
||||
import android.graphics.Point
|
||||
import android.graphics.Rect
|
||||
import android.view.View
|
||||
import androidx.annotation.RawRes
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-26
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
* 地图UI控制
|
||||
*/
|
||||
public interface IMogoMapUIController {
|
||||
|
||||
|
||||
interface IMogoMapUIController {
|
||||
/**
|
||||
* 修改缩放级别
|
||||
*/
|
||||
MapControlResult changeZoom(float zoom);
|
||||
|
||||
fun changeZoom(zoom: Float): MapControlResult
|
||||
|
||||
/**
|
||||
* 修改缩放级别的另一种方式
|
||||
* @param zoom 缩放比例
|
||||
*/
|
||||
void changeZoom2(float zoom);
|
||||
fun changeZoom2(zoom: Float)
|
||||
|
||||
/**
|
||||
* 进入VR 模式
|
||||
* 进入黑夜/白天 模式
|
||||
*
|
||||
* @param isDayMode true-白天模式,false-夜间模式
|
||||
*/
|
||||
void stepInVrMode(boolean isDayMode);
|
||||
fun stepInDayMode(isDayMode: Boolean)
|
||||
|
||||
/**
|
||||
* 切换3D模式下远距,中距,近距视角
|
||||
*
|
||||
* @param angelMode {@link VisualAngleMode}
|
||||
* @param angelMode [VisualAngleMode]
|
||||
*/
|
||||
void changeMapVisualAngle(VisualAngleMode angelMode, MogoLatLng mogoLatLng);
|
||||
fun changeMapVisualAngle(angelMode: VisualAngleMode, mogoLatLng: MogoLatLng?)
|
||||
|
||||
/**
|
||||
* 设置漫游路径
|
||||
* @param trajectory
|
||||
*/
|
||||
void setRoamTrajectory(String trajectory);
|
||||
fun setRoamTrajectory(trajectory: String)
|
||||
|
||||
/**
|
||||
* 设置漫游模式 , 0:自由漫游,1:路径漫游
|
||||
*/
|
||||
void setRomaMode(int mode);
|
||||
fun setRomaMode(mode: Int)
|
||||
|
||||
/**
|
||||
* 获得当前地图视距模式
|
||||
*
|
||||
* @return {@link VisualAngleMode}
|
||||
* @return [VisualAngleMode]
|
||||
*/
|
||||
VisualAngleMode getCurrentMapVisualAngle();
|
||||
val currentMapVisualAngle: VisualAngleMode
|
||||
|
||||
/**
|
||||
* 将地图移动至当前位置
|
||||
*/
|
||||
default void moveToCenter(MogoLatLng latLng) {
|
||||
moveToCenter(latLng, false);
|
||||
fun moveToCenter(latLng: MogoLatLng) {
|
||||
moveToCenter(latLng, false)
|
||||
}
|
||||
|
||||
/**
|
||||
* 将地图移动至当前位置
|
||||
*/
|
||||
void moveToCenter(MogoLatLng latLng, boolean animate);
|
||||
fun moveToCenter(latLng: MogoLatLng, animate: Boolean)
|
||||
|
||||
/**
|
||||
* 是否白天模式
|
||||
* @return
|
||||
*/
|
||||
boolean isDayMode();
|
||||
val isDayMode: Boolean
|
||||
|
||||
/**
|
||||
* 显示我的位置
|
||||
*
|
||||
* @param visible true - 显示 false - 不显示
|
||||
*/
|
||||
void showMyLocation(boolean visible);
|
||||
fun showMyLocation(visible: Boolean)
|
||||
|
||||
/**
|
||||
* @param view
|
||||
*/
|
||||
void showMyLocation(View view);
|
||||
fun showMyLocation(view: View)
|
||||
|
||||
/**
|
||||
* 获取比例尺数据
|
||||
*
|
||||
* @return 当前缩放级别下,地图上1像素点对应的长度,单位米
|
||||
*/
|
||||
float getScalePerPixel();
|
||||
val scalePerPixel: Float
|
||||
|
||||
/**
|
||||
* 获取缩放比例
|
||||
*/
|
||||
float getZoomLevel();
|
||||
val zoomLevel: Float
|
||||
|
||||
/**
|
||||
* 获取视图东北角坐标
|
||||
*/
|
||||
MogoLatLng getCameraNorthEastPosition();
|
||||
val cameraNorthEastPosition: MogoLatLng?
|
||||
|
||||
/**
|
||||
* 获取视图西南角坐标
|
||||
*/
|
||||
MogoLatLng getCameraSouthWestPosition();
|
||||
val cameraSouthWestPosition: MogoLatLng?
|
||||
|
||||
/**
|
||||
* 获取视图中心点坐标
|
||||
*/
|
||||
MogoLatLng getWindowCenterLocation();
|
||||
val windowCenterLocation: MogoLatLng?
|
||||
|
||||
/**
|
||||
* 设置地图中心点
|
||||
@@ -129,22 +121,22 @@ public interface IMogoMapUIController {
|
||||
* @param mapCenterX x 点位置x值与地图宽度的比例
|
||||
* @param mapCenterY y 点位置x值与地图高度的比例
|
||||
*/
|
||||
void setPointToCenter(double mapCenterX, double mapCenterY);
|
||||
fun setPointToCenter(mapCenterX: Double, mapCenterY: Double)
|
||||
|
||||
/**
|
||||
* 获取经纬度对应的屏幕的位置
|
||||
*/
|
||||
Point getLocationPointInScreen(MogoLatLng latLng);
|
||||
fun getLocationPointInScreen(latLng: MogoLatLng): Point?
|
||||
|
||||
/**
|
||||
* 获取像素点对应的经纬度
|
||||
*/
|
||||
MogoLatLng getLocationMogoLatLngInScreen(Point point);
|
||||
fun getLocationMogoLatLngInScreen(point: Point): MogoLatLng?
|
||||
|
||||
/**
|
||||
* 设置刷新帧率
|
||||
*/
|
||||
void setRenderFps(int fps);
|
||||
fun setRenderFps(fps: Int)
|
||||
|
||||
/**
|
||||
* @param tag 调用业务
|
||||
@@ -153,12 +145,18 @@ public interface IMogoMapUIController {
|
||||
* @param bound 地图上可显示的范围
|
||||
* @param lockCarPosition 是否锁定车辆位置
|
||||
*/
|
||||
void showBounds(String tag, MogoLatLng carPosition, List<MogoLatLng> lonLats, Rect bound, boolean lockCarPosition);
|
||||
fun showBounds(
|
||||
tag: String,
|
||||
carPosition: MogoLatLng,
|
||||
lonLats: List<MogoLatLng>,
|
||||
bound: Rect,
|
||||
lockCarPosition: Boolean
|
||||
)
|
||||
|
||||
/**
|
||||
* 强制刷新地图
|
||||
*/
|
||||
void forceRender();
|
||||
fun forceRender()
|
||||
|
||||
/**
|
||||
* 计算两点之间的距离
|
||||
@@ -167,131 +165,117 @@ public interface IMogoMapUIController {
|
||||
* @param p2
|
||||
* @return
|
||||
*/
|
||||
float calculateLineDistance(MogoLatLng p1, MogoLatLng p2) throws Exception;
|
||||
fun calculateLineDistance(p1: MogoLatLng, p2: MogoLatLng): Float
|
||||
|
||||
/**
|
||||
* 锁车状态
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isCarLocked();
|
||||
val isCarLocked: Boolean
|
||||
|
||||
/**
|
||||
* 配置自车图标样式
|
||||
*
|
||||
* @param option 为空时使用
|
||||
* 默认配置
|
||||
* 默认配置
|
||||
*/
|
||||
void setCarCursorOption(@Nullable CarCursorOption option);
|
||||
fun setCarCursorOption(option: CarCursorOption)
|
||||
|
||||
/**
|
||||
* @param type :车尾灯类型 0=默认 1=左黄 2=右黄 3=双黄 4=双红
|
||||
* @param time: 闪烁时间 最小500ms 小于500ms 默认为500ms
|
||||
*/
|
||||
void setCarLightsType(int type, int time);
|
||||
fun setCarLightsType(type: Int, time: Int)
|
||||
|
||||
/**
|
||||
* 获取地图视图描述快照
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
MapCameraPosition getMapCameraPosition();
|
||||
val mapCameraPosition: MapCameraPosition?
|
||||
|
||||
/**
|
||||
* 切换地图视图视角
|
||||
*
|
||||
* @param bearing
|
||||
*/
|
||||
void changeBearing(float bearing);
|
||||
fun changeBearing(bearing: Float)
|
||||
|
||||
/**
|
||||
* 修改高精地图自车图标
|
||||
* 传入资源ID
|
||||
*/
|
||||
void changeCurrentIcon(@RawRes int iconId);
|
||||
fun changeCurrentIcon(@RawRes iconId: Int)
|
||||
|
||||
/**
|
||||
* 自研地图是否匹配道路
|
||||
*
|
||||
* @param enable
|
||||
*/
|
||||
default void rtkEnable(boolean enable) {
|
||||
|
||||
}
|
||||
|
||||
default void destroy() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车速资源缓存 id
|
||||
*
|
||||
* @param speedVal
|
||||
* @return
|
||||
*/
|
||||
default String getMarkerInfoResName(String speedVal) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车速资源缓存 id
|
||||
*
|
||||
* @param speedVal
|
||||
* @return
|
||||
*/
|
||||
default void setMarkerInfoResName(String speedVal, String val) {
|
||||
|
||||
}
|
||||
fun rtkEnable(enable: Boolean) {}
|
||||
fun destroy() {}
|
||||
|
||||
/**
|
||||
* 设置地图视线角度
|
||||
*/
|
||||
void setMapDAngle(float angle);
|
||||
fun setMapDAngle(angle: Float)
|
||||
|
||||
/**
|
||||
* 设置锁屏模式
|
||||
*/
|
||||
void setLockMode(boolean isLock);
|
||||
fun setLockMode(isLock: Boolean)
|
||||
|
||||
/**
|
||||
* 设置手势滑动失效
|
||||
*/
|
||||
void setScrollGesturesEnable(boolean isEnable);
|
||||
fun setScrollGesturesEnable(isEnable: Boolean)
|
||||
|
||||
/**
|
||||
* 设置所有的滑动失效
|
||||
*/
|
||||
void setAllGesturesEnabled(boolean isEnable);
|
||||
fun setAllGesturesEnabled(isEnable: Boolean)
|
||||
|
||||
/**
|
||||
* 设置外界坐标系
|
||||
*
|
||||
* @param gnssInfo RTK 高精坐标,车辆惯导数据
|
||||
*/
|
||||
void setExtraGPSData(MogoLocation gnssInfo);
|
||||
fun setExtraGPSData(gnssInfo: MogoLocation)
|
||||
|
||||
/**
|
||||
* 打开点云绘制
|
||||
*
|
||||
* @param isDrawPointCloud 是否绘制点云
|
||||
*/
|
||||
void setIsDrawPointCloud(Boolean isDrawPointCloud);
|
||||
fun setIsDrawPointCloud(isDrawPointCloud: Boolean)
|
||||
|
||||
/**
|
||||
* 设制点云大小
|
||||
*
|
||||
* @param pointCloudSize 点云的点大小
|
||||
*/
|
||||
void setPointCloudSize(Float pointCloudSize);
|
||||
fun setPointCloudSize(pointCloudSize: Float)
|
||||
|
||||
/**
|
||||
* 设置点云颜色
|
||||
*
|
||||
* @param color // color:"#RRGGBB*
|
||||
*/
|
||||
void setPointCloudColor(String color);
|
||||
fun setPointCloudColor(color: String)
|
||||
|
||||
String getCityCode();
|
||||
/**
|
||||
* 更新点云数据
|
||||
* @param dataStr 点云数据
|
||||
* @param isTrasformer 是否需要转换坐标
|
||||
* @param isResidual 是否需要差量更新
|
||||
* @param isStrong 是否加粗显示
|
||||
* @return 是否执行
|
||||
*/
|
||||
fun updatePointCloud(
|
||||
dataArray: ByteArray?, isTrasformer: Boolean,
|
||||
isResidual: Boolean, isReset: Boolean
|
||||
): Boolean
|
||||
|
||||
/**
|
||||
* 自动切换视角到指定点,包含过渡动画,并持续指定duration毫秒
|
||||
@@ -302,8 +286,7 @@ public interface IMogoMapUIController {
|
||||
* @param duration 持续时间
|
||||
* @param isGps 是否是高精坐标
|
||||
*/
|
||||
void animateTo(double lon, double lat, float rotateAngle, int duration, boolean isGps);
|
||||
|
||||
fun animateTo(lon: Double, lat: Double, rotateAngle: Float, duration: Int, isGps: Boolean)
|
||||
|
||||
/**
|
||||
* 自动切换视角到指定点,包含过渡动画,并持续指定duration毫秒
|
||||
@@ -315,10 +298,13 @@ public interface IMogoMapUIController {
|
||||
* @param v3
|
||||
* @param v4
|
||||
*/
|
||||
void animateTo(double lon, double lat, float v1, float v2, float v3, float v4, int duration, boolean isGps);
|
||||
fun animateTo(
|
||||
lon: Double, lat: Double, v1: Float, v2: Float,
|
||||
v3: Float, v4: Float, duration: Int, isGps: Boolean
|
||||
)
|
||||
|
||||
/**
|
||||
* 从地图上删除所有的overlay(marker,circle,polyline 等对象)。
|
||||
*/
|
||||
void clear();
|
||||
}
|
||||
fun clear()
|
||||
}
|
||||
Reference in New Issue
Block a user