| | |
| | | |
| | | import me.yokeyword.fragmentation.SupportFragment; |
| | | import safeluck.drive.evaluation.Constant; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatus; |
| | | import safeluck.drive.evaluation.R; |
| | | import safeluck.drive.evaluation.bean.BaseDataUIBean; |
| | | import safeluck.drive.evaluation.bean.ExamPlatformData; |
| | |
| | | public class ArcGisMapFragment extends SupportFragment implements View.OnClickListener { |
| | | |
| | | private static final String TAG = ArcGisMapFragment.class.getSimpleName(); |
| | | private static final int ENTER = 1;//进入 科二某个项目地图 |
| | | |
| | | private LinkedBlockingQueue queue = new LinkedBlockingQueue(100); |
| | | private ExecutorService consumer = Executors.newSingleThreadExecutor(); |
| | |
| | | // MyLog.i(TAG,"处理完11.时间="+Utils.formatTimeYYMMDDHHmmSSSSS(System.currentTimeMillis())); |
| | | |
| | | |
| | | } |
| | | }; |
| | | private ICEventListener icEventListener1 = new ICEventListener() { |
| | | @Override |
| | | public void onCEvent(String topic, int msgCode, int resultCode, Object obj) { |
| | | if (msgCode==13){ |
| | | ExamStatus examStatus = (ExamStatus)obj; |
| | | if (examStatus.getMap_id()>-1){ |
| | | if (examStatus.getEnter()==ENTER){ |
| | | MyLog.i(TAG,String.format("进入[%d] map",examStatus.getMap_id())); |
| | | double scale = mMapView.getMapScale(); |
| | | mMapView.setViewpointScaleAsync(scale * 0.2*0.2); |
| | | }else{ |
| | | MyLog.i(TAG,String.format("退出[%d] map",examStatus.getMap_id())); |
| | | double scale = mMapView.getMapScale(); |
| | | mMapView.setViewpointScaleAsync(scale * 5*5); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | |
| | | } |
| | | startWithPop(jiaXiaoFragment); |
| | | } |
| | | |
| | | |
| | | break; |
| | | } |
| | |
| | | SimpleFillSymbol simpleFillSymbolGls = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, Color.argb(255,0,0,0), lineSymbolGls); |
| | | private void drawGlses(List<safeluck.drive.evaluation.bean.Point> carNew, GisCarModel gisCarModel) { |
| | | |
| | | if(gisCarModel== null){ |
| | | return; |
| | | } |
| | | long beginTime = System.currentTimeMillis(); |
| | | |
| | | |
| | |
| | | consumer .shutdown(); |
| | | queue.clear(); |
| | | CEventCenter.onBindEvent(false,icEventListener, Constant.BIND_RTK_INFO_MAP); |
| | | CEventCenter.onBindEvent(false,icEventListener1, Constant.BIND_EXAM_STATUS_TOPIC); |
| | | |
| | | |
| | | } |
| | |
| | | public void onAttach(Context context) { |
| | | super.onAttach(context); |
| | | CEventCenter.onBindEvent(true,icEventListener,Constant.BIND_RTK_INFO_MAP); |
| | | CEventCenter.onBindEvent(true,icEventListener1,Constant.BIND_EXAM_STATUS_TOPIC); |
| | | } |
| | | |
| | | } |