() {
+ @Override
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ @Override
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ }
+}
\ No newline at end of file
diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/view/PageIndicator.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/view/PageIndicator.java
new file mode 100644
index 0000000000..bc6148071a
--- /dev/null
+++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/view/PageIndicator.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2011 Patrik Akerfeldt
+ * Copyright (C) 2011 Jake Wharton
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.mogo.module.apps.view;
+
+
+import androidx.viewpager.widget.ViewPager;
+
+/**
+ * A PageIndicator is responsible to show an visual indicator on the total views
+ * number and the current visible view.
+ */
+public interface PageIndicator extends ViewPager.OnPageChangeListener {
+ /**
+ * Bind the indicator to a ViewPager.
+ *
+ * @param view
+ */
+ void setViewPager( ViewPager view );
+
+ /**
+ * Bind the indicator to a ViewPager.
+ *
+ * @param view
+ * @param initialPosition
+ */
+ void setViewPager( ViewPager view, int initialPosition );
+
+ /**
+ * Set the current page of both the ViewPager and indicator.
+ *
+ * This must be used if you need to set the page before
+ * the views are drawn on screen (e.g., default start page).
+ *
+ * @param item
+ */
+ void setCurrentItem( int item );
+
+ /**
+ * Set a page change listener which will receive forwarded events.
+ *
+ * @param listener
+ */
+ void setOnPageChangeListener( ViewPager.OnPageChangeListener listener );
+
+ /**
+ * Notify the indicator that the fragment list has changed.
+ */
+ void notifyDataSetChanged();
+}
diff --git a/modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps.xml b/modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps.xml
index 86f95931b2..4c20aba8b2 100644
--- a/modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps.xml
+++ b/modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps.xml
@@ -31,6 +31,17 @@
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_210" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-apps/src/main/res/values/page_indicator_values.xml b/modules/mogo-module-apps/src/main/res/values/page_indicator_values.xml
new file mode 100644
index 0000000000..d770d81352
--- /dev/null
+++ b/modules/mogo-module-apps/src/main/res/values/page_indicator_values.xml
@@ -0,0 +1,25 @@
+
+
+ @dimen/dp_15
+ 12dp
+ 4dp
+ 1dp
+ #FF33B5E5
+ #FFBBBBBB
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-apps/src/test/java/com/mogo/mogo/module/apps/ExampleUnitTest.java b/modules/mogo-module-apps/src/test/java/com/mogo/mogo/module/apps/ExampleUnitTest.java
deleted file mode 100644
index bd173ae99b..0000000000
--- a/modules/mogo-module-apps/src/test/java/com/mogo/mogo/module/apps/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.mogo.mogo.module.apps;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() {
- assertEquals( 4, 2 + 2 );
- }
-}
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/androidTest/java/com/mogo/module/common/ExampleInstrumentedTest.java b/modules/mogo-module-common/src/androidTest/java/com/mogo/module/common/ExampleInstrumentedTest.java
deleted file mode 100644
index 6480075289..0000000000
--- a/modules/mogo-module-common/src/androidTest/java/com/mogo/module/common/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.mogo.module.common;
-
-import android.content.Context;
-
-import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * @see Testing documentation
- */
-@RunWith( AndroidJUnit4.class )
-public class ExampleInstrumentedTest {
- @Test
- public void useAppContext() {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
-
- assertEquals( "com.mogo.module.common.test", appContext.getPackageName() );
- }
-}
diff --git a/modules/mogo-module-common/src/test/java/com/mogo/module/common/ExampleUnitTest.java b/modules/mogo-module-common/src/test/java/com/mogo/module/common/ExampleUnitTest.java
deleted file mode 100644
index 368976ae89..0000000000
--- a/modules/mogo-module-common/src/test/java/com/mogo/module/common/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.mogo.module.common;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() {
- assertEquals( 4, 2 + 2 );
- }
-}
\ No newline at end of file
diff --git a/modules/mogo-module-extensions/src/androidTest/java/com/mogo/module/extensions/ExampleInstrumentedTest.java b/modules/mogo-module-extensions/src/androidTest/java/com/mogo/module/extensions/ExampleInstrumentedTest.java
deleted file mode 100644
index 860f712d30..0000000000
--- a/modules/mogo-module-extensions/src/androidTest/java/com/mogo/module/extensions/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.mogo.module.extensions;
-
-import android.content.Context;
-
-import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * @see Testing documentation
- */
-@RunWith( AndroidJUnit4.class )
-public class ExampleInstrumentedTest {
- @Test
- public void useAppContext() {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
-
- assertEquals( "com.mogo.module.extensions.test", appContext.getPackageName() );
- }
-}
diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java
index d516520fcc..371e555035 100644
--- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java
+++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java
@@ -153,4 +153,14 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
mNaviInfo.setVisibility( View.GONE );
mExitNavi.setVisibility( View.GONE );
}
+
+ @Override
+ public void onCalculateSuccess() {
+
+ }
+
+ @Override
+ public void onoCalculateFailed() {
+
+ }
}
diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_anim_frame_voice.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_anim_frame_voice.xml
new file mode 100644
index 0000000000..48d4c76465
--- /dev/null
+++ b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_anim_frame_voice.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_bottom_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_bottom_corner_bkg.xml
similarity index 100%
rename from modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_bottom_corner_bkg.xml
rename to modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_bottom_corner_bkg.xml
diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_common_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_common_corner_bkg.xml
similarity index 100%
rename from modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_common_corner_bkg.xml
rename to modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_common_corner_bkg.xml
diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_left_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_left_corner_bkg.xml
similarity index 100%
rename from modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_left_corner_bkg.xml
rename to modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_left_corner_bkg.xml
diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_navi_info_extras_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_extras_bkg.xml
similarity index 100%
rename from modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_navi_info_extras_bkg.xml
rename to modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_extras_bkg.xml
diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_navi_info_panel_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_panel_bkg.xml
similarity index 100%
rename from modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_navi_info_panel_bkg.xml
rename to modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_panel_bkg.xml
diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_right_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_right_corner_bkg.xml
similarity index 100%
rename from modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_right_corner_bkg.xml
rename to modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_right_corner_bkg.xml
diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_top_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_top_corner_bkg.xml
similarity index 100%
rename from modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_top_corner_bkg.xml
rename to modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_top_corner_bkg.xml
diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_upload_road_condition_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_upload_road_condition_bkg.xml
similarity index 100%
rename from modules/mogo-module-extensions/src/main/res/drawable/module_map_dw_upload_road_condition_bkg.xml
rename to modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_upload_road_condition_bkg.xml
diff --git a/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml b/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml
index be17991ae9..3e7786b42a 100644
--- a/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml
+++ b/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml
@@ -10,7 +10,7 @@
android:layout_height="@dimen/dp_90"
android:layout_marginLeft="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_2"
- android:background="@drawable/module_map_dw_common_corner_bkg"
+ android:background="@drawable/module_ext_dw_common_corner_bkg"
android:drawableLeft="@drawable/module_map_ic_search"
android:drawablePadding="@dimen/dp_16"
android:gravity="center_vertical"
@@ -29,7 +29,7 @@
android:layout_height="@dimen/dp_90"
android:layout_marginLeft="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_2"
- android:background="@drawable/module_map_dw_common_corner_bkg"
+ android:background="@drawable/module_ext_dw_common_corner_bkg"
android:gravity="center_vertical"
app:layout_constraintLeft_toRightOf="@+id/module_entrance_id_search"
app:layout_constraintTop_toTopOf="parent">
@@ -38,7 +38,7 @@
android:id="@+id/module_entrance_id_home"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_90"
- android:background="@drawable/module_map_dw_left_corner_bkg">
+ android:background="@drawable/module_ext_dw_left_corner_bkg">
@@ -121,7 +121,7 @@
android:id="@+id/module_entrance_id_move2_current_location"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_90"
- android:background="@drawable/module_map_dw_bottom_corner_bkg"
+ android:background="@drawable/module_ext_dw_bottom_corner_bkg"
android:gravity="center">
Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() {
- assertEquals( 4, 2 + 2 );
- }
-}
\ No newline at end of file
diff --git a/modules/mogo-module-main/src/androidTest/java/com/mogo/module/main/ExampleInstrumentedTest.java b/modules/mogo-module-main/src/androidTest/java/com/mogo/module/main/ExampleInstrumentedTest.java
deleted file mode 100644
index 22ac8c2ef4..0000000000
--- a/modules/mogo-module-main/src/androidTest/java/com/mogo/module/main/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.mogo.module.main;
-
-import android.content.Context;
-
-import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * @see Testing documentation
- */
-@RunWith( AndroidJUnit4.class )
-public class ExampleInstrumentedTest {
- @Test
- public void useAppContext() {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
-
- assertEquals( "com.mogo.module.main.test", appContext.getPackageName() );
- }
-}
diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java
index 90fcdaa8ba..11f524e3e4 100644
--- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java
+++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java
@@ -199,6 +199,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
@Override
public boolean onMarkerClicked( IMogoMarker marker ) {
switch2( marker.getOwner() );
+ mMogoModuleHandler.onMarkerReceive(marker.getOwner(),marker);
return false;
}
diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesHandler.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesHandler.java
index 41c4ec0712..73d83521f3 100644
--- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesHandler.java
+++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesHandler.java
@@ -3,6 +3,7 @@ package com.mogo.module.main.cards;
import com.mogo.map.listener.IMogoMapListener;
import com.mogo.map.location.IMogoLocationClient;
import com.mogo.map.location.IMogoLocationListener;
+import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.navi.IMogoNaviListener;
import com.mogo.service.module.IMogoModuleProvider;
@@ -72,4 +73,12 @@ public interface MogoModulesHandler extends IMogoMapListener,
* 销毁
*/
void destroy();
+
+
+ /**
+ * 卡片接收到Marker传入数据
+ * @param cardType
+ * @param marker
+ */
+ void onMarkerReceive(String cardType, IMogoMarker marker);
}
diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java
index 95c3dfe253..5ae3e5c9fc 100644
--- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java
+++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java
@@ -14,6 +14,7 @@ import com.mogo.map.MogoLatLng;
import com.mogo.map.listener.IMogoMapListener;
import com.mogo.map.location.IMogoLocationListener;
import com.mogo.map.location.MogoLocation;
+import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.model.MogoPoi;
import com.mogo.map.navi.IMogoNaviListener;
import com.mogo.map.navi.MogoNaviInfo;
@@ -21,8 +22,6 @@ import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.module.common.MogoModule;
import com.mogo.module.common.MogoModulePaths;
import com.mogo.module.main.MainActivity;
-import com.mogo.module.main.receiver.MogoReceiver;
-import com.mogo.module.service.ServiceConst;
import com.mogo.service.module.IMogoModuleLifecycle;
import com.mogo.service.module.IMogoModuleProvider;
import com.mogo.service.module.ModuleType;
@@ -437,4 +436,24 @@ public class MogoModulesManager implements MogoModulesHandler,
mMapLoadedCallback = null;
mEnableModuleName = null;
}
+
+ @Override
+ public void onCalculateSuccess() {
+
+ }
+
+ @Override
+ public void onoCalculateFailed() {
+ }
+
+ @Override
+ public void onMarkerReceive( String cardType, IMogoMarker marker ) {
+ for ( IMogoModuleProvider value : mModuleProviders.values() ) {
+ if ( value.getModuleName().equals( cardType ) ) {
+ if ( value.getMarkerClickListener() != null ) {
+ value.getMarkerClickListener().onMarkerClicked( marker );
+ }
+ }
+ }
+ }
}
diff --git a/modules/mogo-module-main/src/test/java/com/mogo/module/main/ExampleUnitTest.java b/modules/mogo-module-main/src/test/java/com/mogo/module/main/ExampleUnitTest.java
deleted file mode 100644
index 02a566aa4c..0000000000
--- a/modules/mogo-module-main/src/test/java/com/mogo/module/main/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.mogo.module.main;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() {
- assertEquals( 4, 2 + 2 );
- }
-}
\ No newline at end of file
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java
index 7e57af5d2c..70f0e26c1e 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java
@@ -9,7 +9,13 @@ import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.map.navi.IMogoNavi;
import com.mogo.map.uicontroller.IMogoMapUIController;
+import com.mogo.module.service.entity.MarkerCarChat;
+import com.mogo.module.service.entity.MarkerCardResult;
+import com.mogo.module.service.entity.MarkerExploreWay;
+import com.mogo.module.service.entity.MarkerLocation;
+import com.mogo.module.service.entity.MarkerOnlineCar;
import com.mogo.module.service.entity.MarkerResponse;
+import com.mogo.module.service.entity.MarkerShareMusic;
import com.mogo.module.service.marker.MapMarkerView;
import com.mogo.module.service.marker.MarkerInfoWindowAdapter;
import com.mogo.service.MogoServicePaths;
@@ -20,6 +26,8 @@ import com.mogo.service.map.IMogoMapService;
import com.mogo.utils.TipToast;
import com.mogo.utils.logger.Logger;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Random;
/**
@@ -32,7 +40,7 @@ import java.util.Random;
public class MarkerServiceHandler {
private static final String TAG = "MarkerServiceHandler";
- private static MogoMarkerClickListener mogoMarkerClickListener;
+ private static MoGoMarkerClickListener mogoMarkerClickListener;
private static IMogoMapService mMapService;
private static IMogoMarkerManager mMarkerManager;
@@ -54,8 +62,7 @@ public class MarkerServiceHandler {
markerInfoWindowAdapter = new MarkerInfoWindowAdapter(context, getNavi(), getImageloader());
mMapUIController = mMapService.getMapUIController();
-
- mogoMarkerClickListener = new MogoMarkerClickListener();
+ mogoMarkerClickListener = new MoGoMarkerClickListener();
// 长连接
mMogoSocketManager = (IMogoSocketManager) ARouter.getInstance().build(MogoServicePaths.PATH_SOCKET_MANAGER).navigation();
@@ -67,14 +74,58 @@ public class MarkerServiceHandler {
}
@Override
- public void onMsgReceived(MarkerResponse obj) {
- Logger.e("donghongyu", "===" + obj);
+ public void onMsgReceived(MarkerResponse response) {
+ Logger.e(TAG, "===" + response);
- for (int i = 0; i < 10; i++) {
- drawMapMarker();
+ getMarkerManager().removeMarkers();
+
+ // 解析不同的Marker类型,然后对应的进行绘制
+ if (response != null && response.getResult() != null) {
+ MarkerCardResult markerCardResult = response.getResult();
+
+ List carChat = markerCardResult.getCarChat();
+ List onlineCar = markerCardResult.getOnlineCar();
+ List exploreWay = markerCardResult.getExploreWay();
+ List shareMusic = markerCardResult.getShareMusic();
+
+ ArrayList optionsList = new ArrayList<>();
+
+ if (carChat != null) {
+ for (MarkerCarChat markerCarChat : carChat) {
+ MarkerLocation markerLocation = markerCarChat.getLocation();
+ drawMapMarker(markerCarChat.getType(), markerLocation, optionsList);
+ }
+ }
+
+ if (onlineCar != null) {
+ for (MarkerOnlineCar markerOnlineCar : onlineCar) {
+ MarkerLocation markerLocation = markerOnlineCar.getLocation();
+ drawMapMarker(markerOnlineCar.getType(), markerLocation, optionsList);
+ }
+ }
+
+ if (exploreWay != null) {
+ for (MarkerExploreWay markerExploreWay : exploreWay) {
+ MarkerLocation markerLocation = markerExploreWay.getLocation();
+ drawMapMarker(markerExploreWay.getType(), markerLocation, optionsList);
+ }
+ }
+
+ if (shareMusic != null) {
+ for (MarkerShareMusic markerShareMusic : shareMusic) {
+ MarkerLocation markerLocation = markerShareMusic.getLocation();
+ drawMapMarker(markerShareMusic.getType(), markerLocation, optionsList);
+ }
+ }
+
+ List iMogoMarkers = getMarkerManager().addMarkers(TAG, optionsList, true);
+ for (IMogoMarker iMogoMarker : iMogoMarkers) {
+ iMogoMarker.setInfoWindowAdapter(markerInfoWindowAdapter);
+ iMogoMarker.setOnMarkerClickListener(mogoMarkerClickListener);
+ }
}
- }
+ }
});
}
@@ -106,7 +157,7 @@ public class MarkerServiceHandler {
/**
* 地图上的Marker点击回调
*/
- static class MogoMarkerClickListener implements IMogoMarkerClickListener {
+ static class MoGoMarkerClickListener implements IMogoMarkerClickListener {
@Override
public boolean onMarkerClicked(IMogoMarker marker) {
@@ -117,14 +168,39 @@ public class MarkerServiceHandler {
}
- public static void drawMapMarker() {
- TipToast.shortTip("绘制Marker");
+ /**
+ * 绘制Marker
+ *
+ * @param markerTag Marker类型
+ * http://gitlab.zhidaoauto.com/ecos/yycp-service/CarLauncher-Docs/blob/master/%E5%8D%A1%E7%89%87%E7%B1%BB%E5%9E%8B%E5%AE%9A%E4%B9%89.md
+ * @param markerLocation 要绘制Marker的位置信息
+ * @param optionsList 要加入的Marker集合
+ */
+ public static void drawMapMarker(String markerTag, MarkerLocation markerLocation,
+ ArrayList optionsList) {
+ Logger.e(markerTag, "绘制Marker====markerTag:" + markerTag);
MapMarkerView mapMarkerView = new MapMarkerView(mContext);
MogoMarkerOptions options = new MogoMarkerOptions()
.icon(mapMarkerView)
- .owner(TAG)
+ .owner(markerTag)
+ .latitude(markerLocation.getLat())
+ .longitude(markerLocation.getLon());
+
+ optionsList.add(options);
+ }
+
+
+ //TODO 这里是用来测试的
+ public static void drawMapMarker() {
+ Logger.e(TAG, "=====绘制Marker====");
+
+ MapMarkerView mapMarkerView = new MapMarkerView(mContext);
+
+ MogoMarkerOptions options = new MogoMarkerOptions()
+ .icon(mapMarkerView)
+ .owner("CARD_TYPE_USER_DATA")
.latitude(39.574525d + new Random().nextDouble())
.longitude(116.21733d + new Random().nextDouble());
IMogoMarker marker = getMarkerManager().addMarker(TAG, options);
@@ -132,5 +208,8 @@ public class MarkerServiceHandler {
marker.setOnMarkerClickListener(mogoMarkerClickListener);
getMapUIController().changeZoom(false);
+
+ getMapUIController().changeZoom(10);
+
}
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java
index 943c415cc4..d8188ccdb1 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java
@@ -458,6 +458,16 @@ public class MogoServiceProvider implements IMogoModuleProvider,
}
}
+ @Override
+ public void onCalculateSuccess() {
+
+ }
+
+ @Override
+ public void onoCalculateFailed() {
+
+ }
+
public IMogoMarkerClickListener getMarkerClickListener() {
return null;
}
diff --git a/modules/mogo-module-tanlu/src/test/java/com/zhidao/tanlu/ExampleUnitTest.java b/modules/mogo-module-tanlu/src/test/java/com/zhidao/tanlu/ExampleUnitTest.java
deleted file mode 100644
index c1e9a4fcc5..0000000000
--- a/modules/mogo-module-tanlu/src/test/java/com/zhidao/tanlu/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.zhidao.tanlu;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() {
- assertEquals(4, 2 + 2);
- }
-}
\ No newline at end of file
diff --git a/services/mogo-service/src/androidTest/java/com/mogo/service/map/ExampleInstrumentedTest.java b/services/mogo-service/src/androidTest/java/com/mogo/service/map/ExampleInstrumentedTest.java
deleted file mode 100644
index 44238af9f8..0000000000
--- a/services/mogo-service/src/androidTest/java/com/mogo/service/map/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.mogo.service.map;
-
-import android.content.Context;
-
-import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * @see Testing documentation
- */
-@RunWith( AndroidJUnit4.class )
-public class ExampleInstrumentedTest {
- @Test
- public void useAppContext() {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
-
- assertEquals( "com.mogo.service.amap.test", appContext.getPackageName() );
- }
-}