修改锁车逻辑以及marker显示问题
This commit is contained in:
@@ -50,7 +50,7 @@ dependencies {
|
||||
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()
|
||||
|
||||
@@ -23,7 +23,7 @@ public class AMapBaseMapView implements IMogoMapViewCreator {
|
||||
|
||||
@Override
|
||||
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 )
|
||||
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
|
||||
.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, "锁车");
|
||||
// mMapView.recoverLockMode();
|
||||
mMapView.getMapAutoViewHelper().setRotateGesturesEnabled(false);
|
||||
mMapView.getMapAutoViewHelper().setLockMode(true);
|
||||
mIsCarLocked = true;
|
||||
}
|
||||
}
|
||||
@@ -447,8 +446,7 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca
|
||||
Logger.d(TAG, Log.getStackTraceString(new Throwable()));
|
||||
}
|
||||
Logger.d(TAG, "解锁锁车");
|
||||
// mockTouchEvent();
|
||||
mMapView.getMapAutoViewHelper().setRotateGesturesEnabled(true);
|
||||
mMapView.getMapAutoViewHelper().setLockMode(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
|
||||
|
||||
@@ -164,7 +164,7 @@ public class AMapWrapper implements IMogoMap {
|
||||
@Override
|
||||
public void setPointToCenter(int x, int y) {
|
||||
if (checkAMap()) {
|
||||
// mAMap.setPointToCenter(x, y);
|
||||
mAMap.setPointToCenter(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,14 +172,14 @@ public class AMapWrapper implements IMogoMap {
|
||||
public void setTouchPoiEnable(boolean touchPoiEnable) {
|
||||
if (checkAMap()) {
|
||||
// TODO: 2020/5/27 jia 设置
|
||||
// mAMap.setTouchPoiEnable( touchPoiEnable );
|
||||
mAMap.setTouchPoiEnable( touchPoiEnable );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrafficEnable(boolean enable) {
|
||||
if (checkAMap()) {
|
||||
mAMap.setTrafficEnabled( enable );
|
||||
mAMap.setTraffic( enable );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,13 +75,13 @@ public class ObjectUtils {
|
||||
descriptors.add( new BitmapDescriptor(icon) );
|
||||
}
|
||||
}
|
||||
// BitmapDescriptor descriptor = getBitmapDescriptorFromMogo( opt );
|
||||
BitmapDescriptor descriptor = getBitmapDescriptorFromMogo( opt );
|
||||
|
||||
return new MarkerOptions()
|
||||
.position( new LonLatPoint(opt.getLongitude(), opt.getLatitude() ) )
|
||||
// .title( opt.getTitle() )
|
||||
// .snippet( opt.getSnippet() )
|
||||
.markerIcon( opt.getIcon() )
|
||||
.markerIcon(descriptor )
|
||||
.anchor( opt.getU(), opt.getV() )
|
||||
// .icons( descriptors )
|
||||
// .period( opt.getPeriod() )
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.mogo.map.MogoLatLng;
|
||||
*/
|
||||
public class MogoPoiSearchQuery implements Parcelable {
|
||||
|
||||
private String query;
|
||||
private String query = "";
|
||||
private String category;
|
||||
private String city;
|
||||
private String building;
|
||||
|
||||
Reference in New Issue
Block a user