修改锁车逻辑以及marker显示问题
This commit is contained in:
@@ -50,7 +50,7 @@ dependencies {
|
|||||||
implementation project(':foudations:mogo-commons')
|
implementation project(':foudations:mogo-commons')
|
||||||
}
|
}
|
||||||
|
|
||||||
api 'com.zhidaoauto.machine:map:1.0.0-SNAPSHOT-61'
|
api 'com.zhidaoauto.machine:map:1.0.0-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class AMapBaseMapView implements IMogoMapViewCreator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMogoMapView create( Context context ) {
|
public IMogoMapView create( Context context ) {
|
||||||
MapAutoApi.INSTANCE.init( MapParams.Companion.init().setDebugMode( false )
|
MapAutoApi.INSTANCE.init( MapParams.Companion.init().setDebugMode( true )
|
||||||
.setCoordinateType( MapParams.COORDINATETYPE_GCJ02 )
|
.setCoordinateType( MapParams.COORDINATETYPE_GCJ02 )
|
||||||
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
|
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
|
||||||
.setStyleMode( MapParams.MAP_STYLE_NIGHT ) );
|
.setStyleMode( MapParams.MAP_STYLE_NIGHT ) );
|
||||||
|
|||||||
@@ -435,8 +435,7 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca
|
|||||||
// Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
// Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||||
// }
|
// }
|
||||||
Logger.d(TAG, "锁车");
|
Logger.d(TAG, "锁车");
|
||||||
// mMapView.recoverLockMode();
|
mMapView.getMapAutoViewHelper().setLockMode(true);
|
||||||
mMapView.getMapAutoViewHelper().setRotateGesturesEnabled(false);
|
|
||||||
mIsCarLocked = true;
|
mIsCarLocked = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -447,8 +446,7 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca
|
|||||||
Logger.d(TAG, Log.getStackTraceString(new Throwable()));
|
Logger.d(TAG, Log.getStackTraceString(new Throwable()));
|
||||||
}
|
}
|
||||||
Logger.d(TAG, "解锁锁车");
|
Logger.d(TAG, "解锁锁车");
|
||||||
// mockTouchEvent();
|
mMapView.getMapAutoViewHelper().setLockMode(false);
|
||||||
mMapView.getMapAutoViewHelper().setRotateGesturesEnabled(true);
|
|
||||||
mIsCarLocked = false;
|
mIsCarLocked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,18 +460,6 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 模拟点击事件,达到锁车->普通事件
|
|
||||||
*/
|
|
||||||
private void mockTouchEvent() {
|
|
||||||
long downTime = SystemClock.uptimeMillis();
|
|
||||||
long eventTime = downTime + 1;
|
|
||||||
int metaState = 0;
|
|
||||||
MotionEvent motionEvent = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, 0, 0, metaState);
|
|
||||||
mMapView.dispatchTouchEvent(motionEvent);
|
|
||||||
MotionEvent upEvent = MotionEvent.obtain(downTime + 1, eventTime + 2, MotionEvent.ACTION_UP, 0, 0, metaState);
|
|
||||||
mMapView.dispatchTouchEvent(upEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class AMapWrapper implements IMogoMap {
|
|||||||
@Override
|
@Override
|
||||||
public void setPointToCenter(int x, int y) {
|
public void setPointToCenter(int x, int y) {
|
||||||
if (checkAMap()) {
|
if (checkAMap()) {
|
||||||
// mAMap.setPointToCenter(x, y);
|
mAMap.setPointToCenter(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,14 +172,14 @@ public class AMapWrapper implements IMogoMap {
|
|||||||
public void setTouchPoiEnable(boolean touchPoiEnable) {
|
public void setTouchPoiEnable(boolean touchPoiEnable) {
|
||||||
if (checkAMap()) {
|
if (checkAMap()) {
|
||||||
// TODO: 2020/5/27 jia 设置
|
// TODO: 2020/5/27 jia 设置
|
||||||
// mAMap.setTouchPoiEnable( touchPoiEnable );
|
mAMap.setTouchPoiEnable( touchPoiEnable );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setTrafficEnable(boolean enable) {
|
public void setTrafficEnable(boolean enable) {
|
||||||
if (checkAMap()) {
|
if (checkAMap()) {
|
||||||
mAMap.setTrafficEnabled( enable );
|
mAMap.setTraffic( enable );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,13 +75,13 @@ public class ObjectUtils {
|
|||||||
descriptors.add( new BitmapDescriptor(icon) );
|
descriptors.add( new BitmapDescriptor(icon) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// BitmapDescriptor descriptor = getBitmapDescriptorFromMogo( opt );
|
BitmapDescriptor descriptor = getBitmapDescriptorFromMogo( opt );
|
||||||
|
|
||||||
return new MarkerOptions()
|
return new MarkerOptions()
|
||||||
.position( new LonLatPoint(opt.getLongitude(), opt.getLatitude() ) )
|
.position( new LonLatPoint(opt.getLongitude(), opt.getLatitude() ) )
|
||||||
// .title( opt.getTitle() )
|
// .title( opt.getTitle() )
|
||||||
// .snippet( opt.getSnippet() )
|
// .snippet( opt.getSnippet() )
|
||||||
.markerIcon( opt.getIcon() )
|
.markerIcon(descriptor )
|
||||||
.anchor( opt.getU(), opt.getV() )
|
.anchor( opt.getU(), opt.getV() )
|
||||||
// .icons( descriptors )
|
// .icons( descriptors )
|
||||||
// .period( opt.getPeriod() )
|
// .period( opt.getPeriod() )
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import com.mogo.map.MogoLatLng;
|
|||||||
*/
|
*/
|
||||||
public class MogoPoiSearchQuery implements Parcelable {
|
public class MogoPoiSearchQuery implements Parcelable {
|
||||||
|
|
||||||
private String query;
|
private String query = "";
|
||||||
private String category;
|
private String category;
|
||||||
private String city;
|
private String city;
|
||||||
private String building;
|
private String building;
|
||||||
|
|||||||
Reference in New Issue
Block a user