dev
This commit is contained in:
@@ -13,6 +13,13 @@ android {
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -27,12 +34,9 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||
|
||||
implementation project(":libraries:mogo-map")
|
||||
api project(":libraries:mogo-map")
|
||||
api rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
api rootProject.ext.dependencies.fresco
|
||||
}
|
||||
|
||||
@@ -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 <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@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() );
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.service;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
@@ -11,15 +13,26 @@ package com.mogo.service;
|
||||
* <p>
|
||||
* Arouter.getInstance().path("").navigate()
|
||||
*/
|
||||
@Keep
|
||||
public class MogoServicePaths {
|
||||
|
||||
/**
|
||||
* 地图服务接口路径
|
||||
*/
|
||||
public static final String PATH_MAP_SERVICE = "/mogo/services/map";
|
||||
@Keep
|
||||
public static final String PATH_SERVICES_MAP = "/services/map";
|
||||
|
||||
/**
|
||||
* 图片接口
|
||||
*/
|
||||
public static final String PATH_IMAGE_LOADER = "/mogo/utils/imageloader";
|
||||
@Keep
|
||||
public static final String PATH_UTILS_IMAGE_LOADER = "/utils/imageloader";
|
||||
|
||||
/**
|
||||
* 埋点接口
|
||||
*/
|
||||
@Keep
|
||||
public static final String PATH_UTILS_ANALYTICS = "/utils/analytics";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.mogo.service.analytics;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
@Keep
|
||||
public interface IMogoAnalytics extends IProvider {
|
||||
|
||||
/**
|
||||
* 埋点
|
||||
*
|
||||
* @param event 事件名称
|
||||
* @param properties 埋点参数
|
||||
*/
|
||||
@Keep
|
||||
void track( String event, Map< String, Object > properties );
|
||||
}
|
||||
@@ -2,19 +2,24 @@ package com.mogo.service.imageloader;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 图片下载接口
|
||||
*/
|
||||
@Keep
|
||||
public interface IMogoImageLoaderListener {
|
||||
|
||||
@Keep
|
||||
void onStart();
|
||||
|
||||
// void onProcess( int completedSize, int totalSize );
|
||||
|
||||
// void onProcess( int completedSize, int totalSize );
|
||||
@Keep
|
||||
void onCompleted( Bitmap bitmap );
|
||||
|
||||
@Keep
|
||||
void onFailure( Exception e );
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package com.mogo.service.imageloader;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
/**
|
||||
@@ -10,19 +12,27 @@ import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
* <p>
|
||||
* 图片接口
|
||||
*/
|
||||
@Keep
|
||||
public interface IMogoImageloader extends IProvider {
|
||||
|
||||
@Keep
|
||||
void init( Context context );
|
||||
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView );
|
||||
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView, int width, int height );
|
||||
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView, int width, int height, final IMogoImageLoaderListener listener );
|
||||
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView, final IMogoImageLoaderListener listener );
|
||||
|
||||
@Keep
|
||||
void downloadImage( Context context, String url, IMogoImageLoaderListener listener );
|
||||
|
||||
@Keep
|
||||
void destroy();
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.graphics.Matrix;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.facebook.drawee.view.GenericDraweeView;
|
||||
import com.mogo.service.R;
|
||||
@@ -17,6 +18,7 @@ import com.mogo.service.R;
|
||||
* <p>
|
||||
* 封装 facebook GenericDraweeView,实现占位图、失败占位图、形状、边框、模糊等效果
|
||||
*/
|
||||
@Keep
|
||||
public class MogoImageView extends GenericDraweeView {
|
||||
|
||||
private int mPlaceHolder;
|
||||
@@ -48,19 +50,19 @@ public class MogoImageView extends GenericDraweeView {
|
||||
public MogoImageView( Context context, AttributeSet attrs, int theme ) {
|
||||
super( context, attrs, theme );
|
||||
TypedArray arrays = context.obtainStyledAttributes( attrs, R.styleable.MogoImageView );
|
||||
mPlaceHolder = arrays.getResourceId( R.styleable.MogoImageView_placeHolder, 0 );
|
||||
mFailureHolder = arrays.getResourceId( R.styleable.MogoImageView_failureHolder, 0 );
|
||||
mOverlayImageId = arrays.getResourceId( R.styleable.MogoImageView_overlayImageId, 0 );
|
||||
mShape = arrays.getInt( R.styleable.MogoImageView_shape, SHAPE_NORMAL );
|
||||
mRadius = arrays.getDimensionPixelSize( R.styleable.MogoImageView_radius, 0 );
|
||||
mTopLeftRadius = arrays.getDimensionPixelSize( R.styleable.MogoImageView_topLeftRadius, 0 );
|
||||
mTopRightRadius = arrays.getDimensionPixelSize( R.styleable.MogoImageView_topRightRadius, 0 );
|
||||
mBottomLeftRadius = arrays.getDimensionPixelSize( R.styleable.MogoImageView_bottomLeftRadius, 0 );
|
||||
mBottomRightRadius = arrays.getDimensionPixelSize( R.styleable.MogoImageView_bottomRightRadius, 0 );
|
||||
mBorderWidth = arrays.getDimensionPixelSize( R.styleable.MogoImageView_shapeBorderWidth, 0 );
|
||||
mBorderColor = arrays.getColor( R.styleable.MogoImageView_borderColor, Color.WHITE );
|
||||
mIsBlur = arrays.getBoolean( R.styleable.MogoImageView_isBlur, false );
|
||||
mBlurRadius = arrays.getInt( R.styleable.MogoImageView_blurRadius, 25 );
|
||||
mPlaceHolder = arrays.getResourceId( R.styleable.MogoImageView_miv_placeHolder, 0 );
|
||||
mFailureHolder = arrays.getResourceId( R.styleable.MogoImageView_miv_failureHolder, 0 );
|
||||
mOverlayImageId = arrays.getResourceId( R.styleable.MogoImageView_miv_overlayImageId, 0 );
|
||||
mShape = arrays.getInt( R.styleable.MogoImageView_miv_shape, SHAPE_NORMAL );
|
||||
mRadius = arrays.getDimensionPixelSize( R.styleable.MogoImageView_miv_radius, 0 );
|
||||
mTopLeftRadius = arrays.getDimensionPixelSize( R.styleable.MogoImageView_miv_topLeftRadius, 0 );
|
||||
mTopRightRadius = arrays.getDimensionPixelSize( R.styleable.MogoImageView_miv_topRightRadius, 0 );
|
||||
mBottomLeftRadius = arrays.getDimensionPixelSize( R.styleable.MogoImageView_miv_bottomLeftRadius, 0 );
|
||||
mBottomRightRadius = arrays.getDimensionPixelSize( R.styleable.MogoImageView_miv_bottomRightRadius, 0 );
|
||||
mBorderWidth = arrays.getDimensionPixelSize( R.styleable.MogoImageView_miv_shapeBorderWidth, 0 );
|
||||
mBorderColor = arrays.getColor( R.styleable.MogoImageView_miv_borderColor, Color.WHITE );
|
||||
mIsBlur = arrays.getBoolean( R.styleable.MogoImageView_miv_isBlur, false );
|
||||
mBlurRadius = arrays.getInt( R.styleable.MogoImageView_miv_blurRadius, 25 );
|
||||
arrays.recycle();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,17 @@ package com.mogo.service.map;
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.listener.IMogoMapListenerRegister;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.search.IMogoGeoSearch;
|
||||
import com.mogo.map.search.IMogoInputtipsSearch;
|
||||
import com.mogo.map.search.query.MogoInputtipsQuery;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearch;
|
||||
import com.mogo.map.search.inputtips.IMogoInputtipsSearch;
|
||||
import com.mogo.map.search.inputtips.query.MogoInputtipsQuery;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.MogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -19,7 +24,7 @@ import java.util.List;
|
||||
* <p>
|
||||
* 地图对外地接口
|
||||
*/
|
||||
public interface IMogoMapService extends IProvider {
|
||||
public interface IMogoMapService extends IProvider, IMogoMapListenerRegister {
|
||||
|
||||
/**
|
||||
* 获取定位服务实例
|
||||
@@ -61,4 +66,25 @@ public interface IMogoMapService extends IProvider {
|
||||
* @return
|
||||
*/
|
||||
IMogoGeoSearch getGeoSearch( Context context );
|
||||
|
||||
/**
|
||||
* 注册地图事件
|
||||
*
|
||||
* @param listener 回调事件
|
||||
*/
|
||||
void registerHostMapListener( IMogoMapListener listener );
|
||||
|
||||
/**
|
||||
* 反注册注册地图事件
|
||||
*/
|
||||
void unregisterHostMapListener();
|
||||
|
||||
/**
|
||||
* poi搜索服务
|
||||
*
|
||||
* @param context
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
IMogoPoiSearch getPoiSearch( Context context, MogoPoiSearchQuery query );
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mogo.service.module;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 卡片生命周期
|
||||
*/
|
||||
public interface IMogoModuleLifecycle {
|
||||
|
||||
/**
|
||||
* 卡片在最前面,可操作地图
|
||||
*/
|
||||
void onPerform();
|
||||
|
||||
/**
|
||||
* 卡片不可用,任何卡片的操作都会被launcher忽略
|
||||
*/
|
||||
void onDisable();
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.mogo.service.module;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* 模块 UI 接口
|
||||
*/
|
||||
public interface IMogoModuleProvider extends IProvider {
|
||||
|
||||
/**
|
||||
* fragment 提供者
|
||||
*/
|
||||
int TYPE_FRAGMENT = 1;
|
||||
|
||||
/**
|
||||
* view 提供者
|
||||
*/
|
||||
int TYPE_VIEW = 2;
|
||||
|
||||
/**
|
||||
* 创建卡片
|
||||
*
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
Fragment createFragment( Context context, Bundle data );
|
||||
|
||||
/**
|
||||
* 创建view
|
||||
*
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
View createView( Context context );
|
||||
|
||||
/**
|
||||
* 唯一标识
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@NonNull
|
||||
String getModuleName();
|
||||
|
||||
/**
|
||||
* 生命周期控制方法
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoModuleLifecycle getCardLifecycle();
|
||||
|
||||
/**
|
||||
* 地图监听对象
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoMapListener getMapListener();
|
||||
|
||||
/**
|
||||
* 是哪种类型的提供者
|
||||
* <p>
|
||||
* {@link #TYPE_FRAGMENT}
|
||||
* {@link #TYPE_VIEW}
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getType();
|
||||
}
|
||||
@@ -1,22 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<declare-styleable name="MogoImageView">
|
||||
<attr name="placeHolder" format="reference" />
|
||||
<attr name="failureHolder" format="reference" />
|
||||
<attr name="overlayImageId" format="reference" />
|
||||
<attr name="shape">
|
||||
<attr name="miv_placeHolder" format="reference" />
|
||||
<attr name="miv_failureHolder" format="reference" />
|
||||
<attr name="miv_overlayImageId" format="reference" />
|
||||
<attr name="miv_shape">
|
||||
<enum name="normal" value="0" />
|
||||
<enum name="circle" value="1" />
|
||||
<enum name="round" value="2" />
|
||||
</attr>
|
||||
<attr name="radius" format="dimension" />
|
||||
<attr name="topLeftRadius" format="dimension" />
|
||||
<attr name="topRightRadius" format="dimension" />
|
||||
<attr name="bottomLeftRadius" format="dimension" />
|
||||
<attr name="bottomRightRadius" format="dimension" />
|
||||
<attr name="shapeBorderWidth" format="dimension" />
|
||||
<attr name="borderColor" format="color" />
|
||||
<attr name="isBlur" format="boolean" />
|
||||
<attr name="blurRadius" format="integer" />
|
||||
<attr name="miv_radius" format="dimension" />
|
||||
<attr name="miv_topLeftRadius" format="dimension" />
|
||||
<attr name="miv_topRightRadius" format="dimension" />
|
||||
<attr name="miv_bottomLeftRadius" format="dimension" />
|
||||
<attr name="miv_bottomRightRadius" format="dimension" />
|
||||
<attr name="miv_shapeBorderWidth" format="dimension" />
|
||||
<attr name="miv_borderColor" format="color" />
|
||||
<attr name="miv_isBlur" format="boolean" />
|
||||
<attr name="miv_blurRadius" format="integer" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.mogo.service.map;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals( 4, 2 + 2 );
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
@@ -29,18 +30,19 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||
|
||||
implementation project(":libraries:mogo-map")
|
||||
implementation project(":foudations:mogo-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':services:mogo-service-api')
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.mogo.service.impl.analytics;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.service.impl.analytics.impl.MogoAnalyticsImpl;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
@Route( path = MogoServicePaths.PATH_UTILS_ANALYTICS )
|
||||
public class MogoAnalytics implements IMogoAnalytics {
|
||||
|
||||
private IMogoAnalytics mDelegate;
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
mDelegate = MogoAnalyticsImpl.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void track( String event, Map< String, Object > properties ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.track( event, properties );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.mogo.service.impl.analytics.impl;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.commons.analytics.AnalyticsUtils;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 公司埋点库实现
|
||||
*/
|
||||
public class MogoAnalyticsImpl implements IMogoAnalytics {
|
||||
|
||||
private static volatile MogoAnalyticsImpl sInstance;
|
||||
|
||||
private MogoAnalyticsImpl() {
|
||||
}
|
||||
|
||||
public static MogoAnalyticsImpl getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( MogoAnalyticsImpl.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new MogoAnalyticsImpl();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void track( String event, Map< String, Object > properties ) {
|
||||
AnalyticsUtils.track( event, properties );
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import com.mogo.service.impl.imageloader.glide.GlideImageLoader;
|
||||
* <p>
|
||||
* 实现图片接口
|
||||
*/
|
||||
@Route( path = MogoServicePaths.PATH_IMAGE_LOADER )
|
||||
@Route( path = MogoServicePaths.PATH_UTILS_IMAGE_LOADER )
|
||||
public class MogoImageLoader implements IMogoImageloader {
|
||||
|
||||
private IMogoImageloader mDelegate;
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.mogo.utils.glide.GlideApp;
|
||||
* <p>
|
||||
* 实现图片接口
|
||||
*/
|
||||
@Route( path = MogoServicePaths.PATH_IMAGE_LOADER )
|
||||
public class GlideImageLoader implements IMogoImageloader {
|
||||
|
||||
private static volatile GlideImageLoader sInstance;
|
||||
|
||||
@@ -4,15 +4,20 @@ import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.map.MogoMap;
|
||||
import com.mogo.map.listener.MogoMapListenerHandler;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.location.MogoLocationClient;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.search.IMogoGeoSearch;
|
||||
import com.mogo.map.search.IMogoInputtipsSearch;
|
||||
import com.mogo.map.search.MogoGeoSearch;
|
||||
import com.mogo.map.search.MogoInputtipsSearch;
|
||||
import com.mogo.map.search.query.MogoInputtipsQuery;
|
||||
import com.mogo.map.search.geo.IMogoGeoSearch;
|
||||
import com.mogo.map.search.inputtips.IMogoInputtipsSearch;
|
||||
import com.mogo.map.search.geo.MogoGeoSearch;
|
||||
import com.mogo.map.search.inputtips.MogoInputtipsSearch;
|
||||
import com.mogo.map.search.inputtips.query.MogoInputtipsQuery;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.MogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
|
||||
@@ -25,7 +30,7 @@ import java.util.List;
|
||||
* <p>
|
||||
* 地图对外地接口
|
||||
*/
|
||||
@Route( path = MogoServicePaths.PATH_MAP_SERVICE )
|
||||
@Route( path = MogoServicePaths.PATH_SERVICES_MAP )
|
||||
public class MogoMapService implements IMogoMapService {
|
||||
|
||||
@Override
|
||||
@@ -61,6 +66,21 @@ public class MogoMapService implements IMogoMapService {
|
||||
return new MogoGeoSearch( context );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHostMapListener( IMogoMapListener listener ) {
|
||||
MogoMapListenerHandler.getInstance().registerHostMapListener( listener );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterHostMapListener() {
|
||||
MogoMapListenerHandler.getInstance().unregisterHostMapListener();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoPoiSearch getPoiSearch( Context context, MogoPoiSearchQuery query ) {
|
||||
return new MogoPoiSearch( context, query );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user