增加了小地图代码
This commit is contained in:
@@ -1,8 +1,79 @@
|
||||
package com.mogo.module.small.map;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.module.common.entity.MogoSnapshotSetData;
|
||||
import com.mogo.module.common.machinevision.IMachineVisionInterface;
|
||||
import com.mogo.module.common.wm.WindowManagerView;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
* @date 12/10/20 1:35 PM
|
||||
*/
|
||||
public class SmallMapService {
|
||||
public class SmallMapService extends Service {
|
||||
private static final String TAG = "MachineVisionMapService";
|
||||
private IBinder mBinder;
|
||||
private WindowManagerView mMachineVisionMapViewManager;
|
||||
private SmallMapView mMapView;
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
mBinder = new SmallMapServiceBinder();
|
||||
addMachineVisionMapView();
|
||||
Logger.d(TAG, "onBind");
|
||||
return mBinder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRebind(Intent intent) {
|
||||
super.onRebind(intent);
|
||||
addMachineVisionMapView();
|
||||
Logger.d(TAG, "onRebind");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onUnbind(Intent intent) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
}
|
||||
|
||||
private void addMachineVisionMapView() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 小地图与大地图之间进程通讯
|
||||
*/
|
||||
public class SmallMapServiceBinder extends IMachineVisionInterface.Stub {
|
||||
|
||||
@Override
|
||||
public void postData(MogoSnapshotSetData data) throws RemoteException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideViewIfExist() throws RemoteException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showViewIfExist() throws RemoteException {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,47 @@
|
||||
package com.mogo.module.small.map;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.map.MogoBaseMapView;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
* @date 12/10/20 1:35 PM
|
||||
*/
|
||||
public class SmallMapView {
|
||||
public class SmallMapView extends MogoBaseMapView {
|
||||
private final String TAG = "SmallMapView";
|
||||
|
||||
public SmallMapView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public SmallMapView(Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public SmallMapView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addDleMaps() {
|
||||
Log.d(TAG, "addDleMaps……");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void display2DMap(boolean invokeCreateAuto, boolean invokeResumeAuto) {
|
||||
Log.d(TAG, "display2DMap……");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayVRMap(boolean invokeCreateAuto, boolean invokeResumeAuto) {
|
||||
Log.d(TAG, "displayVRMap……");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.service.module.ModuleType;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
@@ -16,7 +17,7 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
*/
|
||||
@Route(path = IMogoSmallMapProvider.path)
|
||||
public class SmallVisionProvider implements IMogoSmallMapProvider {
|
||||
private static final String TAG = "SmallVisionProvider";
|
||||
private final String TAG = "SmallVisionProvider";
|
||||
|
||||
@Override
|
||||
public Fragment createFragment(Context context, Bundle data) {
|
||||
@@ -31,16 +32,23 @@ public class SmallVisionProvider implements IMogoSmallMapProvider {
|
||||
@NonNull
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return null;
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return 0;
|
||||
return ModuleType.TYPE_SERVICE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
Log.d(TAG, "小地图模块初始化……");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
Log.d(TAG, "小地图模块销毁……");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user