dev
This commit is contained in:
@@ -17,22 +17,20 @@ import androidx.annotation.Keep;
|
||||
public class MogoServicePaths {
|
||||
|
||||
/**
|
||||
* 地图服务接口路径
|
||||
* 地图服务接口ARouter实例化路径
|
||||
*/
|
||||
@Keep
|
||||
public static final String PATH_SERVICES_MAP = "/services/map";
|
||||
public static final String PATH_SERVICES_MAP = "/mapservices/api";
|
||||
|
||||
/**
|
||||
* 图片接口
|
||||
* 图片接口ARouter实例化路径
|
||||
*/
|
||||
@Keep
|
||||
public static final String PATH_UTILS_IMAGE_LOADER = "/utils/imageloader";
|
||||
public static final String PATH_UTILS_IMAGE_LOADER = "/imageloader/api";
|
||||
|
||||
/**
|
||||
* 埋点接口
|
||||
* 埋点接口ARouter实例化路径
|
||||
*/
|
||||
@Keep
|
||||
public static final String PATH_UTILS_ANALYTICS = "/utils/analytics";
|
||||
|
||||
|
||||
public static final String PATH_UTILS_ANALYTICS = "/analytics/api";
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Map;
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 描述
|
||||
* 埋点业务接口
|
||||
*/
|
||||
@Keep
|
||||
public interface IMogoAnalytics extends IProvider {
|
||||
|
||||
@@ -8,18 +8,28 @@ import androidx.annotation.Keep;
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 图片下载接口
|
||||
* 图片加载接口
|
||||
*/
|
||||
@Keep
|
||||
public interface IMogoImageLoaderListener {
|
||||
|
||||
/**
|
||||
* 开始加载
|
||||
*/
|
||||
@Keep
|
||||
void onStart();
|
||||
|
||||
// void onProcess( int completedSize, int totalSize );
|
||||
|
||||
/**
|
||||
* 加载完成
|
||||
*/
|
||||
@Keep
|
||||
void onCompleted( Bitmap bitmap );
|
||||
|
||||
/**
|
||||
* 加载失败
|
||||
*/
|
||||
@Keep
|
||||
void onFailure( Exception e );
|
||||
}
|
||||
@@ -10,29 +10,66 @@ import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 图片接口
|
||||
* 图片接口,使用
|
||||
*/
|
||||
@Keep
|
||||
public interface IMogoImageloader extends IProvider {
|
||||
|
||||
@Keep
|
||||
void init( Context context );
|
||||
|
||||
/**
|
||||
* 加载图片
|
||||
*
|
||||
* @param url 图片地址
|
||||
* @param imageView 特定的图片控件
|
||||
*/
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView );
|
||||
|
||||
/**
|
||||
* 加载图片
|
||||
*
|
||||
* @param url 图片地址
|
||||
* @param imageView 图片控件
|
||||
* @param width 图片宽度
|
||||
* @param height 图片高度
|
||||
*/
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView, int width, int height );
|
||||
|
||||
/**
|
||||
* 加载图片
|
||||
*
|
||||
* @param url 图片地址
|
||||
* @param imageView 图片控件
|
||||
* @param width 图片宽度
|
||||
* @param height 图片高度
|
||||
* @param listener 加载回调
|
||||
*/
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView, int width, int height, final IMogoImageLoaderListener listener );
|
||||
|
||||
/**
|
||||
* 加载图片
|
||||
*
|
||||
* @param url 图片地址
|
||||
* @param imageView 图片控件
|
||||
* @param listener 加载回调
|
||||
*/
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView, final IMogoImageLoaderListener listener );
|
||||
|
||||
/**
|
||||
* 下载图片
|
||||
*
|
||||
* @param context
|
||||
* @param url 图片地址
|
||||
* @param listener 下载回调
|
||||
*/
|
||||
@Keep
|
||||
void downloadImage( Context context, String url, IMogoImageLoaderListener listener );
|
||||
|
||||
/**
|
||||
* 请勿调用
|
||||
*/
|
||||
@Keep
|
||||
void destroy();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.service.map;
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.map.listener.IMogoHosListenerRegister;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.listener.IMogoMapListenerRegister;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
@@ -21,9 +22,9 @@ import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
* <p>
|
||||
* 地图对外地接口
|
||||
* 地图对外接口
|
||||
*/
|
||||
public interface IMogoMapService extends IProvider, IMogoMapListenerRegister, IMogoNaviListenerRegister {
|
||||
public interface IMogoMapService extends IProvider {
|
||||
|
||||
/**
|
||||
* 获取定位服务实例,全局唯一
|
||||
@@ -33,6 +34,14 @@ public interface IMogoMapService extends IProvider, IMogoMapListenerRegister, IM
|
||||
*/
|
||||
IMogoLocationClient getSingletonLocationClient( Context context );
|
||||
|
||||
/**
|
||||
* 获取定位服务实例
|
||||
*
|
||||
* @param context
|
||||
* @return 定位实例
|
||||
*/
|
||||
IMogoLocationClient getLocationClient( Context context );
|
||||
|
||||
/**
|
||||
* 获取关键字搜索地址服务
|
||||
*
|
||||
@@ -50,30 +59,6 @@ public interface IMogoMapService extends IProvider, IMogoMapListenerRegister, IM
|
||||
*/
|
||||
IMogoGeoSearch getGeoSearch( Context context );
|
||||
|
||||
/**
|
||||
* 注册地图事件,各业务模块不用关注
|
||||
*
|
||||
* @param listener 回调事件
|
||||
*/
|
||||
void registerHostMapListener( IMogoMapListener listener );
|
||||
|
||||
/**
|
||||
* 反注册注册地图事件,各业务模块不用关注
|
||||
*/
|
||||
void unregisterHostMapListener();
|
||||
|
||||
/**
|
||||
* 注册导航回调,各业务模块不用关注
|
||||
*
|
||||
* @param listener 回调函数
|
||||
*/
|
||||
void registerHostNaviListener( IMogoNaviListener listener );
|
||||
|
||||
/**
|
||||
* 注销导航回调,各业务模块不用关注
|
||||
*/
|
||||
void unregisterHostNaviListener();
|
||||
|
||||
/**
|
||||
* poi搜索服务
|
||||
*
|
||||
@@ -104,4 +89,11 @@ public interface IMogoMapService extends IProvider, IMogoMapListenerRegister, IM
|
||||
* @return
|
||||
*/
|
||||
IMogoMapUIController getMapUIController();
|
||||
|
||||
/**
|
||||
* 主模块监听注册
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoHosListenerRegister getHostListenerRegister();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ package com.mogo.service.module;
|
||||
public interface IMogoModuleLifecycle {
|
||||
|
||||
/**
|
||||
* 卡片在最前面,可操作地图
|
||||
* 当前显示的卡片
|
||||
*/
|
||||
void onPerform();
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
|
||||
/**
|
||||
@@ -20,12 +21,12 @@ import com.mogo.map.navi.IMogoNaviListener;
|
||||
public interface IMogoModuleProvider extends IProvider {
|
||||
|
||||
/**
|
||||
* fragment 提供者
|
||||
* 模块类型为fragment
|
||||
*/
|
||||
int TYPE_FRAGMENT = 1;
|
||||
|
||||
/**
|
||||
* view 提供者
|
||||
* 模块类型为view
|
||||
*/
|
||||
int TYPE_VIEW = 2;
|
||||
|
||||
@@ -46,7 +47,7 @@ public interface IMogoModuleProvider extends IProvider {
|
||||
View createView( Context context );
|
||||
|
||||
/**
|
||||
* 唯一标识
|
||||
* 模块唯一标识
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -83,4 +84,11 @@ public interface IMogoModuleProvider extends IProvider {
|
||||
* @return
|
||||
*/
|
||||
IMogoNaviListener getNaviListener();
|
||||
|
||||
/**
|
||||
* 定位变化监听:此接口接受地图定位信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoLocationListener getLocationListener();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user