Explorar el Código

1.修改Android Apex Ship Map当前位置点闪烁。

Pen Li hace 8 años
padre
commit
cfc529191d
Se han modificado 1 ficheros con 15 adiciones y 7 borrados
  1. 15 7
      Apex Mobile/app/src/main/java/com/usai/apex/ShipMap/ShipMap.java

+ 15 - 7
Apex Mobile/app/src/main/java/com/usai/apex/ShipMap/ShipMap.java

@@ -325,13 +325,15 @@ public class ShipMap extends RelativeLayout implements GoogleMap.OnMarkerClickLi
 
         if (current != null && showCurrent()) {
             moveToLocation(current);
-
+            if (mTwinkleCurrent) {
+                startTwinkle();
+            }
         } else if (pol != null && showPol()) {
             moveToLocation(pol);
         } else if (pod != null && showPod()) {
             moveToLocation(pod);
         }
-        startTwinkle();
+
 
     }
 
@@ -370,8 +372,6 @@ public class ShipMap extends RelativeLayout implements GoogleMap.OnMarkerClickLi
 
     private void twinkleCurrentAlpha(double alpha) {
 
-        Log.d("Twinkle", "twinkleCurrentAlpha: " + alpha);
-
         if (mUseGoogleMap) {
             if (mCurrentGoogleMarker != null) {
                 mCurrentGoogleMarker.setAlpha((float) alpha);
@@ -460,7 +460,7 @@ public class ShipMap extends RelativeLayout implements GoogleMap.OnMarkerClickLi
 
             com.google.android.gms.maps.model.Marker marker = mGoogleMap.addMarker(options);
 
-            if (port.equals("Port Of Discharge")) {
+            if (port.equals("Current")) {
                 mCurrentGoogleMarker = marker;
             }
 
@@ -498,7 +498,7 @@ public class ShipMap extends RelativeLayout implements GoogleMap.OnMarkerClickLi
 
             Marker marker = (Marker) mBaiduMap.getMap().addOverlay(markeroption);
 
-            if (port.equals("Port Of Discharge")) {
+            if (port.equals("Current")) {
                 mCurrentBaiduMarker = marker;
             }
 
@@ -508,7 +508,7 @@ public class ShipMap extends RelativeLayout implements GoogleMap.OnMarkerClickLi
 
     }
 
-    private boolean mShowPol = true,mShowPoe,mShowPod = true,mShowPor,mShowOrigin,mShowDestination,mShowCurrent = true;
+    private boolean mShowPol = true,mShowPoe,mShowPod = true,mShowPor,mShowOrigin,mShowDestination,mShowCurrent = true,mTwinkleCurrent = true;
 
     public void setShowPol(boolean show) {
         mShowPol = show;
@@ -570,6 +570,14 @@ public class ShipMap extends RelativeLayout implements GoogleMap.OnMarkerClickLi
         mListener = listener;
     }
 
+    public void setTwinkleCurrent(boolean twinkleCurrent) {
+        mTwinkleCurrent = twinkleCurrent;
+    }
+
+    public boolean twinkleCurrent() {
+        return mTwinkleCurrent;
+    }
+
     public ShipMapListener getShipMapListener() {
         return mListener;
     }