opt
This commit is contained in:
@@ -39,7 +39,7 @@ public class RouteOverLayWrapper {
|
||||
private boolean mIsTrafficLightsVisible = true;
|
||||
private int mStartBitmapResId = 0;
|
||||
private int mEndBitmapResId = 0;
|
||||
private int mZIndex = 0;
|
||||
private int mZIndex = 1;
|
||||
|
||||
private static RouteOverlayOptions sOptions;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ dependencies {
|
||||
implementation project(':foudations:mogo-commons')
|
||||
}
|
||||
|
||||
api 'com.zhidaoauto.machine:map:1.0.0-SNAPSHOT'
|
||||
implementation 'com.zhidaoauto.machine:map:1.0.0-j7'
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
|
||||
@@ -26,6 +26,7 @@ public class AMapBaseMapView implements IMogoMapViewCreator {
|
||||
MapAutoApi.INSTANCE.init( MapParams.Companion.init().setDebugMode( false )
|
||||
.setCoordinateType( MapParams.COORDINATETYPE_GCJ02 )
|
||||
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
|
||||
.setStyleDir("/sdcard/shmdata/style" )
|
||||
.setZoom( 16 )
|
||||
.setPointToCenter(0.5f,0.5f)
|
||||
.setStyleMode( MapParams.MAP_STYLE_NIGHT ) );
|
||||
|
||||
@@ -556,6 +556,7 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca
|
||||
if (!checkAMapView()) {
|
||||
return;
|
||||
}
|
||||
Logger.i(TAG, "showBounds:%s -%s-%s- %b ", tag,carPosition.toString(),bound.toShortString(),lockCarPosition);
|
||||
try {
|
||||
if ( DebugConfig.isDebug() ) {
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
@@ -708,17 +709,17 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca
|
||||
|
||||
@Override
|
||||
public void onMapStatusChanged(int type, int value) {
|
||||
Log.i(TAG, "mapop--onMapStatusChanged: "+type+","+value);
|
||||
Log.i(TAG, "mapop--onMapStatusChanged-: "+type+","+value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCameraChange(int type, int value) {
|
||||
Log.i(TAG, "mapop--onCameraChange: "+type+","+value);
|
||||
Log.i(TAG, "mapop--onCameraChange-: "+type+","+value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCameraChangeFinish(@Nullable CameraPosition cameraPosition) {
|
||||
Log.i(TAG, "mapop--onCameraChangeFinish: "+cameraPosition);
|
||||
Log.i(TAG, "mapop--onCameraChangeFinish-: "+cameraPosition);
|
||||
if ( cameraPosition != null ) {
|
||||
Trace.beginSection( "timer.onCameraChangeFinish" );
|
||||
MogoMapListenerHandler.getInstance().onMapChanged(ObjectUtils.fromAMap( cameraPosition.getTarget() ),
|
||||
|
||||
@@ -82,7 +82,7 @@ public class AMapWrapper implements IMogoMap {
|
||||
|
||||
@Override
|
||||
public IMogoMarker addMarker(String tag, MogoMarkerOptions options) {
|
||||
Log.i(TAG, "autoop-addMarker: " + tag + ",options:" + options + ",AMap:" + (mAMap != null)+",this:"+this);
|
||||
Log.i(TAG, "autoop-addMarker: " + tag + ",MogoMarkerOptions:" + options + ",AMap:" + (mAMap != null)+",this:"+this);
|
||||
if (!checkAMap()) {
|
||||
return null;
|
||||
}
|
||||
@@ -249,6 +249,7 @@ public class AMapWrapper implements IMogoMap {
|
||||
public IMogoPolyline addPolyline(MogoPolylineOptions options) {
|
||||
if ( checkAMap() ) {
|
||||
PolylineOptions polylineOptions = ObjectUtils.fromMogo( options );
|
||||
Logger.d(TAG, "addPolyline %s", polylineOptions.toString());
|
||||
if ( polylineOptions == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.map.impl.custom.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.autonavi.nge.guidance.NaviInfo;
|
||||
@@ -77,23 +78,28 @@ public class ObjectUtils {
|
||||
}
|
||||
BitmapDescriptor descriptor = getBitmapDescriptorFromMogo( opt );
|
||||
|
||||
return new MarkerOptions()
|
||||
MarkerOptions markerOptions = new MarkerOptions()
|
||||
.position( new LonLatPoint(opt.getLongitude(), opt.getLatitude() ) )
|
||||
// .title( opt.getTitle() )
|
||||
// .snippet( opt.getSnippet() )
|
||||
.markerIcon(descriptor )
|
||||
.anchor( opt.getU(), opt.getV() )
|
||||
// .icons( descriptors )
|
||||
// .period( opt.getPeriod() )
|
||||
.rotateAngle( opt.getRotate() )
|
||||
// .setFlat( opt.isFlat() )
|
||||
.setFlat( opt.isFlat() )
|
||||
.visible( opt.isVisible() )
|
||||
.infoWindowEnable( opt.isInifoWindowEnable() )
|
||||
.alpha( opt.getAlpha() );
|
||||
// .setGps( opt.isGps() )
|
||||
.alpha( opt.getAlpha() )
|
||||
.setGps( opt.isGps() )
|
||||
// .draggable( opt.isDraggable() )
|
||||
// .setInfoWindowOffset( opt.getOffsetX(), opt.getOffsetY() )
|
||||
// .zIndex( opt.getzIndex() );
|
||||
.setInfoWindowOffset( opt.getOffsetX(), opt.getOffsetY() )
|
||||
.zIndex( opt.getzIndex() );
|
||||
if(!TextUtils.isEmpty(opt.getTitle())){
|
||||
markerOptions.title(opt.getTitle());
|
||||
}
|
||||
if(!TextUtils.isEmpty(opt.getSnippet())){
|
||||
markerOptions.snippet(opt.getSnippet());
|
||||
}
|
||||
return markerOptions;
|
||||
}
|
||||
|
||||
private static BitmapDescriptor getBitmapDescriptorFromMogo( MogoMarkerOptions options ) {
|
||||
@@ -704,11 +710,11 @@ public class ObjectUtils {
|
||||
// target.zIndex( options.getWidth() );
|
||||
// target.visible( options.isVisible() );
|
||||
//// target.geodesic( options.isGeodesic() );
|
||||
// target.setDottedLine( options.isDottedLine() );
|
||||
// target.useGradient( options.isGradient() );
|
||||
// if ( options.getColorValues() != null ) {
|
||||
// target.colorValues( options.getColorValues() );
|
||||
// }
|
||||
target.setDottedLine( options.isDottedLine() );
|
||||
target.useGradient( options.isGradient() );
|
||||
if ( options.getColorValues() != null ) {
|
||||
target.colorValues( options.getColorValues() );
|
||||
}
|
||||
// target.transparency( options.getTransparency() );
|
||||
// target.aboveMaskLayer( options.isAboveMaskLayer() );
|
||||
// target.lineCapType( PolylineOptions.LineCapType.LineCapRound );
|
||||
|
||||
@@ -308,4 +308,29 @@ public class MogoMarkerOptions extends Observable {
|
||||
this.mAutoManager = autoManager;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoMarkerOptions{" +
|
||||
"latitude=" + latitude +
|
||||
", longitude=" + longitude +
|
||||
", title='" + title + '\'' +
|
||||
", snippet='" + snippet + '\'' +
|
||||
", icon=" + icon +
|
||||
", icons=" + icons +
|
||||
", period=" + period +
|
||||
", rotate=" + rotate +
|
||||
", flat=" + flat +
|
||||
", visible=" + visible +
|
||||
", inifoWindowEnable=" + inifoWindowEnable +
|
||||
", alpha=" + alpha +
|
||||
", isGps=" + isGps +
|
||||
", u=" + u +
|
||||
", v=" + v +
|
||||
", draggable=" + draggable +
|
||||
", offsetX=" + offsetX +
|
||||
", offsetY=" + offsetY +
|
||||
", zIndex=" + zIndex +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user