[map-sdk] 同步地图SDK 3.4.0.1
@@ -21,7 +21,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.OnRoad
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.zhidaoauto.map.data.road.StopLine
|
||||
import com.zhidaoauto.map.sdk.open.tools.*
|
||||
import com.zhidaoauto.map.sdk.open.common.tools.MapTools
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.android.*
|
||||
import java.util.*
|
||||
|
||||
@@ -18,7 +18,7 @@ import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils;
|
||||
import com.mogo.map.overlay.IMoGoOverlayManager;
|
||||
import com.mogo.map.overlay.core.Level;
|
||||
import com.mogo.map.overlay.line.Polyline;
|
||||
import com.zhidaoauto.map.sdk.open.tools.MapTools;
|
||||
import com.zhidaoauto.map.sdk.open.common.tools.MapTools;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
|
||||
@@ -81,7 +81,7 @@ MOGO_LOCATION_VERSION=1.4.7.23
|
||||
MOGO_TELEMATIC_VERSION=1.4.7.23
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=3.3.3.14
|
||||
MAP_SDK_VERSION=3.4.0.1
|
||||
MAP_SDK_DATA_VERSION=1.0.0.7
|
||||
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
||||
# websocket
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Fri Sep 22 11:53:55 CST 2023
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
//package com.autonavi.nge.dm;
|
||||
//
|
||||
//import android.os.IBinder;
|
||||
//import com.autonavi.nge.guidance.RouteBook;
|
||||
//import com.autonavi.nge.guidance.NaviInfo;
|
||||
//import com.autonavi.nge.guidance.RouteImage;
|
||||
//import com.autonavi.nge.guidance.LaneMask;
|
||||
//import com.autonavi.nge.obj.Category;
|
||||
//import com.autonavi.nge.obj.UpdateRegion;
|
||||
//import com.autonavi.nge.trafficInfo.TMCID;
|
||||
//import com.autonavi.nge.search.SPPoiItem;
|
||||
//import com.autonavi.nge.search.SPCategories;
|
||||
//import com.autonavi.nge.search.SPQuery;
|
||||
//import com.autonavi.nge.search.SPSearchResult;
|
||||
//import com.autonavi.nge.map.LonLat;
|
||||
//import com.autonavi.nge.guidance.GuidanceStatListener;
|
||||
//interface INavigationCore {
|
||||
//// IBinder getHandler();
|
||||
// void Routing_SetOrigin(float lon, float lat, int sessionid);
|
||||
// void Routing_SetDest(float lon, float lat, int sessionid);
|
||||
// void Routing_GetRoute(int sessionid);
|
||||
// boolean Routing_GetStatus(int sessionid);
|
||||
// void Routing_Reset(int sessionid);
|
||||
// void Routing_ClearTour(int sessionid);
|
||||
// void RoutingSetCostModel(int model, int sessionid);
|
||||
// void RoutingSetAvoidHighway(boolean isAvoidHighway, int sessionid);
|
||||
// void RoutingSetAvoidToll(boolean isAvoidToll, int sessionid);
|
||||
//
|
||||
// void Traffic_Update(in List<TMCID> ids, int evt);
|
||||
// void Traffic_UpdateByTile(int tile, in int[] ids, in byte[] speeds);
|
||||
// void RoutingSetUseTraffic(boolean useTraffic, int sessionid);
|
||||
// int RoutingGetRouteNum(int sessionid);
|
||||
// int RoutingGetLength(int route, int sessionid);
|
||||
// int RoutingGetSTime(int route, int sessionid);
|
||||
// int RoutingGetDTime(int route, int sessionid);
|
||||
// void addwaypoint(float lon, float lat, int heading, int sessionid);
|
||||
// void clearwaypoints(int sessionid);
|
||||
//
|
||||
// void Guidance_UpdatePosition(float lon, float lat, float speed, float heading);
|
||||
// void Guidance_StartNavi(int type);
|
||||
// void Guidance_StopNavi();
|
||||
// void Guidance_SetSimSpeed(int speed);
|
||||
// void Guidance_PauseSimNavi();
|
||||
// void Guidance_ResumeSimNavi();
|
||||
// RouteBook Guidance_RouteBook(int session,int start,int end);
|
||||
// NaviInfo Guidance_NaviInfo();
|
||||
// NaviInfo GetNaviInfo(in byte[] datas);
|
||||
// String Guidance_TTS();
|
||||
// RouteImage Guidance_Image(int imageUr,int imageBg,int imageArrow,int type);
|
||||
// LaneMask Guidance_LaneMask();
|
||||
// double Guidance_getRoadAngle();
|
||||
//
|
||||
// List<SPPoiItem> Search_getSearchResult(int productId, double lon, double lat, double radius, int kindfilter, int updateregionId, String keyWord, int pageIdx, int searchType);
|
||||
// SPPoiItem getPoiItemByPoiId(int poiId);
|
||||
// List<SPPoiItem> getPoiItemListByLonLat(int prodId, int urId, float lon, float lat, int pageCount, int pageIdx);
|
||||
// List<SPPoiItem> queryPoiItemByCircle(float centerLon,float centerLat,float radius);
|
||||
// List<SPPoiItem> queryPoiItemByRect(float topLeftLon,float topLeftLat,float bottomRightLon,float bottomRightLat);
|
||||
// List<SPPoiItem> queryPoiItemByPolygon(in List<LonLat> latLonPoints);
|
||||
// List getFTSDataByDA( int urid, String keyStr, int keytype, int maxResultCount);
|
||||
// List<String> getInputResult(int productId, int updateregionId, String inputStr);
|
||||
// List<String> getInputResultByDA();
|
||||
// List<Category> getCatList(int urid);
|
||||
// List<UpdateRegion> getURListByDA(int prodid);
|
||||
// void play(String text,boolean forcePlay);
|
||||
//
|
||||
// int RoutingGetSearchedCnt(int route, int sessionid);
|
||||
//
|
||||
// int [] getMemoryInfo();
|
||||
//
|
||||
// void startServer();
|
||||
//
|
||||
// void stopServer();
|
||||
//
|
||||
// int getMDSVersion();
|
||||
// String getDataVersion();
|
||||
// String getCopyRight();
|
||||
// String getCompilerVersion();
|
||||
//
|
||||
// void onGuidanceStatusChanged(int statCode, in byte[] datas);
|
||||
//
|
||||
// void setGuidanceStatListener(GuidanceStatListener listener);
|
||||
//
|
||||
// SPCategories getAllPoiCategories(int languageCode);
|
||||
// List<SPSearchResult> getPoiItemList(in SPQuery query);
|
||||
//}
|
||||
@@ -12,6 +12,9 @@ uniform bool isPcf; //是否聚光灯
|
||||
uniform bool isWave; //流光效果
|
||||
uniform sampler2D texId;
|
||||
uniform sampler2DShadow depthTex; //深度纹理
|
||||
uniform sampler2D texId2;
|
||||
uniform bool isMixTex2;
|
||||
uniform float texId2Fac;
|
||||
uniform bool isRenderSignalLine; //信号线
|
||||
uniform float signalLineTime; //信号线时间
|
||||
uniform float signalLineCnt; //信号线时间
|
||||
@@ -126,7 +129,12 @@ bool isInScreen(vec4 p){ //是否在包围盒[(0,0)-(1,1)]内
|
||||
}
|
||||
|
||||
void setZebra(){
|
||||
vec4 c = texture(texId, _uv);
|
||||
vec4 c = vec4(0.0);
|
||||
if(!isMixTex2){
|
||||
c = texture(texId,_uv);
|
||||
}else{
|
||||
c = mix(texture(texId,_uv),texture(texId2,_uv),texId2Fac);
|
||||
}
|
||||
fragColor = vec4(c.rgb, step(0.8,c.a));
|
||||
}
|
||||
void setColor(){
|
||||
@@ -137,7 +145,11 @@ void setTex(){
|
||||
if(_uv.y<0.0 || _uv.y>1.0)
|
||||
discard;
|
||||
}
|
||||
fragColor = texture(texId,_uv);
|
||||
if(!isMixTex2){
|
||||
fragColor = texture(texId,_uv);
|
||||
}else{
|
||||
fragColor = mix(texture(texId,_uv),texture(texId2,_uv),texId2Fac);
|
||||
}
|
||||
}
|
||||
float getShadowOffset(float x, float y)
|
||||
{
|
||||
|
||||
@@ -49,6 +49,10 @@ vec4 changeColorMethod(vec4 texColor){
|
||||
}
|
||||
}else
|
||||
retColor = texColor; //s0
|
||||
}else if(_changeColorCmd==5.0){
|
||||
retColor = mix(texColor,replacedColor,_changeColorRatio);
|
||||
}else if(_changeColorCmd==6.0){
|
||||
retColor = mix(texColor,replacedColor,1.0-_changeColorRatio);
|
||||
}else if(_changeColorRatio==0.0){
|
||||
if(_changeColorCmd==1.0)
|
||||
retColor = mix(texColor,replacedColor,0.5);
|
||||
|
||||
@@ -169,4 +169,5 @@ void main()
|
||||
|
||||
gl_Position = projMat*viewMat*modelMat * pos;
|
||||
ndc = gl_Position;
|
||||
gl_PointSize = (1.0-gl_Position.z/gl_Position.w)*70.0;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 11 KiB |
BIN
libraries/mapmodule/src/main/assets/style/skybox/cloudy/1.png
Normal file
|
After Width: | Height: | Size: 239 KiB |
BIN
libraries/mapmodule/src/main/assets/style/skybox/cloudy/2.png
Normal file
|
After Width: | Height: | Size: 235 KiB |
BIN
libraries/mapmodule/src/main/assets/style/skybox/cloudy/3.png
Normal file
|
After Width: | Height: | Size: 250 KiB |
BIN
libraries/mapmodule/src/main/assets/style/skybox/cloudy/4.png
Normal file
|
After Width: | Height: | Size: 235 KiB |
|
Before Width: | Height: | Size: 411 KiB |
|
Before Width: | Height: | Size: 411 KiB |
|
Before Width: | Height: | Size: 355 KiB |
|
Before Width: | Height: | Size: 411 KiB |
|
Before Width: | Height: | Size: 411 KiB |
|
Before Width: | Height: | Size: 411 KiB |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 696 KiB |
|
Before Width: | Height: | Size: 485 KiB |
|
Before Width: | Height: | Size: 355 KiB |
BIN
libraries/mapmodule/src/main/assets/style/skybox/nighttime/1.png
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
libraries/mapmodule/src/main/assets/style/skybox/nighttime/2.png
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
libraries/mapmodule/src/main/assets/style/skybox/nighttime/3.png
Normal file
|
After Width: | Height: | Size: 182 KiB |
BIN
libraries/mapmodule/src/main/assets/style/skybox/nighttime/4.png
Normal file
|
After Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 786 KiB |
|
Before Width: | Height: | Size: 394 KiB |
|
Before Width: | Height: | Size: 411 KiB |
@@ -1,29 +0,0 @@
|
||||
backGround=B0BED1 //背景色
|
||||
road=80,92,112 //路面颜色
|
||||
arrow.color.fac=0.95 //箭头颜色因子
|
||||
alphaNumeric.color.fac=1.0 //地标颜色因子
|
||||
zebra.color.fac=0.98 //斑马线颜色因子
|
||||
spotLight=2.5;0.5;1 //聚光灯 半径;亮度;偏移
|
||||
shadow=70,85,107,200 //阴影颜色
|
||||
greenBelt=6C8C86;9EBDB4 //绿化带 底部颜色;顶部颜色
|
||||
dividerLine=228,233,250;228,233,250;1.0 //白色;黄色;颜色因子
|
||||
pole=8999B0;4E617E //灯杆渐变颜色
|
||||
guardBar=9FB4C8;7C8EA5;B8C8E1 //隔离带颜色
|
||||
roadPile=1.0,0.84,0.23;0.18,0.18,0.18;0.25,0.25,0.25 //路桩颜色
|
||||
bridgePier=d2d6e4;979aa4 //桥墩颜色
|
||||
cable=5cd3ff;1e79d6;65f3ff;48b3bc //电缆颜色1;电缆颜色2;光缆颜色1;光缆颜色2
|
||||
area.type.2=D0E7DD //绿地颜色
|
||||
area.type.3=99C0E7 //水系颜色
|
||||
area.type.4=37485E //路面铺装颜色
|
||||
area.type.101=B0BED1 //区域块颜色
|
||||
regional=889DB5 //人行步道颜色
|
||||
building=7fA3B7D0;D0E3FB //建筑物底部颜色;顶部颜色
|
||||
camera=BCC3D0 //摄像头颜色
|
||||
trafficLight=BCC3D0 //交通灯颜色
|
||||
rsu.type.1=BCC3D0 //雷达颜色
|
||||
rsu.type.2=BCC3D0 //mec颜色
|
||||
rsu.type.3=BCC3D0 //rsu颜色
|
||||
//光照 环境光;漫反射;高光;高光的光泽度
|
||||
selfCar.light=0.8,0.8,0.8;0.2,0.2,0.2;0.8,0.8,0.8;12.0 //自车
|
||||
otherCar.light=0.7,0.7,0.7;0.1,0.1,0.1;0.3,0.3,0.3;11.0 //他车
|
||||
others.light=0.7,0.7,0.7;0.1,0.1,0.1;0.6,0.6,0.6;12.0 //除自车和他车外的其他3d锚点
|
||||
@@ -1,29 +0,0 @@
|
||||
backGround=60,74,105 //背景色
|
||||
road=1E2637 //路面颜色
|
||||
arrow.color.fac=1.0 //箭头颜色因子
|
||||
alphaNumeric.color.fac=1.0 //地标颜色因子
|
||||
zebra.color.fac=1.0 //斑马线颜色因子
|
||||
spotLight=1;0.75;-25 //聚光灯 半径;亮度;偏移
|
||||
shadow=18,28,56,180 //阴影颜色
|
||||
greenBelt=35,50,75;60,74,105 //绿化带 底部颜色;顶部颜色
|
||||
dividerLine=102,115,140;230,180,90;1.0 //白色;黄色;颜色因子
|
||||
pole=6698B1;335780 //灯杆渐变颜色
|
||||
guardBar=344563;273651;506B9A //隔离带颜色
|
||||
roadPile=0.9,0.7,0.35;0.16,0.16,0.16;0.24,0.24,0.24 //路桩颜色
|
||||
bridgePier=384f76;1e2636 //桥墩颜色
|
||||
cable=5cd3ff;1e79d6;65f3ff;48b3bc //电缆颜色1;电缆颜色2;光缆颜色1;光缆颜色2
|
||||
area.type.2=D0E7DD //绿地颜色
|
||||
area.type.3=8BD0FD //水系颜色
|
||||
area.type.4=37485E //路面铺装颜色
|
||||
area.type.101=343F5B //区域块颜色
|
||||
regional=3C4A69 //人行步道颜色
|
||||
building=7fA1B7DD;E3ECFF //建筑物底部颜色;顶部颜色
|
||||
camera=0 //摄像头颜色
|
||||
trafficLight=0 //交通灯颜色
|
||||
rsu.type.1=0 //雷达颜色
|
||||
rsu.type.2=0 //mec颜色
|
||||
rsu.type.3=0 //rsu颜色
|
||||
//光照 环境光;漫反射;高光;高光的光泽度
|
||||
selfCar.light=0.6,0.6,0.6;0.1,0.1,0.1;0.6,0.6,0.6;12.0 //自车
|
||||
otherCar.light=0.4,0.4,0.4;0.1,0.1,0.1;0.6,0.6,0.6;12.0 //他车
|
||||
others.light=0.4,0.4,0.4;0.1,0.1,0.1;0.6,0.6,0.6;12.0 //除自车和他车外的其他3d锚点
|
||||
@@ -30,7 +30,7 @@ selfCar.light=0.6,0.6,0.6;0.1,0.1,0.1;0.6,0.6,0.6;12.0 //自车
|
||||
otherCar.light=0.4,0.4,0.4;0.1,0.1,0.1;0.6,0.6,0.6;12.0 //他车
|
||||
others.light=0.4,0.4,0.4;0.1,0.1,0.1;0.6,0.6,0.6;12.0 //除自车和他车外的其他3d锚点
|
||||
fog=BFD9FD;35;70;0.8 //雾颜色,起始距离,结束距离,密度
|
||||
skybox.lookat=0;-13;8.5;0;0;3; 0;1;0 //天空盒lookat参数
|
||||
skybox.lookat=0;-13;8.5;0;0;3; 0;1;0 //天空盒lookat参数
|
||||
skybox.proj=60;0.1;100 //天空盒fov,近平面,远平面
|
||||
grayscale=#BCCCDAFF
|
||||
building.text.color=0.8,0.8,0.8,1.0
|
||||
|
||||
@@ -47,23 +47,27 @@ divider.15.right.tex.path=/hd_res/taxi_day_mode/divider15_right.png
|
||||
skybox.2d.tex.path=/skyDay.png
|
||||
road.isGradient=true
|
||||
road.gradientColor=66B5C8E6;00B5C8E6
|
||||
road.gradientColor_morning=00f2c3b1;66f2c3b1
|
||||
road.gradientColor_morning=66B5C8E6;00B5C8E6
|
||||
road.gradientColor_daytime=66B5C8E6;00B5C8E6
|
||||
road.gradientColor_evening=00f2c3b1;66f2c3b1
|
||||
road.gradientColor_nighttime=004CECFF;004CECFF
|
||||
greenbelt.isGradient=true
|
||||
greenbelt.gradientColor=66E5F0E8;00E5F0E8
|
||||
greenbelt.gradientColor_morning=00f2c3b1;66f2c3b1
|
||||
greenbelt.gradientColor_morning=66E5F0E8;00E5F0E8
|
||||
greenbelt.gradientColor_daytime=66E5F0E8;00E5F0E8
|
||||
greenbelt.gradientColor_evening=00f2c3b1;66f2c3b1
|
||||
greenbelt.gradientColor_nighttime=004CECFF;004CECFF
|
||||
plane.isGradient=true
|
||||
plane.gradientColor=66B5C8E6;00B5C8E6
|
||||
plane.gradientColor_morning=00f2c3b1;66f2c3b1
|
||||
plane.gradientColor_morning=66B5C8E6;00B5C8E6
|
||||
plane.gradientColor_daytime=66B5C8E6;00B5C8E6
|
||||
plane.gradientColor_evening=00f2c3b1;66f2c3b1
|
||||
plane.gradientColor_nighttime=004CECFF;004CECFF
|
||||
fog=C4E1FF;20;65;0.9 //雾颜色,起始距离,结束距离,密度
|
||||
fog_morning=D6CFDC;20;65;0.9 //雾颜色,起始距离,结束距离,密度
|
||||
fog_morning=F0F5F6;20;65;0.4 //雾颜色,起始距离,结束距离,密度
|
||||
fog_daytime=C4E1FF;20;65;0.9 //雾颜色,起始距离,结束距离,密度
|
||||
fog_evening=D6CFDC;20;65;0.9 //雾颜色,起始距离,结束距离,密度
|
||||
fog_nighttime=4CECFF;20;65;0.3 //雾颜色,起始距离,结束距离,密度
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
alpha.tex.path.11.出口.0=/hd_res/night_mode/exit.png
|
||||
alpha.tex.path.11.前方学校.1=/hd_res/night_mode/schoolZone_white.png
|
||||
alpha.tex.path.11.前方学校.2=/hd_res/night_mode/schoolZone_yellow.png
|
||||
alpha.tex.path.11.公交专用.0=/hd_res/night_mode/WithBusVertical.png
|
||||
alpha.tex.path.11.潮汐车道.0=/hd_res/night_mode/ReversibleLane.png
|
||||
alpha.tex.path.11.公交车道.0=/hd_res/night_mode/busLaneVertical.png
|
||||
alpha.tex.path.11.公交车.0=/hd_res/night_mode/bus.png
|
||||
alpha.tex.path.11.快速公交专用线.1=/hd_res/night_mode/bus_Rapid_white.png
|
||||
alpha.tex.path.11.快速公交专用线.2=/hd_res/night_mode/bus_Rapid_yellow.png
|
||||
alpha.tex.path.11.借道区.1=/hd_res/night_mode/throughWordsV_white.png
|
||||
alpha.tex.path.11.借道区.2=/hd_res/night_mode/throughWordsV_yellow.png
|
||||
alpha.tex.path.11.公交停靠.0=/hd_res/night_mode/busStop.png
|
||||
alpha.tex.path.11.警务专用.0=/hd_res/night_mode/policeSpecialV.png
|
||||
alpha.tex.path.11.礼让行人.1=/hd_res/night_mode/comity_PedestrianShu.png
|
||||
alpha.tex.path.11.礼让行人.2=/hd_res/night_mode/comityPedestrianCShu.png
|
||||
alpha.tex.path.11.人行道.0=/hd_res/night_mode/sideRoad.png
|
||||
alpha.tex.path.11.观光车专用道.0=/hd_res/night_mode/tourRoad.png
|
||||
alpha.tex.path.12.BATTERY.0=/hd_res/night_mode/battery.png
|
||||
alpha.tex.path.12.WALK.0=/hd_res/night_mode/walk.png
|
||||
alpha.tex.path.12.车让人.0=/hd_res/night_mode/carpeople.png
|
||||
alpha.tex.path.12.公交专用.0=/hd_res/night_mode/WithBusAcross.png
|
||||
alpha.tex.path.12.公交车道.0=/hd_res/night_mode/busLaneAcross.png
|
||||
alpha.tex.path.12.礼让行人.1=/hd_res/night_mode/comity_Pedestrian.png
|
||||
alpha.tex.path.12.礼让行人.2=/hd_res/night_mode/comityPedestrianC.png
|
||||
alpha.tex.path.12.停.0=/hd_res/night_mode/stop.png
|
||||
alpha.tex.path.12.请勿越线.2=/hd_res/night_mode/noCrossLine.png
|
||||
alpha.tex.path.22.7-22.0=/hd_res/night_mode/7-22.png
|
||||
alpha.tex.path.22.7-9.1=/hd_res/night_mode/7-9_white.png
|
||||
alpha.tex.path.22.7-9.2=/hd_res/night_mode/7-9_yellow.png
|
||||
alpha.tex.path.22.17-19.1=/hd_res/night_mode/17-19_white.png
|
||||
alpha.tex.path.22.17-19.2=/hd_res/night_mode/17-19_yellow.png
|
||||
alpha.tex.path.22.16-19.1=/hd_res/night_mode/16-19_white.png
|
||||
alpha.tex.path.22.16-19.2=/hd_res/night_mode/16-19_yellow.png
|
||||
alpha.tex.path.22.17-20.1=/hd_res/night_mode/17-20_white.png
|
||||
alpha.tex.path.22.17-20.2=/hd_res/night_mode/17-20_yellow.png
|
||||
alpha.tex.path.22.6-20.0=/hd_res/night_mode/6-20_white.png
|
||||
alpha.tex.path.22.6-22.0=/hd_res/night_mode/6-22_white.png
|
||||
alpha.tex.path.22.7:30-9:30.1=/hd_res/night_mode/1730-1930-white.png
|
||||
alpha.tex.path.22.7:30-9:30.2=/hd_res/night_mode/1730-1930-yellow.png
|
||||
alpha.tex.path.22.7-10.0=/hd_res/night_mode/7-10-speed.png
|
||||
alpha.tex.path.22.16:00-18:00.1=/hd_res/night_mode/16_18.png
|
||||
alpha.tex.path.31.60-80.0=/hd_res/night_mode/60-80-speed.png
|
||||
alpha.tex.path.31.80-100.0=/hd_res/night_mode/80-100-speed.png
|
||||
alpha.tex.path.31.100-120.0=/hd_res/night_mode/100-120-speed.png
|
||||
alpha.tex.path.31.60-100.0=/hd_res/night_mode/60-100-speed.png
|
||||
alpha.tex.path.31.90-120.0=/hd_res/night_mode/90-120-speed.png
|
||||
alpha.tex.path.32.80.0=/hd_res/night_mode/80-speed.png
|
||||
alpha.tex.path.32.60.0=/hd_res/night_mode/60-speed.png
|
||||
alpha.tex.path.32.40.1=/hd_res/night_mode/40-speed-white.png
|
||||
alpha.tex.path.32.40.2=/hd_res/night_mode/40-speed-yellow.png
|
||||
@@ -0,0 +1,65 @@
|
||||
arrow.tex.path.201=/hd_res/night_mode/gostraight.png
|
||||
arrow.tex.path.202=/hd_res/night_mode/gostraightleft.png
|
||||
arrow.tex.path.203=/hd_res/night_mode/gostraightrightturn.png
|
||||
arrow.tex.path.204=/hd_res/night_mode/gostraightleftround.png
|
||||
arrow.tex.path.220=/hd_res/night_mode/gostraightrightround.png
|
||||
arrow.tex.path.205=/hd_res/night_mode/leftturn.png
|
||||
arrow.tex.path.206=/hd_res/night_mode/leftleftround.png
|
||||
arrow.tex.path.207=/hd_res/night_mode/leftwaitturn.png
|
||||
arrow.tex.path.208=/hd_res/night_mode/rightturn.png
|
||||
arrow.tex.path.209=/hd_res/night_mode/rightwaitturn.png
|
||||
arrow.tex.path.210=/hd_res/night_mode/leftrightturn.png
|
||||
arrow.tex.path.211=/hd_res/night_mode/leftround.png
|
||||
arrow.tex.path.212=/hd_res/night_mode/noleftturn.png
|
||||
arrow.tex.path.215=/hd_res/night_mode/gostraightleftright.png
|
||||
arrow.tex.path.402=/hd_res/night_mode/bicycle_cross_right.png
|
||||
arrow.tex.path.412=/hd_res/night_mode/bicycle_vertical_right.png
|
||||
arrow.tex.path.408=/hd_res/night_mode/bicycle_vertical_left.png
|
||||
arrow.tex.path.410=/hd_res/night_mode/bicycle_cross_left.png
|
||||
arrow.tex.path.411=/hd_res/night_mode/motorVehiclesC.png
|
||||
arrow.tex.path.413=/hd_res/night_mode/bicycle_vertical_LL.png
|
||||
arrow.tex.path.404=/hd_res/night_mode/bicycle_vertical_right_down.png
|
||||
arrow.tex.path.508=/hd_res/night_mode/Rhombus.png
|
||||
arrow.tex.path.509=/hd_res/night_mode/Triangle.png
|
||||
arrow.tex.path.511.1=/hd_res/night_mode/SpeedBump1_white.png
|
||||
arrow.tex.path.511.2=/hd_res/night_mode/SpeedBump1_yellow.png
|
||||
arrow.tex.path.511.4=/hd_res/night_mode/SpeedBump1_red.png
|
||||
arrow.tex.path.501.1=/hd_res/night_mode/SpeedBump2_white.png
|
||||
arrow.tex.path.501.2=/hd_res/night_mode/SpeedBump2_yellow.png
|
||||
arrow.tex.path.501.4=/hd_res/night_mode/SpeedBump2_red.png
|
||||
arrow.tex.path.502.1=/hd_res/night_mode/SpeedBump3_white.png
|
||||
arrow.tex.path.502.2=/hd_res/night_mode/SpeedBump3_yellow.png
|
||||
arrow.tex.path.502.4=/hd_res/night_mode/SpeedBump3_red.png
|
||||
arrow.tex.path.512.1=/hd_res/night_mode/SpeedBump4_white.png
|
||||
arrow.tex.path.512.2=/hd_res/night_mode/SpeedBump4_yellow.png
|
||||
arrow.tex.path.512.4=/hd_res/night_mode/SpeedBump4_red.png
|
||||
arrow.tex.path.517.4=/hd_res/night_mode/SpeedBump5_red.png
|
||||
arrow.tex.path.517.1=/hd_res/night_mode/SpeedBump5_white.png
|
||||
arrow.tex.path.517.2=/hd_res/night_mode/SpeedBump5_yellow.png
|
||||
arrow.tex.path.603=/hd_res/night_mode/BigSquareForbidArea.png
|
||||
arrow.tex.path.604=/hd_res/night_mode/SmaSquareForbidArea.png
|
||||
arrow.tex.path.605=/hd_res/night_mode/BigRectForbidArea.png
|
||||
arrow.tex.path.606=/hd_res/night_mode/SmaRectForbidArea.png
|
||||
arrow.tex.path.513.1=/hd_res/night_mode/UnSpeedBump1_white.png
|
||||
arrow.tex.path.513.2=/hd_res/night_mode/UnSpeedBump1_yellow.png
|
||||
arrow.tex.path.513.4=/hd_res/night_mode/UnSpeedBump1_red.png
|
||||
arrow.tex.path.514.1=/hd_res/night_mode/UnSpeedBump2_white.png
|
||||
arrow.tex.path.514.2=/hd_res/night_mode/UnSpeedBump2_yellow.png
|
||||
arrow.tex.path.514.4=/hd_res/night_mode/UnSpeedBump2_red.png
|
||||
arrow.tex.path.515.1=/hd_res/night_mode/UnSpeedBump3_white.png
|
||||
arrow.tex.path.515.2=/hd_res/night_mode/UnSpeedBump3_yellow.png
|
||||
arrow.tex.path.515.4=/hd_res/night_mode/UnSpeedBump3_red.png
|
||||
arrow.tex.path.516.1=/hd_res/night_mode/UnSpeedBump4_white.png
|
||||
arrow.tex.path.516.2=/hd_res/night_mode/UnSpeedBump4_yellow.png
|
||||
arrow.tex.path.516.4=/hd_res/night_mode/UnSpeedBump4_red.png
|
||||
arrow.tex.path.518.4=/hd_res/night_mode/UnSpeedBump5_red.png
|
||||
arrow.tex.path.518.1=/hd_res/night_mode/UnSpeedBump5_white.png
|
||||
arrow.tex.path.518.2=/hd_res/night_mode/UnSpeedBump5_yellow.png
|
||||
arrow.tex.path.719=/hd_res/night_mode/busTransitLaneV.png
|
||||
arrow.tex.path.721=/hd_res/night_mode/hov.png
|
||||
arrow.tex.path.608=/hd_res/night_mode/noStopMarking.png
|
||||
arrow.tex.path.219=/hd_res/night_mode/noLeftOrTurn.png
|
||||
arrow.tex.path.722=/hd_res/night_mode/ParkingLotSign.png
|
||||
arrow.tex.path.415=/hd_res/night_mode/415_1.png
|
||||
arrow.tex.path.416=/hd_res/night_mode/416.png
|
||||
arrow.tex.path.214=/hd_res/night_mode/noTurn.png
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
building.icon.path.type.6=/building/加油站.png;e6e6e6 //路径;颜色
|
||||
building.icon.path.type.30=/building/医院.png;e6e6e6
|
||||
building.icon.path.type.35=/building/警察局.png;e6e6e6
|
||||
building.icon.path.type.36=/building/邮局.png;e6e6e6
|
||||
building.icon.path.type.37=/building/市政府.png;e6e6e6
|
||||
building.icon.path.type.39=/building/法院.png;e6e6e6
|
||||
building.icon.path.type.40=/building/政府机构.png;e6e6e6
|
||||
building.icon.path.type.41=/building/社区活动中心.png;e6e6e6
|
||||
building.icon.path.type.42=/building/购物中心.png;e6e6e6
|
||||
building.icon.path.type.44=/building/银行.png;e6e6e6
|
||||
building.icon.path.type.66=/building/商业设施.png;e6e6e6
|
||||
building.icon.path.type.67=/building/展览馆.png;e6e6e6
|
||||
building.icon.path.type.68=/building/火车站.png;e6e6e6
|
||||
building.icon.path.type.69=/building/公交站.png;e6e6e6
|
||||
building.icon.path.type.71=/building/飞机场.png;e6e6e6
|
||||
building.icon.path.type.75=/building/紧急医疗服务.png;e6e6e6
|
||||
building.icon.path.type.99=/building/mogo.png;e6e6e6
|
||||
@@ -0,0 +1,74 @@
|
||||
backGround=60,74,105 //背景色
|
||||
road=1E2637 //路面颜色
|
||||
arrow.color.fac=1.0 //箭头颜色因子
|
||||
alphaNumeric.color.fac=1.0 //地标颜色因子
|
||||
zebra.color.fac=1.0 //斑马线颜色因子
|
||||
spotLight=1;0.75;-25 //聚光灯 半径;亮度;偏移
|
||||
shadow=18,28,56,180 //阴影颜色
|
||||
greenBelt=35,50,75;60,74,105 //绿化带 底部颜色;顶部颜色
|
||||
dividerLine=102,115,140;230,180,90;1.0 //白色;黄色;颜色因子
|
||||
pole=6698B1;335780 //灯杆渐变颜色
|
||||
guardBar=344563;273651;506B9A //隔离带颜色
|
||||
roadPile=0.9,0.7,0.35;0.16,0.16,0.16;0.24,0.24,0.24 //路桩颜色
|
||||
bridgePier=384f76;1e2636 //桥墩颜色
|
||||
cable=5cd3ff;1e79d6;65f3ff;48b3bc //电缆颜色1;电缆颜色2;光缆颜色1;光缆颜色2
|
||||
area.type.2=456A63 //绿地颜色
|
||||
area.type.3.color.pure=426798 //水系颜色
|
||||
area.type.3.color.gradient=426700;426798 //水系渐变颜色
|
||||
area.type.3.ring.width=50 //水系环宽度
|
||||
area.type.4=37485E //路面铺装颜色
|
||||
area.type.101=3C4A69 //区域块颜色
|
||||
regional=323E58 //人行步道颜色
|
||||
building=23344E;4B5E89 //建筑物底部颜色;顶部颜色
|
||||
camera=0 //摄像头颜色
|
||||
trafficLight=0 //交通灯颜色
|
||||
rsu.type.1=0 //雷达颜色
|
||||
rsu.type.2=0 //mec颜色
|
||||
rsu.type.3=0 //rsu颜色
|
||||
//光照 环境光;漫反射;高光;高光的光泽度
|
||||
selfCar.light=0.6,0.6,0.6;0.1,0.1,0.1;0.6,0.6,0.6;12.0 //自车
|
||||
otherCar.light=0.4,0.4,0.4;0.1,0.1,0.1;0.6,0.6,0.6;12.0 //他车
|
||||
others.light=0.4,0.4,0.4;0.1,0.1,0.1;0.6,0.6,0.6;12.0 //除自车和他车外的其他3d锚点
|
||||
skybox.lookat=0;-13;8.5;0;0;3; 0;1;0 //天空盒lookat参数
|
||||
skybox.proj=60;0.1;100 //天空盒fov,近平面,远平面
|
||||
grayscale=#BCCCDAFF
|
||||
building.text.color=0.8,0.8,0.8,1.0
|
||||
building.text.size=100
|
||||
station.text.color=0.0,0.0,1.0,1.0
|
||||
station.text.size=150
|
||||
cable.wave.color=1.0,1.0,1.0,0.6
|
||||
cable.wave.vel=1.0
|
||||
road.tex.path=/hd_res/night_mode/road.png
|
||||
zebra.tex.path=/hd_res/night_mode/zebra.png
|
||||
plane.tex.path=/hd_res/night_mode/plane.png
|
||||
building.tex.path=/hd_res/night_mode/zhuan.png
|
||||
divider.15.left.tex.path=/hd_res/night_mode/divider15_left.png
|
||||
divider.15.right.tex.path=/hd_res/night_mode/divider15_right.png
|
||||
skybox.2d.tex.path=/skyNight.png
|
||||
road.isGradient=true
|
||||
road.gradientColor=ffB5C8E6;00B5C8E6
|
||||
road.gradientColor_morning=00f2c3b1;fff2c3b1
|
||||
road.gradientColor_daytime=ffB5C8E6;00B5C8E6
|
||||
road.gradientColor_evening=00f2c3b1;fff2c3b1
|
||||
road.gradientColor_nighttime=004CECFF;004CECFF
|
||||
greenbelt.isGradient=true
|
||||
greenbelt.gradientColor=ffE5F0E8;00E5F0E8
|
||||
greenbelt.gradientColor_morning=00f2c3b1;fff2c3b1
|
||||
greenbelt.gradientColor_daytime=ffE5F0E8;00E5F0E8
|
||||
greenbelt.gradientColor_evening=00f2c3b1;fff2c3b1
|
||||
greenbelt.gradientColor_nighttime=004CECFF;004CECFF
|
||||
plane.isGradient=true
|
||||
plane.gradientColor=ffB5C8E6;00B5C8E6
|
||||
plane.gradientColor_morning=00f2c3b1;fff2c3b1
|
||||
plane.gradientColor_daytime=ffB5C8E6;00B5C8E6
|
||||
plane.gradientColor_evening=00f2c3b1;fff2c3b1
|
||||
plane.gradientColor_nighttime=004CECFF;004CECFF
|
||||
fog=C4E1FF;20;65;0.9 //雾颜色,起始距离,结束距离,密度
|
||||
fog_morning=F0F5F6;20;65;0.4 //雾颜色,起始距离,结束距离,密度
|
||||
fog_daytime=C4E1FF;20;65;0.9 //雾颜色,起始距离,结束距离,密度
|
||||
fog_evening=D6CFDC;20;65;0.9 //雾颜色,起始距离,结束距离,密度
|
||||
fog_nighttime=4CECFF;20;65;0.3 //雾颜色,起始距离,结束距离,密度
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -86,8 +86,8 @@ public class LaneMarkTools {
|
||||
{
|
||||
Panel_Image_Scale = scale;
|
||||
|
||||
PANEL_IMAGE_WIDTH = (int) (screenWidth/4.0 * Panel_Image_Scale);
|
||||
PANEL_IMAGE_HEIGHT = (int) (screenHeight/3.0 * Panel_Image_Scale);
|
||||
PANEL_IMAGE_WIDTH = (int) (screenWidth/4 * Panel_Image_Scale);
|
||||
PANEL_IMAGE_HEIGHT = (int) (screenHeight/3 * Panel_Image_Scale);
|
||||
LANE_PANELBORDER_MARGIN = (int) (5 * Panel_Image_Scale);
|
||||
LANE_PANELBORDER_RADIAN = (int) (10 * Panel_Image_Scale);
|
||||
|
||||
@@ -154,12 +154,12 @@ public class LaneMarkTools {
|
||||
paint.setColor(Color.GREEN);
|
||||
paint.setAntiAlias(true);
|
||||
Path path = new Path();
|
||||
path.moveTo(ARROW_IMAGE_WIDTH / 2.0f, 0);
|
||||
path.lineTo(ARROW_IMAGE_WIDTH, ARROW_IMAGE_HEIGHT / 2.0f);
|
||||
path.lineTo(ARROW_IMAGE_WIDTH, ARROW_IMAGE_HEIGHT / 2.0f + ARROW_THICKNESS);
|
||||
path.lineTo(ARROW_IMAGE_WIDTH / 2.0f, ARROW_THICKNESS);
|
||||
path.lineTo(0, ARROW_IMAGE_HEIGHT / 2.0f + ARROW_THICKNESS);
|
||||
path.lineTo(0, ARROW_IMAGE_HEIGHT / 2.0f);
|
||||
path.moveTo(ARROW_IMAGE_WIDTH / 2, 0);
|
||||
path.lineTo(ARROW_IMAGE_WIDTH, ARROW_IMAGE_HEIGHT / 2);
|
||||
path.lineTo(ARROW_IMAGE_WIDTH, ARROW_IMAGE_HEIGHT / 2 + ARROW_THICKNESS);
|
||||
path.lineTo(ARROW_IMAGE_WIDTH / 2, ARROW_THICKNESS);
|
||||
path.lineTo(0, ARROW_IMAGE_HEIGHT / 2 + ARROW_THICKNESS);
|
||||
path.lineTo(0, ARROW_IMAGE_HEIGHT / 2);
|
||||
path.close();
|
||||
canvas.drawPath(path, paint);
|
||||
BitmapInfo info = new BitmapInfo();
|
||||
@@ -186,7 +186,7 @@ public class LaneMarkTools {
|
||||
paint.setColor(Color.GREEN);
|
||||
paint.setAntiAlias(true);
|
||||
Path path = new Path();
|
||||
path.moveTo(TRIANGLE_IMAGE_WIDTH / 2.0f, 0);
|
||||
path.moveTo(TRIANGLE_IMAGE_WIDTH / 2, 0);
|
||||
path.lineTo(TRIANGLE_IMAGE_WIDTH, TRIANGLE_IMAGE_HEIGHT);
|
||||
path.lineTo(0, TRIANGLE_IMAGE_HEIGHT);
|
||||
path.close();
|
||||
@@ -289,8 +289,8 @@ public class LaneMarkTools {
|
||||
paint.setStyle(Style.STROKE);
|
||||
paint.setStrokeWidth(ARC_GOTO_SECTION_WIDTH);
|
||||
paint.setAntiAlias(true);
|
||||
float arcGotoSectionPositionX = (LANE_WIDTH - ARC_RADIUS * 2.0f) / 2.0f;
|
||||
float arcGotoSectionPositionY = LANE_HEIGHT / 3.0f;
|
||||
float arcGotoSectionPositionX = (LANE_WIDTH - ARC_RADIUS * 2) / 2;
|
||||
float arcGotoSectionPositionY = LANE_HEIGHT / 3;
|
||||
canvas.drawLine(arcGotoSectionPositionX, arcGotoSectionPositionY,
|
||||
arcGotoSectionPositionX, arcGotoSectionPositionY + ARC_INTO_SECTION_HEIGHT,
|
||||
paint);
|
||||
@@ -320,14 +320,14 @@ public class LaneMarkTools {
|
||||
paint.setStrokeWidth(ARC_GOTO_SECTION_WIDTH);
|
||||
paint.setAntiAlias(true);
|
||||
|
||||
float arcGotoSectionPositionX = (LANE_WIDTH - ARC_RADIUS * 2.0f) / 2.0f;
|
||||
float arcGotoSectionPositionY = LANE_HEIGHT / 3.0f;
|
||||
float arcGotoSectionPositionX = (LANE_WIDTH - ARC_RADIUS * 2) / 2;
|
||||
float arcGotoSectionPositionY = LANE_HEIGHT / 3;
|
||||
canvas.drawLine(arcGotoSectionPositionX, arcGotoSectionPositionY,
|
||||
arcGotoSectionPositionX, arcGotoSectionPositionY + ARC_GOTO_SECTION_HEIGHT,
|
||||
paint);
|
||||
|
||||
float arcIntoSectionPositionX = arcGotoSectionPositionX + ARC_RADIUS * 2;
|
||||
float arcIntoSectionPositionY = LANE_HEIGHT / 3.0f;
|
||||
float arcIntoSectionPositionY = LANE_HEIGHT / 3;
|
||||
canvas.drawLine(arcIntoSectionPositionX, arcIntoSectionPositionY,
|
||||
arcIntoSectionPositionX, arcIntoSectionPositionY + ARC_INTO_SECTION_HEIGHT,
|
||||
paint);
|
||||
@@ -348,7 +348,7 @@ public class LaneMarkTools {
|
||||
canvas.save();
|
||||
canvas.translate(translationX, translationY);
|
||||
canvas.rotate(180);
|
||||
canvas.drawBitmap(arrowImage, -(arrowImage.getWidth() / 2.0f),0, paint);
|
||||
canvas.drawBitmap(arrowImage, -(arrowImage.getWidth() / 2),0, paint);
|
||||
canvas.restore();
|
||||
|
||||
BitmapInfo info = new BitmapInfo();
|
||||
@@ -378,7 +378,7 @@ public class LaneMarkTools {
|
||||
paint.setStrokeWidth(STRAIGHT_SECTION_WIDTH);
|
||||
paint.setAntiAlias(true);
|
||||
|
||||
Bitmap arrowImage = getRenderArrowImage(isW != AHEAD_BIT_MASK).bitmap;
|
||||
Bitmap arrowImage = getRenderArrowImage(isW == AHEAD_BIT_MASK ? false : true).bitmap;
|
||||
int arrowPositionX = (LANE_WIDTH - arrowImage.getWidth()) / 2;
|
||||
int arrowPositionY = (LANE_HEIGHT - ARROW_THICKNESS - STRAIGHT_SECTION_HEIGHT) / 2;
|
||||
canvas.drawBitmap(arrowImage, arrowPositionX, arrowPositionY, paint);
|
||||
@@ -429,13 +429,13 @@ public class LaneMarkTools {
|
||||
|
||||
canvas.drawPath(path, paint);
|
||||
|
||||
Bitmap arrowImage = getRenderArrowImage(isW != LEFT_TWO_BIT_MASK).bitmap;
|
||||
Bitmap arrowImage = getRenderArrowImage(isW == LEFT_TWO_BIT_MASK ? false : true).bitmap;
|
||||
int translationX = endX - ARROW_THICKNESS;
|
||||
int translationY = endY;
|
||||
canvas.save();
|
||||
canvas.translate(translationX, translationY);
|
||||
canvas.rotate(-90);
|
||||
canvas.drawBitmap(arrowImage, -(arrowImage.getWidth() / 2.0f), 0, paint);
|
||||
canvas.drawBitmap(arrowImage, -(arrowImage.getWidth() / 2), 0, paint);
|
||||
canvas.restore();
|
||||
|
||||
BitmapInfo info = new BitmapInfo();
|
||||
@@ -479,13 +479,13 @@ public class LaneMarkTools {
|
||||
|
||||
canvas.drawPath(path, paint);
|
||||
|
||||
Bitmap arrowImage = getRenderArrowImage(isW != RIGHT_TWO_BIT_MASK).bitmap;
|
||||
Bitmap arrowImage = getRenderArrowImage(isW == RIGHT_TWO_BIT_MASK ? false : true).bitmap;
|
||||
int translationX = endX + ARROW_THICKNESS;
|
||||
int translationY = endY;
|
||||
canvas.save();
|
||||
canvas.translate(translationX, translationY);
|
||||
canvas.rotate(90);
|
||||
canvas.drawBitmap(arrowImage, -(arrowImage.getWidth() / 2.0f), 0, paint);
|
||||
canvas.drawBitmap(arrowImage, -(arrowImage.getWidth() / 2), 0, paint);
|
||||
canvas.restore();
|
||||
|
||||
BitmapInfo info = new BitmapInfo();
|
||||
@@ -707,8 +707,8 @@ public class LaneMarkTools {
|
||||
paint.setStrokeWidth(RIGHT_TURN_VERTICAL_SECTION_WIDTH);
|
||||
paint.setAntiAlias(true);
|
||||
|
||||
float startX = LANE_WIDTH / 3.0f;
|
||||
float startY = LANE_HEIGHT - LANE_HEIGHT / 4.0f;
|
||||
float startX = LANE_WIDTH / 3;
|
||||
float startY = LANE_HEIGHT - LANE_HEIGHT / 4;
|
||||
float endX = startX;
|
||||
float endY = startY - RIGHT_TURN_VERTICAL_SECTION_HEIGHT;
|
||||
|
||||
@@ -717,20 +717,20 @@ public class LaneMarkTools {
|
||||
paint.setStyle(Style.FILL);
|
||||
|
||||
Path path = new Path();
|
||||
path.moveTo(endX - RIGHT_TURN_VERTICAL_SECTION_WIDTH / 2.0f, endY);
|
||||
path.lineTo(endX - RIGHT_TURN_VERTICAL_SECTION_WIDTH / 2.0f, endY + RIGHT_FRONT_TURN_SLOPE_THICKNESS);
|
||||
path.lineTo(endX - RIGHT_TURN_VERTICAL_SECTION_WIDTH / 2.0f + RIGHT_FRONT_TURN_SLOPE_WIDTH, endY);
|
||||
path.lineTo(endX - RIGHT_TURN_VERTICAL_SECTION_WIDTH / 2.0f + RIGHT_FRONT_TURN_SLOPE_WIDTH, endY - RIGHT_FRONT_TURN_SLOPE_THICKNESS);
|
||||
path.moveTo(endX - RIGHT_TURN_VERTICAL_SECTION_WIDTH / 2, endY);
|
||||
path.lineTo(endX - RIGHT_TURN_VERTICAL_SECTION_WIDTH / 2, endY + RIGHT_FRONT_TURN_SLOPE_THICKNESS);
|
||||
path.lineTo(endX - RIGHT_TURN_VERTICAL_SECTION_WIDTH / 2 + RIGHT_FRONT_TURN_SLOPE_WIDTH, endY);
|
||||
path.lineTo(endX - RIGHT_TURN_VERTICAL_SECTION_WIDTH / 2 + RIGHT_FRONT_TURN_SLOPE_WIDTH, endY - RIGHT_FRONT_TURN_SLOPE_THICKNESS);
|
||||
|
||||
canvas.drawPath(path, paint);
|
||||
|
||||
Bitmap triangleImage = getRenderTriangleImage(isW).bitmap;
|
||||
float translationX = endX - RIGHT_TURN_VERTICAL_SECTION_WIDTH / 2.0f + RIGHT_FRONT_TURN_SLOPE_WIDTH + TRIANGLE_IMAGE_HEIGHT;
|
||||
float translationY = endY - RIGHT_FRONT_TURN_SLOPE_THICKNESS / 2.0f;
|
||||
float translationX = endX - RIGHT_TURN_VERTICAL_SECTION_WIDTH / 2 + RIGHT_FRONT_TURN_SLOPE_WIDTH + TRIANGLE_IMAGE_HEIGHT;
|
||||
float translationY = endY - RIGHT_FRONT_TURN_SLOPE_THICKNESS / 2;
|
||||
canvas.save();
|
||||
canvas.translate(translationX, translationY);
|
||||
canvas.rotate(90);
|
||||
canvas.drawBitmap(triangleImage, -(triangleImage.getWidth() / 2.0f), 0, paint);
|
||||
canvas.drawBitmap(triangleImage, -(triangleImage.getWidth() / 2), 0, paint);
|
||||
canvas.restore();
|
||||
|
||||
BitmapInfo info = new BitmapInfo();
|
||||
@@ -769,10 +769,10 @@ public class LaneMarkTools {
|
||||
paint.setStyle(Style.FILL);
|
||||
|
||||
Path path = new Path();
|
||||
path.moveTo(endX + LEFT_TURN_VERTICAL_SECTION_WIDTH / 2.0f, endY);
|
||||
path.lineTo(endX + LEFT_TURN_VERTICAL_SECTION_WIDTH / 2.0f, endY + LEFT_FRONT_TURN_SLOPE_THICKNESS);
|
||||
path.lineTo(endX + LEFT_TURN_VERTICAL_SECTION_WIDTH / 2.0f - LEFT_FRONT_TURN_SLOPE_WIDTH, endY);
|
||||
path.lineTo(endX + LEFT_TURN_VERTICAL_SECTION_WIDTH / 2.0f - LEFT_FRONT_TURN_SLOPE_WIDTH, endY - LEFT_FRONT_TURN_SLOPE_THICKNESS);
|
||||
path.moveTo(endX + LEFT_TURN_VERTICAL_SECTION_WIDTH / 2, endY);
|
||||
path.lineTo(endX + LEFT_TURN_VERTICAL_SECTION_WIDTH / 2, endY + LEFT_FRONT_TURN_SLOPE_THICKNESS);
|
||||
path.lineTo(endX + LEFT_TURN_VERTICAL_SECTION_WIDTH / 2 - LEFT_FRONT_TURN_SLOPE_WIDTH, endY);
|
||||
path.lineTo(endX + LEFT_TURN_VERTICAL_SECTION_WIDTH / 2 - LEFT_FRONT_TURN_SLOPE_WIDTH, endY - LEFT_FRONT_TURN_SLOPE_THICKNESS);
|
||||
|
||||
canvas.drawPath(path, paint);
|
||||
|
||||
@@ -782,7 +782,7 @@ public class LaneMarkTools {
|
||||
canvas.save();
|
||||
canvas.translate(translationX, translationY);
|
||||
canvas.rotate(-90);
|
||||
canvas.drawBitmap(triangleImage, -(triangleImage.getWidth() / 2.0f), 0, paint);
|
||||
canvas.drawBitmap(triangleImage, -(triangleImage.getWidth() / 2), 0, paint);
|
||||
canvas.restore();
|
||||
BitmapInfo info = new BitmapInfo();
|
||||
info.bitmap = bitmap;
|
||||
@@ -807,8 +807,8 @@ public class LaneMarkTools {
|
||||
paint.setStrokeWidth(LEFT_TURN_VERTICAL_SECTION_WIDTH);
|
||||
paint.setAntiAlias(true);
|
||||
|
||||
Bitmap leftFrontTurnLaneArrow = getRenderLeftFrontTurnLaneArrow(isW != LEFT_TWO_BIT_MASK).bitmap;
|
||||
Bitmap UTurnLaneArrow = getRenderUTurnLaneArrow(isW != UTURN_BIT_MASK).bitmap;
|
||||
Bitmap leftFrontTurnLaneArrow = getRenderLeftFrontTurnLaneArrow(isW == LEFT_TWO_BIT_MASK?false : true).bitmap;
|
||||
Bitmap UTurnLaneArrow = getRenderUTurnLaneArrow(isW == UTURN_BIT_MASK?false : true).bitmap;
|
||||
|
||||
int translationX = 0;
|
||||
int translationY = LANE_HEIGHT / 4;
|
||||
@@ -864,8 +864,8 @@ public class LaneMarkTools {
|
||||
|
||||
Bitmap bitmap = Bitmap.createBitmap(width, height, Config.ARGB_8888);
|
||||
Canvas canvas = new Canvas(bitmap);
|
||||
Bitmap UTurnLaneArrow = getRenderUTurnLaneArrow(isW != UTURN_BIT_MASK).bitmap;
|
||||
Bitmap rightFrontTurnLaneArrow = getRenderRightFrontTurnLaneArrow(isW != RIGHT_TWO_BIT_MASK).bitmap;
|
||||
Bitmap UTurnLaneArrow = getRenderUTurnLaneArrow(isW == UTURN_BIT_MASK ? false : true).bitmap;
|
||||
Bitmap rightFrontTurnLaneArrow = getRenderRightFrontTurnLaneArrow(isW == RIGHT_TWO_BIT_MASK ? false : true).bitmap;
|
||||
Paint paint = new Paint();
|
||||
paint.setColor(Color.WHITE);
|
||||
paint.setStyle(Style.STROKE);
|
||||
@@ -873,7 +873,7 @@ public class LaneMarkTools {
|
||||
paint.setAntiAlias(true);
|
||||
|
||||
float translationX = -ARC_RADIUS;
|
||||
float translationY = LANE_HEIGHT / 4.0f;
|
||||
float translationY = LANE_HEIGHT / 4;
|
||||
canvas.save();
|
||||
if(isW != UTURN_BIT_MASK)
|
||||
{
|
||||
@@ -884,8 +884,8 @@ public class LaneMarkTools {
|
||||
|
||||
if(isW != RIGHT_TWO_BIT_MASK)
|
||||
{
|
||||
translationX = RIGHT_FRONT_TURN_SLOPE_WIDTH / 2.0f;
|
||||
translationY = -(LANE_HEIGHT / 8.0f);
|
||||
translationX = RIGHT_FRONT_TURN_SLOPE_WIDTH / 2;
|
||||
translationY = -(LANE_HEIGHT / 8);
|
||||
canvas.translate(translationX, translationY);
|
||||
canvas.drawBitmap(rightFrontTurnLaneArrow, 0, 0, paint);
|
||||
canvas.translate(-translationX, -translationY);
|
||||
@@ -894,15 +894,15 @@ public class LaneMarkTools {
|
||||
if(isW == UTURN_BIT_MASK)
|
||||
{
|
||||
translationX = -ARC_RADIUS;
|
||||
translationY = LANE_HEIGHT / 4.0f;
|
||||
translationY = LANE_HEIGHT / 4;
|
||||
canvas.translate(translationX, translationY);
|
||||
canvas.drawBitmap(UTurnLaneArrow, 0, 0, paint);
|
||||
canvas.translate(-translationX, -translationY);
|
||||
}
|
||||
else if(isW == RIGHT_TWO_BIT_MASK)
|
||||
{
|
||||
translationX = RIGHT_FRONT_TURN_SLOPE_WIDTH / 2.0f;
|
||||
translationY = -(LANE_HEIGHT / 8.0f);
|
||||
translationX = RIGHT_FRONT_TURN_SLOPE_WIDTH / 2;
|
||||
translationY = -(LANE_HEIGHT / 8);
|
||||
canvas.translate(translationX, translationY);
|
||||
canvas.drawBitmap(rightFrontTurnLaneArrow, 0, 0, paint);
|
||||
canvas.translate(-translationX, -translationY);
|
||||
@@ -918,7 +918,7 @@ public class LaneMarkTools {
|
||||
return info;
|
||||
}
|
||||
|
||||
//直行 + 左转 + 右转
|
||||
//直行 + 左转 + 右转ֱ<EFBFBD><EFBFBD> + <20><>ת + <20><>ת
|
||||
public BitmapInfo getRenderStraightAddLeftRightTurnLaneArrow(int isW)
|
||||
{
|
||||
int width = LANE_WIDTH;
|
||||
@@ -934,8 +934,8 @@ public class LaneMarkTools {
|
||||
paint.setAntiAlias(true);
|
||||
|
||||
Bitmap straightLaneArrow = getRenderStraightLaneArrow(isW).bitmap;
|
||||
Bitmap leftFrontTurnArrow = getRenderLeftFrontTurnLaneArrow(isW != LEFT_TWO_BIT_MASK).bitmap;
|
||||
Bitmap RightFrontTurnArrow = getRenderRightFrontTurnLaneArrow(isW != RIGHT_TWO_BIT_MASK).bitmap;
|
||||
Bitmap leftFrontTurnArrow = getRenderLeftFrontTurnLaneArrow(isW == LEFT_TWO_BIT_MASK ? false : true).bitmap;
|
||||
Bitmap RightFrontTurnArrow = getRenderRightFrontTurnLaneArrow(isW == RIGHT_TWO_BIT_MASK ? false : true).bitmap;
|
||||
int translationX = -(LEFT_FRONT_TURN_SLOPE_WIDTH / 2);
|
||||
int translationY = LANE_HEIGHT / 6;
|
||||
canvas.save();
|
||||
@@ -1015,7 +1015,7 @@ public class LaneMarkTools {
|
||||
paint.setAntiAlias(true);
|
||||
|
||||
Bitmap straightLaneArrow = getRenderStraightLaneArrow(type).bitmap;
|
||||
Bitmap UTurnLaneArrow = getRenderUTurnLaneArrow(type != UTURN_BIT_MASK).bitmap;
|
||||
Bitmap UTurnLaneArrow = getRenderUTurnLaneArrow(type == UTURN_BIT_MASK ? false : true).bitmap;
|
||||
|
||||
int translationX = -ARC_RADIUS;
|
||||
int translationY = LANE_HEIGHT / 4;
|
||||
@@ -1228,7 +1228,7 @@ public class LaneMarkTools {
|
||||
}else if(mark.isUTurn)
|
||||
{
|
||||
//获取 "调头" 车道箭头图元
|
||||
bitmap = getRenderUTurnLaneArrow(highType != UTURN_BIT_MASK);
|
||||
bitmap = getRenderUTurnLaneArrow(highType == UTURN_BIT_MASK ? false : true);
|
||||
}
|
||||
|
||||
return bitmap;
|
||||
|
||||
@@ -530,7 +530,7 @@ class MapEngine {
|
||||
}
|
||||
}
|
||||
|
||||
fun setHDTypeVisibile(type: IntArray?) {
|
||||
fun setHDTypeVisible(type: IntArray?) {
|
||||
if (mObj != 0L) {
|
||||
setHDTypeVisibileJni(mObj, type)
|
||||
}
|
||||
@@ -821,10 +821,16 @@ class MapEngine {
|
||||
} else false
|
||||
}
|
||||
|
||||
fun updateBatchAnchorPositon(dataStr: String): Boolean {
|
||||
return if (mObj != 0L) {
|
||||
updateBatchAnchorPositonJni(mObj, dataStr)
|
||||
} else false
|
||||
// fun updateBatchAnchorPositon(dataStr: String): Boolean {
|
||||
// return if (mObj != 0L) {
|
||||
// updateBatchAnchorPositonJni(mObj, dataStr)
|
||||
// } else false
|
||||
// }
|
||||
|
||||
fun updateBatchAnchorPositon(data: ByteArray?): Boolean{
|
||||
return if(mObj != 0L){
|
||||
updateBatchAnchorPositonJni(mObj,data);
|
||||
}else false
|
||||
}
|
||||
|
||||
fun setAnchorFlash(id: String, colorType: Int, color: String, time: Float, angle: Float) {
|
||||
@@ -1534,7 +1540,9 @@ class MapEngine {
|
||||
private external fun isAnchorDynamicMovingJni(obj: Long, anchorID: String): Boolean
|
||||
|
||||
//批量更新
|
||||
private external fun updateBatchAnchorPositonJni(obj: Long, dataStr: String): Boolean
|
||||
// private external fun updateBatchAnchorPositonJni(obj: Long, dataStr: String): Boolean
|
||||
|
||||
private external fun updateBatchAnchorPositonJni(obj: Long, data: ByteArray?): Boolean
|
||||
|
||||
private external fun setAnchorFlashJni(
|
||||
obj: Long,
|
||||
|
||||
@@ -5,7 +5,10 @@ import android.graphics.Bitmap
|
||||
import android.graphics.Point
|
||||
import android.opengl.GLException
|
||||
import android.opengl.GLSurfaceView
|
||||
import android.os.*
|
||||
import android.os.Build
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import android.view.GestureDetector
|
||||
@@ -29,10 +32,9 @@ import com.zhidaoauto.map.sdk.open.MapAutoApi
|
||||
import com.zhidaoauto.map.sdk.open.abs.IRenderData
|
||||
import com.zhidaoauto.map.sdk.open.abs.marker.OnMarkerDragListener
|
||||
import com.zhidaoauto.map.sdk.open.abs.view.IMapStyleParams
|
||||
import com.zhidaoauto.map.sdk.open.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerInfo
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerOptions
|
||||
import com.zhidaoauto.map.sdk.open.tools.MapTools
|
||||
import com.zhidaoauto.map.sdk.open.common.tools.MapTools
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.MarkerOptions
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
@@ -142,42 +144,38 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
// 耗时专用协程
|
||||
private val mDemaningScope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
|
||||
|
||||
private var mHandler:Handler
|
||||
init {
|
||||
val mapViewThread = HandlerThread("mapViewDrawer")
|
||||
mapViewThread.start()
|
||||
mHandler = object : Handler(mapViewThread.looper) {
|
||||
override fun handleMessage(msg: Message) {
|
||||
when (msg.what) {
|
||||
ZOOM_CHANGE -> mMapController?.dispatchZoomChanged(msg.obj as Float)
|
||||
// ROTATE_CHANGE ->mMapController?.dispatchRotationAngleChanged((msg.obj as Float))
|
||||
// DAngle_CHANGE -> mMapController?.dispatchDAngleChanged()
|
||||
// FOCUS_CHANGE -> mMapController?.dispatchFocusChanged()
|
||||
RENDER_CHANGE -> {
|
||||
mEventController?.dispatchRenderListener(msg.arg1)
|
||||
}
|
||||
RENDER_COMPLETE -> {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--load render complete-start")
|
||||
}
|
||||
// CommonEventController.instance?.dispatchCameraChangeFinishListener(CommonController.instance.mapAutoView?.getMapAutoViewHelper()?.getCameraPosition() ?: null)
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--load render complete-end")
|
||||
}
|
||||
}
|
||||
LOAD_COMPLETE -> {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--load complete-start")
|
||||
}
|
||||
mEventController?.dispatchMapLoadedListener()
|
||||
}
|
||||
|
||||
INIT_COMPLETE -> {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--init complete-start")
|
||||
}
|
||||
mEventController?.dispatchMapLoadedInitListener()
|
||||
private val mHandler: Handler = object : Handler(Looper.getMainLooper()) {
|
||||
override fun handleMessage(msg: Message) {
|
||||
when (msg.what) {
|
||||
ZOOM_CHANGE -> mMapController?.dispatchZoomChanged(msg.obj as Float)
|
||||
ROTATE_CHANGE ->mMapController?.dispatchRotationAngleChanged((msg.obj as Float))
|
||||
DAngle_CHANGE -> mMapController?.dispatchDAngleChanged(msg.obj as Float)
|
||||
FOCUS_CHANGE -> mMapController?.dispatchFocusChanged()
|
||||
RENDER_CHANGE -> {
|
||||
mEventController?.dispatchRenderListener(msg.arg1)
|
||||
}
|
||||
RENDER_COMPLETE -> {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--load render complete-start")
|
||||
}
|
||||
// CommonEventController.instance?.dispatchCameraChangeFinishListener(CommonController.instance.mapAutoView?.getMapAutoViewHelper()?.getCameraPosition() ?: null)
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--load render complete-end")
|
||||
}
|
||||
}
|
||||
LOAD_COMPLETE -> {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--load complete-start")
|
||||
}
|
||||
mEventController?.dispatchMapLoadedListener()
|
||||
}
|
||||
|
||||
INIT_COMPLETE -> {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--init complete-start")
|
||||
}
|
||||
mEventController?.dispatchMapLoadedInitListener()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -337,8 +335,8 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
|
||||
private var x = 0.0
|
||||
private var y = 0.0
|
||||
private fun jsonToObj(json: String?): MarkerInfo? {
|
||||
return JSON.parseObject(json, MarkerInfo::class.java)
|
||||
private fun jsonToObj(json: String?): com.zhidaoauto.map.sdk.open.renders.marker.MarkerInfo? {
|
||||
return JSON.parseObject(json, com.zhidaoauto.map.sdk.open.renders.marker.MarkerInfo::class.java)
|
||||
}
|
||||
|
||||
private var isTouchingFlag = false
|
||||
@@ -720,9 +718,9 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
}
|
||||
mMapEngine.setIsEnableShadow(mMapStyleParams.isShadowEnable())
|
||||
loadOverCallbak()
|
||||
// if(mMapStyleParams.getHDVisibileArray().isNotEmpty()){
|
||||
// mMapEngine.setHDTypeVisibile(mMapStyleParams.getHDVisibileArray())
|
||||
// }
|
||||
if(mMapStyleParams.getHDVisibileArray().isNotEmpty()){
|
||||
mMapEngine.setHDTypeVisible(mMapStyleParams.getHDVisibileArray())
|
||||
}
|
||||
//默认锁车模式
|
||||
mMapEngine.setLockSelfCar(true)
|
||||
mMapController?.setMapStyle(styleMode)
|
||||
@@ -751,6 +749,8 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
if(mMapStyleParams.isSkyBoxEnable()) {
|
||||
mMapController?.setSkyBoxMode()
|
||||
}
|
||||
isFling = false
|
||||
isRotate = false
|
||||
mSurfaceCreated.set(true)
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop-surfaceop--selfop--onSurfaceCreated:${mSurfaceCreated}")
|
||||
@@ -857,7 +857,8 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
val markerInfo = jsonToObj(resultInfo)
|
||||
|
||||
if (markerInfo != null) {
|
||||
val marker: Marker = Marker(MarkerOptions(markerInfo.id,null).setGps(true).position(
|
||||
val marker: Marker = Marker(
|
||||
MarkerOptions(markerInfo.id,null).setGps(true).position(
|
||||
LonLatPoint(markerInfo.lon, markerInfo.lat)
|
||||
).setAssInfo(markerInfo.assInfo),mMapController,mMarkerCall)
|
||||
lastClickMarker?.let {
|
||||
@@ -1083,13 +1084,13 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
private var isScroll = true
|
||||
|
||||
//可以斜滑
|
||||
private var isFling = false
|
||||
private var isFling = true
|
||||
|
||||
//可以旋转
|
||||
private var isRotate = false
|
||||
private var isRotate = true
|
||||
|
||||
//可以缩放
|
||||
private var isCanZoom = false
|
||||
private var isCanZoom = true
|
||||
|
||||
private var isVr = true
|
||||
|
||||
@@ -1151,16 +1152,10 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
}
|
||||
|
||||
fun onMapFocusChanging() {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--onMapFocusChanging")
|
||||
}
|
||||
mHandler.sendEmptyMessage(FOCUS_CHANGE)
|
||||
}
|
||||
|
||||
fun onMapZoomChanging(zoomIndex: Float) {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--onMapZoomChanging--:${zoomIndex}")
|
||||
}
|
||||
val msg = Message.obtain()
|
||||
msg.what = ZOOM_CHANGE
|
||||
msg.obj = zoomIndex
|
||||
@@ -1168,9 +1163,6 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
}
|
||||
|
||||
fun onMapRAngleChanging(angle:Float) {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--onMapRAngleChanging:${angle}")
|
||||
}
|
||||
val msg = Message.obtain()
|
||||
msg.what = ROTATE_CHANGE
|
||||
msg.obj = angle
|
||||
@@ -1178,9 +1170,6 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
}
|
||||
|
||||
fun onMapDAngleChanging(angle:Float) {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "mapop--onMapDAngleChanging:${angle}")
|
||||
}
|
||||
val msg = Message.obtain()
|
||||
msg.what = DAngle_CHANGE
|
||||
msg.obj = angle
|
||||
@@ -1276,9 +1265,9 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
}
|
||||
|
||||
private fun renderDataCallback(data: String) {
|
||||
if(DEBUG){
|
||||
Log.d("renderDataCallback", "renderDataCallback:$data")
|
||||
}
|
||||
// if(DEBUG){
|
||||
// Log.d("renderDataCallback", "renderDataCallback:$data")
|
||||
// }
|
||||
renderDataCall?.renderDataResult(data)
|
||||
}
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ import com.zhidaoauto.map.sdk.open.abs.OnRoadSideFenceRegionListener
|
||||
import com.zhidaoauto.map.sdk.open.abs.OnRoamStatusListener
|
||||
import com.zhidaoauto.map.sdk.open.abs.OnScrollListener
|
||||
import com.zhidaoauto.map.sdk.open.abs.log.ILog
|
||||
import com.zhidaoauto.map.sdk.open.camera.CameraPosition
|
||||
import com.zhidaoauto.map.sdk.open.location.MogoLocation
|
||||
import com.zhidaoauto.map.sdk.open.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.marker.OnMarkClickListener
|
||||
import com.zhidaoauto.map.sdk.open.logics.camera.CameraPosition
|
||||
import com.zhidaoauto.map.sdk.open.logics.location.MogoLocation
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.OnMarkClickListener
|
||||
|
||||
interface IEventController {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zhidaoauto.map.sdk.inner.abs
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.location.MyLocationStyle
|
||||
import com.zhidaoauto.map.sdk.open.logics.location.MyLocationStyle
|
||||
|
||||
interface ILocationView {
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@ import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
import com.zhidaoauto.map.sdk.inner.element.MapCoordinate
|
||||
import com.zhidaoauto.map.sdk.inner.use.Clerk
|
||||
import com.zhidaoauto.map.sdk.open.abs.view.IMapStyleParams
|
||||
import com.zhidaoauto.map.sdk.open.circle.CircleController
|
||||
import com.zhidaoauto.map.sdk.open.circle.CircleOptions
|
||||
import com.zhidaoauto.map.sdk.open.deadzone.DeadZone
|
||||
import com.zhidaoauto.map.sdk.open.deadzone.DeadZoneOptions
|
||||
import com.zhidaoauto.map.sdk.open.poyline.Polyline
|
||||
import com.zhidaoauto.map.sdk.open.poyline.PolylineOptions
|
||||
import com.zhidaoauto.map.sdk.open.weather.WeatherResult
|
||||
import com.zhidaoauto.map.sdk.open.logics.circle.CircleController
|
||||
import com.zhidaoauto.map.sdk.open.logics.circle.CircleOptions
|
||||
import com.zhidaoauto.map.sdk.open.logics.deadzone.DeadZone
|
||||
import com.zhidaoauto.map.sdk.open.logics.deadzone.DeadZoneOptions
|
||||
import com.zhidaoauto.map.sdk.open.renders.poyline.Polyline
|
||||
import com.zhidaoauto.map.sdk.open.renders.poyline.PolylineOptions
|
||||
import com.zhidaoauto.map.sdk.open.logics.weather.WeatherResult
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
||||
interface IMapController {
|
||||
@@ -405,7 +405,9 @@ interface IMapController {
|
||||
fun isAnchorDynamicMoving(anchorID: String): Boolean
|
||||
|
||||
//批量更新
|
||||
fun updateBatchAnchorPositon(dataStr: String): Boolean
|
||||
// fun updateBatchAnchorPositon(dataStr: String): Boolean
|
||||
|
||||
fun updateBatchAnchorPositon(data: ByteArray?): Boolean
|
||||
|
||||
fun setAnchorFlash(id: String, colorType: Int, color: String, time: Float, angle: Float)
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ package com.zhidaoauto.map.sdk.inner.abs
|
||||
import android.graphics.Rect
|
||||
import com.zhidaoauto.map.sdk.inner.marker.IInfoViewClick
|
||||
import com.zhidaoauto.map.sdk.open.abs.marker.OnMarkerDragListener
|
||||
import com.zhidaoauto.map.sdk.open.marker.OnAnimationListener
|
||||
import com.zhidaoauto.map.sdk.open.marker.OnInfoWindowClickListener
|
||||
import com.zhidaoauto.map.sdk.open.marker.OnMarkClickListener
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.OnAnimationListener
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.OnInfoWindowClickListener
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.OnMarkClickListener
|
||||
|
||||
interface IMarkerCall {
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.zhidaoauto.map.sdk.inner.abs
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.abs.marker.InfoWindowAdapter
|
||||
import com.zhidaoauto.map.sdk.open.marker.BatchMarkerOptions
|
||||
import com.zhidaoauto.map.sdk.open.marker.CarInfo
|
||||
import com.zhidaoauto.map.sdk.open.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerOptions
|
||||
import com.zhidaoauto.map.sdk.open.marker.MultiPointController
|
||||
import com.zhidaoauto.map.sdk.open.marker.MultiPointOverlayOptions
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.BatchMarkerOptions
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.CarInfo
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.MarkerOptions
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.MultiPointController
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.MultiPointOverlayOptions
|
||||
|
||||
interface IMarkerController {
|
||||
|
||||
@@ -27,7 +27,7 @@ interface IMarkerController {
|
||||
/**
|
||||
* 批量更新他车
|
||||
*/
|
||||
fun updateBatchMarkerPositon(batchMarkerOptions: BatchMarkerOptions)
|
||||
fun updateBatchMarkerPositon(batchMarkerOptions: com.zhidaoauto.map.sdk.open.renders.marker.BatchMarkerOptions)
|
||||
//根据车辆类型预添加车辆模型
|
||||
fun addPreVehicleModel(type:Int,modelRes:Int):String?
|
||||
//添加普通模型
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zhidaoauto.map.sdk.inner.abs
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.nav.NavPoi
|
||||
import com.zhidaoauto.map.sdk.open.nav.abs.NaviListener
|
||||
import com.zhidaoauto.map.sdk.open.nav.model.NaviPath
|
||||
import com.zhidaoauto.map.sdk.open.nav.model.NaviSetting
|
||||
import com.zhidaoauto.map.sdk.open.logics.nav.NavPoi
|
||||
import com.zhidaoauto.map.sdk.open.logics.nav.abs.NaviListener
|
||||
import com.zhidaoauto.map.sdk.open.logics.nav.model.NaviPath
|
||||
import com.zhidaoauto.map.sdk.open.logics.nav.model.NaviSetting
|
||||
|
||||
interface INaviController {
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.zhidaoauto.map.sdk.inner.abs
|
||||
|
||||
interface IWeatherController {
|
||||
|
||||
fun destory()
|
||||
|
||||
fun setWeahterEnable(enable:Boolean)
|
||||
|
||||
fun updateLocation(lon:Double,lat:Double)
|
||||
}
|
||||
@@ -39,10 +39,8 @@ public class PayloadEncoder {
|
||||
switch (typeName) {
|
||||
case "com.autonavi.nge.map.LonLat":
|
||||
LonLat lonLat = (LonLat) value;
|
||||
if(lonLat != null){
|
||||
buffer.writeDouble(lonLat.getLon());
|
||||
buffer.writeDouble(lonLat.getLat());
|
||||
}
|
||||
buffer.writeDouble(lonLat.getLon());
|
||||
buffer.writeDouble(lonLat.getLat());
|
||||
break;
|
||||
case "java.lang.Boolean":
|
||||
case "kotlin.Boolean":
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.zhidaoauto.map.sdk.open.city
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.city
|
||||
|
||||
import android.util.Log
|
||||
import com.zhidao.map.net.api.Result
|
||||
import com.zhidaoauto.map.sdk.inner.CompileConfig
|
||||
import com.zhidaoauto.map.sdk.inner.controller.CommonController
|
||||
import com.zhidaoauto.map.sdk.open.logics.city.CityCodeInfo
|
||||
import com.zhidaoauto.map.sdk.open.logics.city.CityCodeResult
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.zhidaoauto.map.sdk.open.city
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.city
|
||||
|
||||
import com.zhidao.map.net.api.BaseRepository
|
||||
import com.zhidao.map.net.api.Result
|
||||
import com.zhidaoauto.map.sdk.open.net.CityCodeRetrofitClient
|
||||
import com.zhidaoauto.map.sdk.inner.cloud.net.CityCodeRetrofitClient
|
||||
import com.zhidaoauto.map.sdk.open.logics.city.CityCodeInfo
|
||||
|
||||
|
||||
class CityCodeRepository: BaseRepository() {
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zhidaoauto.map.sdk.open.navi
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.navi
|
||||
|
||||
import com.zhidao.map.net.api.Result
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.zhidaoauto.map.sdk.open.navi
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.navi
|
||||
|
||||
import com.zhidao.map.net.api.BaseRepository
|
||||
import com.zhidao.map.net.api.Result
|
||||
import com.zhidaoauto.map.sdk.open.net.NavRetrofitClient
|
||||
import com.zhidaoauto.map.sdk.inner.cloud.net.NavRetrofitClient
|
||||
import com.zhidaoauto.map.sdk.open.logics.navi.NaviResponse
|
||||
|
||||
class NaviRepository: BaseRepository() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zhidaoauto.map.sdk.open.net
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.net
|
||||
|
||||
|
||||
import android.util.Log
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zhidaoauto.map.sdk.open.net
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.net
|
||||
|
||||
import com.zhidao.map.net.api.BaseResponse
|
||||
import com.zhidaoauto.map.sdk.open.city.CityCodeInfo
|
||||
import com.zhidaoauto.map.sdk.open.logics.city.CityCodeInfo
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Query
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zhidaoauto.map.sdk.open.net
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.net
|
||||
|
||||
|
||||
import android.util.Log
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.zhidaoauto.map.sdk.open.net
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.net
|
||||
|
||||
|
||||
import com.zhidao.map.net.api.BaseResponse
|
||||
import com.zhidaoauto.map.sdk.open.navi.NaviResponse
|
||||
import com.zhidaoauto.map.sdk.open.logics.navi.NaviResponse
|
||||
import retrofit2.http.*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zhidaoauto.map.sdk.open.net
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.net
|
||||
|
||||
|
||||
import android.util.Log
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zhidaoauto.map.sdk.open.net
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.net
|
||||
|
||||
import com.zhidao.map.net.api.BaseResponse
|
||||
import com.zhidaoauto.map.sdk.open.weather.WeatherInfo
|
||||
import com.zhidaoauto.map.sdk.open.logics.weather.WeatherInfo
|
||||
import retrofit2.http.FieldMap
|
||||
import retrofit2.http.FormUrlEncoded
|
||||
import retrofit2.http.POST
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.zhidaoauto.map.sdk.open.weather
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.weather
|
||||
|
||||
import android.util.Log
|
||||
import com.zhidao.map.net.api.Result
|
||||
import com.zhidaoauto.map.sdk.inner.CompileConfig
|
||||
import com.zhidaoauto.map.sdk.inner.controller.CommonController
|
||||
import com.zhidaoauto.map.sdk.open.logics.weather.WeatherInfo
|
||||
import com.zhidaoauto.map.sdk.open.logics.weather.WeatherResult
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.zhidaoauto.map.sdk.open.weather
|
||||
package com.zhidaoauto.map.sdk.inner.cloud.weather
|
||||
|
||||
import com.zhidao.map.net.api.BaseRepository
|
||||
import com.zhidao.map.net.api.Result
|
||||
import com.zhidaoauto.map.sdk.open.net.WeatherRetrofitClient
|
||||
import com.zhidaoauto.map.sdk.inner.cloud.net.WeatherRetrofitClient
|
||||
import com.zhidaoauto.map.sdk.open.logics.weather.WeatherInfo
|
||||
|
||||
|
||||
class WeatherRepository: BaseRepository() {
|
||||
@@ -139,7 +139,6 @@ object ConstantExt {
|
||||
const val MAP_STYLE_VR_ZOOM_VAL_SKYBOX = 0.8f//缩放
|
||||
const val MAP_STYLE_VR_EYE_HEIGHT_SKYBOX = 12f//高度
|
||||
const val MAP_STYLE_VR_ANIMATE_TIME_SKYBOX = 1500
|
||||
|
||||
//默认尾灯不亮
|
||||
const val SELF_CAR_DEFAULT = 0
|
||||
//尾灯左黄
|
||||
@@ -177,7 +176,7 @@ object ConstantExt {
|
||||
|
||||
//设置天空盒
|
||||
const val FOG = "fog"
|
||||
const val SKYBOX = "skybox"
|
||||
const val SKYBOX = "skyboxView"
|
||||
const val ROADTEXSIZE = "roadTexSize"
|
||||
const val ROAD = "roadUseTex"
|
||||
const val PLANE = "planeUseTex"
|
||||
|
||||
@@ -2,9 +2,10 @@ package com.zhidaoauto.map.sdk.inner.common
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.NavParams
|
||||
|
||||
|
||||
object NavHelper {
|
||||
|
||||
var mNavParams:NavParams = NavParams.init()
|
||||
var mNavParams: NavParams = NavParams.init()
|
||||
|
||||
fun init(navParams: NavParams){
|
||||
mNavParams = navParams
|
||||
|
||||
@@ -22,10 +22,10 @@ import com.zhidaoauto.map.sdk.open.abs.OnRoadSideFenceRegionListener
|
||||
import com.zhidaoauto.map.sdk.open.abs.OnRoamStatusListener
|
||||
import com.zhidaoauto.map.sdk.open.abs.OnScrollListener
|
||||
import com.zhidaoauto.map.sdk.open.abs.log.ILog
|
||||
import com.zhidaoauto.map.sdk.open.camera.CameraPosition
|
||||
import com.zhidaoauto.map.sdk.open.location.MogoLocation
|
||||
import com.zhidaoauto.map.sdk.open.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.marker.OnMarkClickListener
|
||||
import com.zhidaoauto.map.sdk.open.logics.camera.CameraPosition
|
||||
import com.zhidaoauto.map.sdk.open.logics.location.MogoLocation
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.OnMarkClickListener
|
||||
|
||||
class MapEventController(): IEventController {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.location.Location;
|
||||
|
||||
import com.autonavi.nge.obj.DestObj;
|
||||
import com.autonavi.nge.obj.PoiBase;
|
||||
import com.zhidaoauto.map.sdk.open.nav.NavPoi;
|
||||
import com.zhidaoauto.map.sdk.open.logics.nav.NavPoi;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
@@ -6,13 +6,13 @@ import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class M3DCar {
|
||||
private final Context context;
|
||||
private final int redis;
|
||||
private Context context;
|
||||
private int resid;
|
||||
public byte[] totBuffer = null;
|
||||
public int totSize = 0;
|
||||
|
||||
public M3DCar(Context context, int redis) {
|
||||
this.redis = redis;
|
||||
public M3DCar(Context context, int resid) {
|
||||
this.resid = resid;
|
||||
this.context = context;
|
||||
loadData();
|
||||
}
|
||||
@@ -20,12 +20,12 @@ public class M3DCar {
|
||||
private void loadData() {
|
||||
if (null != totBuffer)
|
||||
return;
|
||||
;
|
||||
DataInputStream dis = new DataInputStream(context.getResources().openRawResource(resid));
|
||||
int curTotSize = 64 * 1024;
|
||||
totBuffer = new byte[curTotSize];
|
||||
byte[] buffer = new byte[1024];
|
||||
int size;
|
||||
try(DataInputStream dis = new DataInputStream(context.getResources().openRawResource(redis))) {
|
||||
int size = 0;
|
||||
try {
|
||||
while ((size = dis.read(buffer)) >= 0) {
|
||||
if (totSize + size > curTotSize) {
|
||||
curTotSize = (totSize + size) * 3 / 2;
|
||||
@@ -36,8 +36,8 @@ public class M3DCar {
|
||||
System.arraycopy(buffer, 0, totBuffer, totSize, size);
|
||||
totSize += size;
|
||||
}
|
||||
dis.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.zhidaoauto.map.sdk.inner.abs.IMapController
|
||||
import com.zhidaoauto.map.sdk.inner.abs.IMarkerController
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi
|
||||
import com.zhidaoauto.map.sdk.open.abs.view.IMapStyleParams
|
||||
import com.zhidaoauto.map.sdk.open.location.MyLocationStyle
|
||||
import com.zhidaoauto.map.sdk.open.logics.location.MyLocationStyle
|
||||
import io.netty.util.internal.StringUtil
|
||||
|
||||
class LocationHelper(
|
||||
|
||||
@@ -2,9 +2,9 @@ package com.zhidaoauto.map.sdk.inner.map
|
||||
|
||||
import android.graphics.Point
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
import com.zhidaoauto.map.sdk.open.camera.CameraPosition
|
||||
import com.zhidaoauto.map.sdk.open.camera.LatLngBounds
|
||||
import com.zhidaoauto.map.sdk.open.camera.MapCameraMessage
|
||||
import com.zhidaoauto.map.sdk.open.logics.camera.CameraPosition
|
||||
import com.zhidaoauto.map.sdk.open.logics.camera.LatLngBounds
|
||||
import com.zhidaoauto.map.sdk.open.logics.camera.MapCameraMessage
|
||||
|
||||
class MapCameraMessageImpl private constructor() : MapCameraMessage() {
|
||||
/* private var a: Float = 0.toFloat()
|
||||
|
||||
@@ -28,22 +28,18 @@ import com.zhidaoauto.map.sdk.inner.marker.RecycleController
|
||||
import com.zhidaoauto.map.sdk.inner.panel.PolyLineView
|
||||
import com.zhidaoauto.map.sdk.inner.road.RoadHelper
|
||||
import com.zhidaoauto.map.sdk.inner.use.Clerk
|
||||
import com.zhidaoauto.map.sdk.inner.utils.GisGeomTool
|
||||
import com.zhidaoauto.map.sdk.inner.utils.LogHelper
|
||||
import com.zhidaoauto.map.sdk.inner.utils.MathUtils
|
||||
import com.zhidaoauto.map.sdk.inner.utils.TransformUtils
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi
|
||||
import com.zhidaoauto.map.sdk.inner.utils.*
|
||||
import com.zhidaoauto.map.sdk.open.abs.IResult
|
||||
import com.zhidaoauto.map.sdk.open.abs.view.IMapStyleParams
|
||||
import com.zhidaoauto.map.sdk.open.circle.CircleController
|
||||
import com.zhidaoauto.map.sdk.open.circle.CircleOptions
|
||||
import com.zhidaoauto.map.sdk.open.deadzone.DeadZone
|
||||
import com.zhidaoauto.map.sdk.open.deadzone.DeadZoneOptions
|
||||
import com.zhidaoauto.map.sdk.open.poyline.Polyline
|
||||
import com.zhidaoauto.map.sdk.open.poyline.PolylineOptions
|
||||
import com.zhidaoauto.map.sdk.open.tools.MapTools
|
||||
import com.zhidaoauto.map.sdk.open.weather.WeatherModel
|
||||
import com.zhidaoauto.map.sdk.open.weather.WeatherResult
|
||||
import com.zhidaoauto.map.sdk.open.logics.circle.CircleController
|
||||
import com.zhidaoauto.map.sdk.open.logics.circle.CircleOptions
|
||||
import com.zhidaoauto.map.sdk.open.logics.deadzone.DeadZone
|
||||
import com.zhidaoauto.map.sdk.open.logics.deadzone.DeadZoneOptions
|
||||
import com.zhidaoauto.map.sdk.open.renders.poyline.Polyline
|
||||
import com.zhidaoauto.map.sdk.open.renders.poyline.PolylineOptions
|
||||
import com.zhidaoauto.map.sdk.open.common.tools.MapTools
|
||||
import com.zhidaoauto.map.sdk.inner.cloud.weather.WeatherModel
|
||||
import com.zhidaoauto.map.sdk.open.logics.weather.WeatherResult
|
||||
import io.netty.util.internal.StringUtil
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -66,10 +62,8 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
private var mMapPerspective = MAP_PERSPECTIVE_2D
|
||||
private var isFollowCarMode = true
|
||||
private var isMapNorth = false
|
||||
@Volatile
|
||||
private var lastZoom = 16
|
||||
private var lonLat: LonLat? = null
|
||||
@Volatile
|
||||
private var isSetMapStyle = false
|
||||
private var mRoamDis = ConstantExt.ROAM_DIS_1KM
|
||||
private var mSpeed = ConstantExt.ROAM_SPEED_30
|
||||
@@ -544,8 +538,12 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
return mMapView.getMapEngine().isAnchorDynamicMoving(anchorID)
|
||||
}
|
||||
|
||||
override fun updateBatchAnchorPositon(dataStr: String): Boolean {
|
||||
return mMapView.getMapEngine().updateBatchAnchorPositon(dataStr)
|
||||
// override fun updateBatchAnchorPositon(dataStr: String): Boolean {
|
||||
// return mMapView.getMapEngine().updateBatchAnchorPositon(dataStr)
|
||||
// }
|
||||
|
||||
override fun updateBatchAnchorPositon(data: ByteArray?): Boolean {
|
||||
return mMapView.getMapEngine().updateBatchAnchorPositon(data)
|
||||
}
|
||||
|
||||
override fun setAnchorFlash(id: String, colorType: Int, color: String, time: Float, angle: Float) {
|
||||
@@ -682,9 +680,6 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
// lis.onMapStatusChangeListener(LISTENER_TYPE_ROTATE, rotateAngle.toInt())
|
||||
// }
|
||||
// }
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "styleop-dispatchRotationAngleChanged: $rotateAngle")
|
||||
}
|
||||
mEventController?.dispatchMapStatusListener(LISTENER_TYPE_ROTATE, rotateAngle)
|
||||
mEventController?.dispatchCameraChangeListener(LISTENER_TYPE_ROTATE, rotateAngle)
|
||||
}
|
||||
@@ -697,9 +692,6 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
// lis.onMapStatusChangeListener(LISTENER_TYPE_FOCUS, 0)
|
||||
// }
|
||||
// }
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "styleop-dispatchFocusChanged")
|
||||
}
|
||||
mEventController?.dispatchMapStatusListener(LISTENER_TYPE_FOCUS, 0f)
|
||||
mEventController?.dispatchCameraChangeListener(LISTENER_TYPE_FOCUS, 0f)
|
||||
}
|
||||
@@ -726,18 +718,18 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "styleop--dispatchZoomChanged: currentZoom:${currentZoom}, ${mMapView.getMapEngine().getZoomValue()}, isSetMapStyle: ${isSetMapStyle}, ${getMapStyle()}")
|
||||
}
|
||||
if(getMapStyle() >= 5 && currentZoom >= 19){
|
||||
isSetMapStyle = false
|
||||
}else if(getMapStyle() < 5 && currentZoom < 19){
|
||||
isSetMapStyle = false
|
||||
}
|
||||
if(!isSetMapStyle){
|
||||
if (currentZoom < 19 && mMapStyleParams.getStyleMode() >= MapAutoApi.MAP_STYLE_NIGHT_VR) {
|
||||
setMapStyle(MapAutoApi.MAP_STYLE_NIGHT,false)
|
||||
} else if (currentZoom >= 19 && mMapStyleParams.getStyleMode() < MapAutoApi.MAP_STYLE_NIGHT_VR) {
|
||||
setMapStyle(MapAutoApi.MAP_STYLE_NIGHT_VR,false)
|
||||
}
|
||||
}
|
||||
// if(getMapStyle() >= 5 && currentZoom >= 19){
|
||||
// isSetMapStyle = false
|
||||
// }else if(getMapStyle() < 5 && currentZoom < 19){
|
||||
// isSetMapStyle = false
|
||||
// }
|
||||
// if(!isSetMapStyle){
|
||||
// if (currentZoom < 18 && mMapStyleParams.getStyleMode() >= MapAutoApi.MAP_STYLE_NIGHT_VR) {
|
||||
// setMapStyle(MapAutoApi.MAP_STYLE_NIGHT,false)
|
||||
// } else if (currentZoom >= 18 && mMapStyleParams.getStyleMode() < MapAutoApi.MAP_STYLE_NIGHT_VR) {
|
||||
// setMapStyle(MapAutoApi.MAP_STYLE_NIGHT_VR,false)
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -837,7 +829,6 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
mMapView.getMapEngine().setRotateAngle(rotation)
|
||||
}
|
||||
|
||||
@Volatile
|
||||
var mMapStyleMode = 0
|
||||
|
||||
//设置地图风格
|
||||
@@ -977,6 +968,16 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
var lastAnimZoom = 0f
|
||||
var lastOverLookAngle = 0f
|
||||
var lastEyeHeight = 0f
|
||||
/**
|
||||
* Animates the map to a specified location with optional parameters.
|
||||
*
|
||||
* @param lon Longitude of the target location.
|
||||
* @param lat Latitude of the target location.
|
||||
* @param alt Altitude above the ground at the target location.
|
||||
* @param rotateAngle Rotation angle of the map camera. Positive values rotate the map counter-clockwise,
|
||||
* while negative values rotate it clockwise.
|
||||
* @param mDuration Duration of the animation in milliseconds.
|
||||
*/
|
||||
override fun animateTo(
|
||||
lon: Double,
|
||||
lat: Double,
|
||||
@@ -984,31 +985,30 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
rotateAngle: Float, //加是逆时针,减是顺时针
|
||||
mDuration: Int
|
||||
) {
|
||||
// Step animation to calculate perspective and eye height
|
||||
val arrays = mapAnimate.stepAnimation()
|
||||
if (DEBUG) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"animaop--n:${lon},t:${lat},a:${rotateAngle},z: ${arrays[0]}, la: ${arrays[1]}, eh: ${arrays[2]}"
|
||||
)
|
||||
}
|
||||
mMapStyleParams.setVrPerspectiveMode(arrays[0])
|
||||
mMapStyleParams.setVrEyeHeight(arrays[1])
|
||||
//底层读取中心线的高度,暂时不用轨迹的高度
|
||||
// if(mMapStyleParams.getVrAngleMode()==ConstantExt.MAP_STYLE_VR_BRIDGE){
|
||||
// var fac = 100.0f/(arrays[0]*8f)/20f
|
||||
// var lookAtZ = alt + 5.0f
|
||||
// var cameraHeight = arrays[2] + lookAtZ
|
||||
// arrays[2]=cameraHeight*fac;
|
||||
// mMapView.getMapEngine().setScreenToOriginDis(lookAtZ*fac)
|
||||
// }
|
||||
if (lastAnimZoom == arrays[0] && lastOverLookAngle == arrays[1] && lastEyeHeight == arrays[2]) {
|
||||
|
||||
// Debugging information
|
||||
// if (DEBUG) {
|
||||
// Log.d(TAG, "animaop--n:${lon},t:${lat},a:${rotateAngle},z: ${arrays[0]}, la: ${arrays[1]}, eh: ${arrays[2]}")
|
||||
// }
|
||||
|
||||
// Set VR perspective mode and eye height based on animation step values
|
||||
mMapStyleParams.setVrPerspectiveMode(arrays[0])
|
||||
mMapStyleParams.setVrEyeHeight(arrays[2])
|
||||
|
||||
// Check if the animation parameters have not changed
|
||||
if (lastAnimZoom == arrays[0] && lastOverLookAngle == arrays[1] && lastEyeHeight == arrays[2]) {
|
||||
// Animate to the specified location without changing the overlook angle
|
||||
mMapView.getMapEngine()
|
||||
.animateTo(lon, lat, alt, -1f, rotateAngle, -1f, -1f, mDuration, -1f)
|
||||
} else {
|
||||
// Update last animation parameters
|
||||
lastAnimZoom = arrays[0]
|
||||
lastOverLookAngle = arrays[1]
|
||||
lastEyeHeight = arrays[2]
|
||||
|
||||
// Animate to the specified location with updated animation parameters
|
||||
mMapView.getMapEngine().animateTo(
|
||||
lon,
|
||||
lat,
|
||||
@@ -1021,7 +1021,6 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
-1f
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设置navi的层级
|
||||
@@ -1298,7 +1297,6 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
var mLastPosition = LonLatPoint()
|
||||
var mRoamPostion = 0
|
||||
var lastViewType = ConstantExt.MAP_STYLE_VR_ANGLE_MIDDLE
|
||||
|
||||
fun enableSkybox(){
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.SKYBOX, "enable;" +
|
||||
"${ConstantExt.MAP_STYLE_VR_ANIMATE_TIME_SKYBOX}")
|
||||
@@ -1335,7 +1333,6 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
duration,
|
||||
)
|
||||
}
|
||||
|
||||
override fun setMapViewVisualAngle(type: Int) {
|
||||
mHandler.removeMessages(LOCK_CAR)
|
||||
mHandler.removeMessages(CHANGE_VIEW_ANGLE)
|
||||
@@ -1362,9 +1359,11 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
if (!mLockLocation.getLockCar() && type != ConstantExt.MAP_STYLE_VR_ROAM) {
|
||||
mLockLocation.setLockCar(true)
|
||||
}
|
||||
if(type != ConstantExt.MAP_STYLE_VR_BRIDGE){
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.BRIDGE, "disable")
|
||||
}
|
||||
|
||||
// if(type != ConstantExt.MAP_STYLE_VR_BRIDGE){
|
||||
// mMapView.getMapEngine().setCfgKeyVal(ConstantExt.BRIDGE, "disable")
|
||||
// }
|
||||
|
||||
// mMapView.setIsFarViewAngel(false)
|
||||
when (type) {
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_MIDDLE -> {
|
||||
@@ -1373,8 +1372,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_MIDDLE,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_MIDDLE,
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_MIDDLE,
|
||||
-1
|
||||
)
|
||||
-1)
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_MIDDLE_XIAOBA -> {
|
||||
@@ -1383,8 +1381,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_MIDDLE_XIAOBA,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_MIDDLE_XIAOBA,
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_MIDDLE_XIAOBA,
|
||||
-1
|
||||
)
|
||||
-1)
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ERHAI_B2 -> {
|
||||
@@ -1399,6 +1396,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_SKY_BOX -> {
|
||||
enableSkybox()
|
||||
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_FAR -> {
|
||||
@@ -1423,6 +1421,13 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_NEAR -> {
|
||||
disableSkybox(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_NEAR,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_NEAR,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_NEAR,
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_NEAR,
|
||||
-1
|
||||
)
|
||||
if (lonLat != null && lonLat!!.lon != 0.0 && lonLat!!.lat != 0.0) {
|
||||
mLockLocation.setLockCar(false)
|
||||
mHandler.sendEmptyMessageDelayed(CHANGE_VIEW_ANGLE, 5000)
|
||||
@@ -1457,7 +1462,6 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_300,
|
||||
-1
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_TOP -> {
|
||||
@@ -1468,7 +1472,6 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_TOP,
|
||||
-1
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_CROSS -> {
|
||||
@@ -1479,14 +1482,26 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_CROSS,
|
||||
-1
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_ROAM -> {
|
||||
disableSkybox(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_MIDDLE,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_MIDDLE,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_MIDDLE,
|
||||
ConstantExt.MAP_STYLE_VR_ANGLE_MIDDLE,
|
||||
-1)
|
||||
setRoamStyle()
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_TRANS -> {
|
||||
disableSkybox(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_TRANS,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_TRANS,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_TRANS,
|
||||
ConstantExt.MAP_STYLE_VR_TRANS,
|
||||
-1
|
||||
)
|
||||
transJob = getDemaningScope()?.launch(Dispatchers.IO) {
|
||||
destLonLatPoint = mLockLocation.getCurrentLonLatPoint()
|
||||
destLonLatPoint?.let {
|
||||
@@ -1520,17 +1535,17 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
|
||||
}
|
||||
|
||||
ConstantExt.MAP_STYLE_VR_BRIDGE->{
|
||||
mMapView.getMapEngine().setCfgKeyVal(ConstantExt.BRIDGE, "enable")
|
||||
disableSkyboxAndInterpolation(
|
||||
ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_BRIDGE,
|
||||
ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_BRIDGE,
|
||||
ConstantExt.MAP_STYLE_VR_ZOOM_VAL_BRIDGE,
|
||||
ConstantExt.MAP_STYLE_VR_BRIDGE,
|
||||
-1
|
||||
)
|
||||
|
||||
}
|
||||
// ConstantExt.MAP_STYLE_VR_BRIDGE->{
|
||||
// mMapView.getMapEngine().setCfgKeyVal(ConstantExt.BRIDGE, "enable")
|
||||
// disableSkyboxAndInterpolation(
|
||||
// ConstantExt.MAP_STYLE_VR_EYE_HEIGHT_BRIDGE,
|
||||
// ConstantExt.MAP_STYLE_VR_OVER_LOOK_ANGLE_BRIDGE,
|
||||
// ConstantExt.MAP_STYLE_VR_ZOOM_VAL_BRIDGE,
|
||||
// ConstantExt.MAP_STYLE_VR_BRIDGE,
|
||||
// -1
|
||||
// )
|
||||
//
|
||||
// }
|
||||
}
|
||||
if(type != ConstantExt.MAP_STYLE_VR_ROAM) {
|
||||
mEventController?.dispatchMapViewVisualAngleChangeListener(type)
|
||||
@@ -1854,17 +1869,17 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
|
||||
|
||||
|
||||
override fun interpolation(eyeHeight: Float, angle: Float, zoomVal: Float, mode: Int, duration: Int) {
|
||||
override fun interpolation(eyeHeight: Float, overLookAngle: Float, zoomVal: Float, mode: Int, duration: Int) {
|
||||
if(System.currentTimeMillis() - mLockLocation.getLastUpdateTime() > 500
|
||||
|| mLockLocation.getLastUpdateTime() - mLockLocation.getAgainLastUpdateTime() >= 900){
|
||||
mapAnimate.setStartFrame(zoomVal, angle, eyeHeight)
|
||||
mapAnimate.setStartFrame(zoomVal, overLookAngle, eyeHeight)
|
||||
val center = mLockLocation.getCurrentLonLatPoint()
|
||||
val lon: Double = center.longitude
|
||||
val lat: Double = center.latitude
|
||||
animateTo(lon, lat, 0f,-1f, 1000)
|
||||
}else {
|
||||
|
||||
mapAnimate.executeAnim(zoomVal, eyeHeight, angle, duration)
|
||||
mapAnimate.executeAnim(zoomVal, eyeHeight, overLookAngle, duration)
|
||||
}
|
||||
|
||||
mMapStyleParams.setVrAngleMode(mode)
|
||||
@@ -2243,7 +2258,6 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
}
|
||||
|
||||
override fun setHDTypeVisible(type: IntArray?){
|
||||
mMapView.getMapEngine().setHDTypeVisibile(type)
|
||||
mMapView.getMapEngine().setHDTypeVisible(type)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.zhidaoauto.map.sdk.inner.map
|
||||
|
||||
import android.util.Log
|
||||
import com.zhidao.map.net.api.Result
|
||||
import com.zhidaoauto.map.sdk.inner.CompileConfig
|
||||
import com.zhidaoauto.map.sdk.inner.abs.IWeatherController
|
||||
import com.zhidaoauto.map.sdk.inner.cloud.weather.WeatherRepository
|
||||
import com.zhidaoauto.map.sdk.open.data.MapDataApi
|
||||
import com.zhidaoauto.map.sdk.open.logics.weather.WeatherType
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
* WeatherController class responsible for controlling weather-related functionality
|
||||
* @constructor
|
||||
* @param mapAutoView
|
||||
*/
|
||||
class WeatherController(mapAutoView: MapAutoView): IWeatherController {
|
||||
|
||||
private val mMapAutoView: MapAutoView
|
||||
|
||||
// Update interval for weather information (15 minutes)
|
||||
private val INTERVAL: Long = 15 * 60 * 1000L
|
||||
|
||||
// Set of rain weather conditions
|
||||
val rainSet = setOf("小雨", "中雨", "大雨", "暴雨", "大暴雨", "特大暴雨", "雨")
|
||||
// Set of snow weather conditions
|
||||
val snowSet = setOf("小雪", "中雪", "大雪", "暴雪", "雪")
|
||||
// Set of cloudy weather conditions
|
||||
val cloudySet = setOf("阴", "多云")
|
||||
|
||||
private val mWeatherRepository by lazy { WeatherRepository() }
|
||||
private var mLastUpdateTime: Long = 0
|
||||
private var mWeatherEnable: Boolean = true
|
||||
private var mUpdateWeatherJob: Job? = null
|
||||
private var mLocationLon: Double = 0.0
|
||||
private var mLocationLat: Double = 0.0
|
||||
|
||||
companion object {
|
||||
private const val TAG = "WeatherController"
|
||||
}
|
||||
|
||||
init {
|
||||
mMapAutoView = mapAutoView
|
||||
}
|
||||
|
||||
override fun destory() {
|
||||
mWeatherEnable = false
|
||||
mUpdateWeatherJob?.cancel()
|
||||
mUpdateWeatherJob = null
|
||||
}
|
||||
|
||||
override fun setWeahterEnable(enable:Boolean){
|
||||
mWeatherEnable = enable
|
||||
if(mWeatherEnable){
|
||||
// Enable weather updates
|
||||
updateLocation(mLocationLon, mLocationLat)
|
||||
}else{
|
||||
mUpdateWeatherJob?.cancel()
|
||||
mUpdateWeatherJob = null
|
||||
mLastUpdateTime = 0
|
||||
// Disable weather updates and set default weather
|
||||
mMapAutoView?.getMapController()?.setWeatherType(WeatherType.DEFULT.type)
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateLocation(lon:Double, lat:Double){
|
||||
if ((lon == 0.0 || lat == 0.0) || !MapDataApi.isRightLonLat(lon, lat)) {
|
||||
return;
|
||||
}
|
||||
mLocationLon = lon
|
||||
mLocationLat = lat
|
||||
|
||||
// Update weather if enabled and update interval has passed
|
||||
mWeatherEnable = mMapAutoView.getMapStyleParams()?.isWeatherEnable()?: mWeatherEnable
|
||||
if (mWeatherEnable && System.currentTimeMillis() - mLastUpdateTime > INTERVAL){
|
||||
mLastUpdateTime = System.currentTimeMillis()
|
||||
getWeatherInfo()
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch weather information based on location
|
||||
private fun getWeatherInfo(){
|
||||
mUpdateWeatherJob?.cancel()
|
||||
mUpdateWeatherJob = mMapAutoView?.getMapController()?.getScope()?.launch(Dispatchers.IO) {
|
||||
val result = mWeatherRepository.getInfo(mLocationLon, mLocationLat)
|
||||
if (CompileConfig.DEBUG) {
|
||||
Log.d(TAG, "getWeatherInfo-location:$mLocationLon, $mLocationLat-result: $result")
|
||||
}
|
||||
|
||||
if (result is Result.Success) {
|
||||
val weatherInfo = result.data
|
||||
|
||||
if(cloudySet.contains(weatherInfo.weather)) {
|
||||
mMapAutoView?.getMapController()?.setWeatherType(WeatherType.CLOUDY.type)
|
||||
}else if(snowSet.contains(weatherInfo.weather)){
|
||||
mMapAutoView?.getMapController()?.setWeatherType(WeatherType.SNOW.type)
|
||||
}else{
|
||||
mMapAutoView?.getMapController()?.setWeatherType(WeatherType.DEFULT.type)
|
||||
}
|
||||
} else {
|
||||
if (CompileConfig.DEBUG) {
|
||||
Log.d(TAG, "Failed to retrieve weather information!")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,12 +10,11 @@ import com.zhidaoauto.map.sdk.inner.CompileConfig.DEBUG
|
||||
import com.zhidaoauto.map.sdk.inner.abs.IMapController
|
||||
import com.zhidaoauto.map.sdk.inner.abs.IMarkerCall
|
||||
import com.zhidaoauto.map.sdk.open.abs.marker.OnMarkerDragListener
|
||||
import com.zhidaoauto.map.sdk.open.marker.*
|
||||
import com.zhidaoauto.map.sdk.open.tools.MD5Utils
|
||||
import com.zhidaoauto.map.sdk.open.tools.MapTools
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.*
|
||||
import com.zhidaoauto.map.sdk.open.common.tools.MD5Utils
|
||||
import com.zhidaoauto.map.sdk.open.common.tools.MapTools
|
||||
import io.netty.buffer.Unpooled
|
||||
import java.nio.charset.Charset
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.*
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
@@ -83,11 +82,11 @@ class MarkerNativeInterface(private val mMapController: IMapController): IMarker
|
||||
}
|
||||
|
||||
override fun addMarkerIconCache(id: Int, icon: String) {
|
||||
markerIconResourceCacheMap[id] = icon
|
||||
markerIconResourceCacheMap.put(id,icon)
|
||||
}
|
||||
|
||||
override fun getMarkerIconCache(id:Int):String?{
|
||||
return markerIconResourceCacheMap[id]
|
||||
return markerIconResourceCacheMap.get(id)
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
@@ -104,7 +103,7 @@ class MarkerNativeInterface(private val mMapController: IMapController): IMarker
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
fun clearAllMarkers(): Boolean {
|
||||
fun clearAllMarkers(): Boolean? {
|
||||
if(DEBUG){
|
||||
Log.i(TAG,"markerop--clearAllMarkers:")
|
||||
}
|
||||
@@ -122,7 +121,9 @@ class MarkerNativeInterface(private val mMapController: IMapController): IMarker
|
||||
* @param title
|
||||
*/
|
||||
fun setTitle(id: String?, title: String?) {
|
||||
|
||||
updateMarkerProperty(id!!, "title", title!!)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,7 +133,7 @@ class MarkerNativeInterface(private val mMapController: IMapController): IMarker
|
||||
* @return
|
||||
*/
|
||||
fun getTitle(id: String?): String {
|
||||
return getMarkerProperty(id!!, "title")
|
||||
return getMarkerProperty(id!!, "title")?:""
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -152,11 +153,11 @@ class MarkerNativeInterface(private val mMapController: IMapController): IMarker
|
||||
* @return
|
||||
*/
|
||||
fun getSnippet(id: String?): String {
|
||||
return getMarkerProperty(id!!, "snippet")
|
||||
return getMarkerProperty(id!!, "snippet")?:""
|
||||
}
|
||||
|
||||
fun isAnchorDynamicMoving(id: String): Boolean {
|
||||
return mMapController.isAnchorDynamicMoving(id)
|
||||
return mMapController.isAnchorDynamicMoving(id)?:false
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -165,12 +166,12 @@ class MarkerNativeInterface(private val mMapController: IMapController): IMarker
|
||||
* @param id
|
||||
* @param bitmapDescriptor
|
||||
*/
|
||||
fun setIcon(id: String?, bitmapDescriptor: BitmapDescriptor) {
|
||||
fun setIcon(id: String?, bitmapDescriptor: com.zhidaoauto.map.sdk.open.renders.marker.BitmapDescriptor) {
|
||||
val markerBytes = bitmapDescriptor.getBytes()
|
||||
if(markerBytes.isEmpty()){
|
||||
return
|
||||
}
|
||||
MD5Utils.getInstance()
|
||||
MD5Utils.getInstanse()
|
||||
val markerIconName = MD5Utils.getMD5String(markerBytes)
|
||||
//缓存图片
|
||||
if (!containMarkerIcon(markerIconName)) {
|
||||
@@ -501,7 +502,7 @@ class MarkerNativeInterface(private val mMapController: IMapController): IMarker
|
||||
refreshMap()
|
||||
}
|
||||
|
||||
fun addDynamicAnchorPosition(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(DEBUG){
|
||||
Log.i(TAG,"markerop--addDynamicAnchorPostion:${id},${points},isGps:${isGps},duration:${duration}")
|
||||
@@ -610,7 +611,7 @@ class MarkerNativeInterface(private val mMapController: IMapController): IMarker
|
||||
}
|
||||
|
||||
|
||||
//设置infoWindow的偏移量
|
||||
//设置infowindow的偏移量
|
||||
fun setInfoWindowOffset(id: String, offsetX: Int, offsetY: Int) {
|
||||
if(DEBUG){
|
||||
Log.i(TAG,"markerop--setInfoWindowOffset:${id},${offsetX},${offsetY}")
|
||||
@@ -737,7 +738,7 @@ class MarkerNativeInterface(private val mMapController: IMapController): IMarker
|
||||
mMapController.setAnchorFlash(id, colorType, color, time, angle)
|
||||
}
|
||||
|
||||
val charset: Charset = StandardCharsets.UTF_8
|
||||
val charset = Charset.forName("UTF-8")
|
||||
|
||||
private fun dealMarker(markerPtions: MarkerOptions):ByteArray?{
|
||||
val buffer = Unpooled.buffer()
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
//import com.zhidaoauto.map.sdk.open.dialog.BaseDialog
|
||||
//import com.zhidaoauto.map.sdk.open.dialog.TipDialog
|
||||
//import com.zhidaoauto.map.sdk.open.dialog.WaitDialog
|
||||
//import com.zhidaoauto.map.sdk.open.location.MogoLocation
|
||||
//import com.zhidaoauto.map.sdk.open.nav.NavInfo
|
||||
//import com.zhidaoauto.map.sdk.open.nav.NavPoi
|
||||
//import com.zhidaoauto.map.sdk.open.nav.PathPlanningStrategy
|
||||
//import com.zhidaoauto.map.sdk.open.nav.abs.NaviListener
|
||||
//import com.zhidaoauto.map.sdk.open.nav.model.*
|
||||
//import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
//import com.zhidaoauto.map.sdk.open.logics.MogoLocation
|
||||
//import com.zhidaoauto.map.sdk.open.logics.nav.NavInfo
|
||||
//import com.zhidaoauto.map.sdk.open.logics.nav.NavPoi
|
||||
//import com.zhidaoauto.map.sdk.open.logics.nav.PathPlanningStrategy
|
||||
//import com.zhidaoauto.map.sdk.open.logics.nav.abs.NaviListener
|
||||
//import com.zhidaoauto.map.sdk.open.logics.nav.model.*
|
||||
//import com.zhidaoauto.map.sdk.open.logics.query.LonLatPoint
|
||||
//import kotlinx.coroutines.Dispatchers
|
||||
//import kotlinx.coroutines.Job
|
||||
//import kotlinx.coroutines.launch
|
||||
@@ -211,7 +211,7 @@
|
||||
// Log.i(TAG, "navop-msg-getTts")
|
||||
// }
|
||||
// val datas = msg.obj as ByteArray
|
||||
// currentTts = String(datas, StandardCharsets.UTF_8)
|
||||
// currentTts = String(datas, Charset.forName("utf-8"))
|
||||
// if (DEBUG) {
|
||||
// Log.i(TAG, "navop-msg-getTts:${currentTts}")
|
||||
// }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zhidaoauto.map.sdk.inner.obj
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.nav.NavInfo
|
||||
import com.zhidaoauto.map.sdk.open.logics.nav.NavInfo
|
||||
|
||||
class NavMsg {
|
||||
var msgType:Int? = null
|
||||
|
||||
@@ -23,8 +23,8 @@ public class DirectionLayer extends ImageView implements MapStatusListener {
|
||||
private static final String TAG = "DirectionLayer";
|
||||
private Drawable icon;
|
||||
private IMapController mMapController;
|
||||
private final Matrix matrix = new Matrix();
|
||||
private final Camera mCamera = new Camera();
|
||||
private Matrix matrix = new Matrix();
|
||||
private Camera mCamera = new Camera();
|
||||
|
||||
public DirectionLayer(Context context){
|
||||
super(context);
|
||||
@@ -81,14 +81,14 @@ public class DirectionLayer extends ImageView implements MapStatusListener {
|
||||
return;
|
||||
}
|
||||
canvas.save();
|
||||
canvas.translate(getWidth() / 2.0f, getHeight() / 2.0f);
|
||||
canvas.translate(getWidth() / 2, getHeight() / 2);
|
||||
// mCamera.save();
|
||||
// mCamera.rotateX(90 - mapController.getDAngle());
|
||||
// mCamera.getMatrix(matrix);
|
||||
// mCamera.restore();
|
||||
canvas.concat(matrix);
|
||||
canvas.rotate(mMapController.getMapViewRotation());
|
||||
canvas.translate(-getWidth() / 2.0f, -getHeight() / 2.0f);
|
||||
canvas.translate(-getWidth() / 2, -getHeight() / 2);
|
||||
super.onDraw(canvas);
|
||||
canvas.restore();
|
||||
postInvalidate();
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
//import com.zhidaoauto.map.sdk.inner.db.DataStorageManager
|
||||
//import com.zhidaoauto.map.sdk.inner.proxy.CommonProxy
|
||||
//import com.zhidaoauto.map.sdk.inner.utils.Constant.initRouteSetting
|
||||
//import com.zhidaoauto.map.sdk.open.nav.NavPoi
|
||||
//import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
//import com.zhidaoauto.map.sdk.open.logics.nav.NavPoi
|
||||
//import com.zhidaoauto.map.sdk.open.logics.query.LonLatPoint
|
||||
//
|
||||
//class PanelRouteSet(context: Context?) :
|
||||
// Panel(context), View.OnClickListener {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
//import com.zhidaoauto.map.sdk.inner.controller.CommonController
|
||||
//import com.zhidaoauto.map.sdk.inner.utils.Constant.getDisString
|
||||
//import com.zhidaoauto.map.sdk.inner.utils.Constant.getTimeString
|
||||
//import com.zhidaoauto.map.sdk.open.nav.model.NaviPath
|
||||
//import com.zhidaoauto.map.sdk.open.logics.nav.model.NaviPath
|
||||
//import kotlinx.android.synthetic.main.panel_route_select.view.*
|
||||
//import kotlinx.coroutines.Dispatchers
|
||||
//import kotlinx.coroutines.launch
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.zhidaoauto.map.sdk.inner.road.RoadHelper
|
||||
import com.zhidaoauto.map.sdk.inner.utils.MathUtils
|
||||
import com.zhidaoauto.map.sdk.open.MapAutoApi
|
||||
import com.zhidaoauto.map.sdk.open.abs.OnMapChangeListener
|
||||
import com.zhidaoauto.map.sdk.open.location.MogoLocation
|
||||
import com.zhidaoauto.map.sdk.open.logics.location.MogoLocation
|
||||
import kotlinx.android.synthetic.main.panel_traffic_sign.view.iv_traffic
|
||||
import kotlin.math.abs
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.zhidaoauto.map.sdk.inner.proxy
|
||||
import android.util.Log
|
||||
import com.zhidaoauto.map.sdk.inner.abs.ILonLatProxy
|
||||
import com.zhidaoauto.map.sdk.inner.common.MapHelper
|
||||
import com.zhidaoauto.map.sdk.open.exception.MapException
|
||||
import com.zhidaoauto.map.sdk.open.common.exception.MapException
|
||||
|
||||
class CommonProxy {
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ class LonLatProxy : ILonLatProxy {
|
||||
array?.let {
|
||||
lonLatPoint = LonLatPoint(it[0], it[1])
|
||||
}
|
||||
if (CompileConfig.DEBUG) {
|
||||
Log.i(TAG, "lonlatop--toOuter-before:${lonLat},after:${lonLatPoint}")
|
||||
}
|
||||
// if (CompileConfig.DEBUG) {
|
||||
// Log.i(TAG, "lonlatop--toOuter-before:${lonLat},after:${lonLatPoint}")
|
||||
// }
|
||||
return lonLatPoint
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class RoadResultController {
|
||||
|
||||
fun addRoadResultListener(key:String,listener:IRoadData){
|
||||
if(CompileConfig.DEBUG){
|
||||
Log.i(TAG, "roadop--addRoadResultListener:$key ")
|
||||
Log.i(TAG, "roadop--addRoadResultListener-${mRoadResultCallHashMap.size}-:$key ")
|
||||
}
|
||||
var list = mRoadResultCallHashMap.get(key)
|
||||
if(list == null){
|
||||
@@ -45,6 +45,13 @@ class RoadResultController {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun removeRoadResultListener(key:String){
|
||||
if(CompileConfig.DEBUG){
|
||||
Log.i(TAG, "roadop--removeRoadResultListener:$key ")
|
||||
}
|
||||
mRoadResultCallHashMap.remove(key)
|
||||
}
|
||||
fun removeRoadResultListenerByCanCancel(){
|
||||
if(CompileConfig.DEBUG){
|
||||
Log.i(TAG, "roadop--removeRoadResultListenerByCanCancel: ")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
//import com.zhidaoauto.map.sdk.inner.controller.CommonController
|
||||
//import com.zhidaoauto.map.sdk.inner.proxy.CommonProxy
|
||||
//import com.zhidaoauto.map.sdk.open.abs.search.IGeocodeSearch
|
||||
//import com.zhidaoauto.map.sdk.open.query.*
|
||||
//import com.zhidaoauto.map.sdk.open.logics.query.*
|
||||
//import kotlinx.coroutines.Dispatchers
|
||||
//import kotlinx.coroutines.launch
|
||||
//import kotlinx.coroutines.withContext
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
//import com.zhidaoauto.map.sdk.inner.controller.CommonController
|
||||
//import com.zhidaoauto.map.sdk.inner.proxy.CommonProxy
|
||||
//import com.zhidaoauto.map.sdk.open.abs.search.IInputtipsSearch
|
||||
//import com.zhidaoauto.map.sdk.open.exception.MapException
|
||||
//import com.zhidaoauto.map.sdk.open.query.InputtipsListener
|
||||
//import com.zhidaoauto.map.sdk.open.query.InputtipsQuery
|
||||
//import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
//import com.zhidaoauto.map.sdk.open.query.Tip
|
||||
//import com.zhidaoauto.map.sdk.open.common.MapException
|
||||
//import com.zhidaoauto.map.sdk.open.logics.query.InputtipsListener
|
||||
//import com.zhidaoauto.map.sdk.open.logics.query.InputtipsQuery
|
||||
//import com.zhidaoauto.map.sdk.open.logics.query.LonLatPoint
|
||||
//import com.zhidaoauto.map.sdk.open.logics.query.Tip
|
||||
//import kotlinx.coroutines.Dispatchers
|
||||
//import kotlinx.coroutines.launch
|
||||
//import kotlinx.coroutines.withContext
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//import com.zhidaoauto.map.sdk.inner.controller.CommonController
|
||||
//import com.zhidaoauto.map.sdk.inner.proxy.CommonProxy
|
||||
//import com.zhidaoauto.map.sdk.open.abs.search.IPoiSearch
|
||||
//import com.zhidaoauto.map.sdk.open.query.*
|
||||
//import com.zhidaoauto.map.sdk.open.logics.query.*
|
||||
//import kotlinx.coroutines.Dispatchers
|
||||
//import kotlinx.coroutines.launch
|
||||
//import kotlinx.coroutines.withContext
|
||||
|
||||
@@ -38,8 +38,8 @@ class Clerk(private val mMapController: IMapController?) {
|
||||
}
|
||||
job?.cancel()
|
||||
job = mMapController?.getDemaningScope()?.launch(Dispatchers.IO) {
|
||||
var className = ""
|
||||
var methodName = ""
|
||||
var className: String = ""
|
||||
var methodName: String = ""
|
||||
try {
|
||||
className = Thread.currentThread().stackTrace[3].className
|
||||
methodName = Thread.currentThread().stackTrace[3].methodName
|
||||
@@ -56,8 +56,8 @@ class Clerk(private val mMapController: IMapController?) {
|
||||
}
|
||||
job?.cancel()
|
||||
job = mMapController?.getDemaningScope()?.launch(Dispatchers.IO) {
|
||||
var className = ""
|
||||
var methodName = ""
|
||||
var className: String = ""
|
||||
var methodName: String = ""
|
||||
try {
|
||||
className = Thread.currentThread().stackTrace[3].className
|
||||
methodName = Thread.currentThread().stackTrace[3].methodName
|
||||
@@ -79,7 +79,7 @@ class Clerk(private val mMapController: IMapController?) {
|
||||
if(CompileConfig.DEBUG){
|
||||
Log.i(TAG, "add: ${System.currentTimeMillis()}-$key")
|
||||
}
|
||||
var stringBuffer = cacheMap[key]
|
||||
var stringBuffer = cacheMap.get(key)
|
||||
if(stringBuffer == null){
|
||||
stringBuffer = StringBuffer()
|
||||
}
|
||||
@@ -104,9 +104,9 @@ class Clerk(private val mMapController: IMapController?) {
|
||||
val scope = mMapController?.getDemaningScope()
|
||||
if(saveJobList.size>10){
|
||||
val needDeleteSize = saveJobList.size - 5
|
||||
if(CompileConfig.DEBUG){
|
||||
Log.i(TAG, "i-cancel: $needDeleteSize")
|
||||
}
|
||||
// if(CompileConfig.DEBUG){
|
||||
// Log.i(TAG, "i-cancel: $needDeleteSize")
|
||||
// }
|
||||
var deleteIndex = 0
|
||||
val it = saveJobList.iterator()
|
||||
while(it.hasNext() && deleteIndex<needDeleteSize){
|
||||
@@ -155,34 +155,29 @@ class Clerk(private val mMapController: IMapController?) {
|
||||
uploadJob?.cancel()
|
||||
uploadJob = scope?.launch(Dispatchers.IO) {
|
||||
val path = Recorder.getLogDirectory(TAG)
|
||||
path?.let {
|
||||
val file = File(it)
|
||||
if(!file.isDirectory){
|
||||
return@launch
|
||||
val file = File(path)
|
||||
if(!file.isDirectory){
|
||||
return@launch
|
||||
}
|
||||
val firstlist = file.list()
|
||||
for(p in firstlist){
|
||||
val f = File(p)
|
||||
if(!f.isDirectory){
|
||||
break
|
||||
}
|
||||
val firstList = file.list()
|
||||
firstList?.let {
|
||||
for(p in firstList){
|
||||
val f = File(p)
|
||||
if(!f.isDirectory){
|
||||
break
|
||||
}
|
||||
val secondList = f.list()
|
||||
secondList?.let {
|
||||
for(child in secondList){
|
||||
val childFile = File(child)
|
||||
upload(childFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
val secondlist = f.list()
|
||||
for(child in secondlist){
|
||||
val childFile = File(child)
|
||||
upload(childFile)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun upload(file:File){
|
||||
// return
|
||||
// val content = file.readText()
|
||||
return
|
||||
val content = file.readText()
|
||||
// repository.uploadLogInfo(content)
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AMapUtils {
|
||||
var29[0] = var24 * var22;
|
||||
var29[1] = var24 * var18;
|
||||
var29[2] = var20;
|
||||
return (float) (Math.asin(Math.sqrt((var28[0] - var29[0]) * (var28[0] - var29[0]) + (var28[1] - var29[1]) * (var28[1] - var29[1]) + (var28[2] - var29[2]) * (var28[2] - var29[2])) / 2.0D) * 1.27420015798544E7D);
|
||||
return (float)(Math.asin(Math.sqrt((var28[0] - var29[0]) * (var28[0] - var29[0]) + (var28[1] - var29[1]) * (var28[1] - var29[1]) + (var28[2] - var29[2]) * (var28[2] - var29[2])) / 2.0D) * 1.27420015798544E7D);
|
||||
} catch (Throwable var26) {
|
||||
var26.printStackTrace();
|
||||
return 0.0F;
|
||||
|
||||
@@ -2,13 +2,12 @@ package com.zhidaoauto.map.sdk.inner.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class MainInfo {
|
||||
private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
|
||||
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
|
||||
private static MainInfo m_hinst = null;
|
||||
private boolean mbUserLog = true;
|
||||
private static boolean mbDebug = false;
|
||||
@@ -34,11 +33,12 @@ public class MainInfo {
|
||||
if (null == dir) {
|
||||
return;
|
||||
}
|
||||
try(FileWriter fw = new FileWriter((dir + "log.txt"), true)){
|
||||
try {
|
||||
FileWriter fw = new FileWriter((dir + "log.txt"), true);
|
||||
String date = dateFormat.format(new Date());
|
||||
fw.write(date + " " + log + "\r\n");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
fw.close();
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,11 +50,11 @@ public class MainInfo {
|
||||
if (null == dir) {
|
||||
return;
|
||||
}
|
||||
|
||||
try(FileWriter fw = new FileWriter((dir + "log.txt"), true)){
|
||||
try {
|
||||
FileWriter fw = new FileWriter((dir + "log.txt"), true);
|
||||
e.printStackTrace(new PrintWriter(fw));
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
fw.close();
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zhidaoauto.map.sdk.inner.utils;
|
||||
|
||||
import com.zhidaoauto.map.sdk.inner.element.MapCoordinate;
|
||||
import com.zhidaoauto.map.sdk.open.nav.NavPoi;
|
||||
import com.zhidaoauto.map.sdk.open.logics.nav.NavPoi;
|
||||
|
||||
public class PubFunction
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public class PubFunction
|
||||
*/
|
||||
public static double GetLineAngle(int nX1, int nY1, int nX2, int nY2)
|
||||
{
|
||||
return getAngleToNorth((nX2 - nX1)/5.0f, (nY2 - nY1)/4.0f);
|
||||
return getAngleToNorth((nX2 - nX1)/5, (nY2 - nY1)/4);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,14 +25,14 @@ import com.zhidaoauto.map.sdk.inner.utils.TransformUtils
|
||||
import com.zhidaoauto.map.sdk.open.abs.log.ILog
|
||||
import com.zhidaoauto.map.sdk.open.abs.navi.INaviResult
|
||||
import com.zhidaoauto.map.sdk.open.data.MapDataApi
|
||||
import com.zhidaoauto.map.sdk.open.navi.NaviModel
|
||||
import com.zhidaoauto.map.sdk.open.tools.MapTools
|
||||
import com.zhidaoauto.map.sdk.inner.cloud.navi.NaviModel
|
||||
import com.zhidaoauto.map.sdk.open.common.tools.MapTools
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView
|
||||
import io.netty.buffer.Unpooled
|
||||
import java.math.BigDecimal
|
||||
import java.nio.charset.Charset
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.pow
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
||||
|
||||
object MapAutoApi {
|
||||
@@ -521,16 +521,23 @@ object MapAutoApi {
|
||||
box = getTileBoundingBox(5572660368)
|
||||
println("-getTileBoundingBox:${box.lbLon},${box.lbLat},${box.rtLon},${box.rtLat}")
|
||||
println("--------")
|
||||
println("写入中")
|
||||
val byteBuffer = Unpooled.buffer()
|
||||
val str = "1111112345678sjkfdhdkb"
|
||||
byteBuffer.writeInt(str.length)
|
||||
byteBuffer.writeCharSequence(str, Charset.forName("utf-8"))
|
||||
var str = "1111112345678sjkfdhdkb"
|
||||
println("str:${str.length}")
|
||||
str = "1111112345678sjkfdhdkb中国"
|
||||
println("str中国:${str.length}")
|
||||
val utf8Bytes = str.toByteArray(StandardCharsets.UTF_8)
|
||||
println("str utf8Bytes size:${utf8Bytes.size}")
|
||||
byteBuffer.writeInt(utf8Bytes.size)
|
||||
byteBuffer.writeCharSequence(str, StandardCharsets.UTF_8)
|
||||
byteBuffer.writeBoolean(true)
|
||||
byteBuffer.writeInt(999)
|
||||
byteBuffer.writeInt(12)
|
||||
val length = byteBuffer.readInt()
|
||||
println("读取中")
|
||||
println("$length")
|
||||
println("${byteBuffer.readCharSequence(length, Charset.forName("utf-8"))}")
|
||||
println("${byteBuffer.readCharSequence(length, StandardCharsets.UTF_8)}")
|
||||
println("${byteBuffer.readBoolean()}")
|
||||
println("${byteBuffer.readInt()}")
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zhidaoauto.map.sdk.open
|
||||
|
||||
import com.autonavi.nge.routing.RoutingProvider
|
||||
import com.zhidaoauto.map.sdk.open.nav.NaviViewShowMode
|
||||
import com.zhidaoauto.map.sdk.open.logics.nav.NaviViewShowMode
|
||||
|
||||
class NavParams private constructor() {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zhidaoauto.map.sdk.open.abs
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.camera.CameraPosition
|
||||
import com.zhidaoauto.map.sdk.open.logics.camera.CameraPosition
|
||||
|
||||
interface OnCameraChangeListener {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zhidaoauto.map.sdk.open.abs
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.location.MogoLocation
|
||||
import com.zhidaoauto.map.sdk.open.logics.location.MogoLocation
|
||||
|
||||
interface OnMapChangeListener {
|
||||
fun onMapChange(mogoLocation: MogoLocation)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zhidaoauto.map.sdk.open.abs.marker
|
||||
|
||||
import android.view.View
|
||||
import com.zhidaoauto.map.sdk.open.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.Marker
|
||||
|
||||
interface InfoWindowAdapter{
|
||||
fun getInfoWindow(marker: Marker?): View?
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.zhidaoauto.map.sdk.open.abs.marker
|
||||
|
||||
import com.zhidaoauto.map.sdk.open.marker.Animation
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.Animation
|
||||
|
||||
|
||||
interface MarkerAnimationListener {
|
||||
fun onAnimationStart(animation: Animation)
|
||||
fun onAnimationStart(animation: com.zhidaoauto.map.sdk.open.renders.marker.Animation)
|
||||
|
||||
fun onAnimationEnd(animation: Animation)
|
||||
fun onAnimationEnd(animation: com.zhidaoauto.map.sdk.open.renders.marker.Animation)
|
||||
|
||||
fun onAnimationRepeat(animation: Animation)
|
||||
fun onAnimationRepeat(animation: com.zhidaoauto.map.sdk.open.renders.marker.Animation)
|
||||
}
|
||||