驾考添加日志打印到文件; TrainFragment默认给arcgis url赋值,后面arcgis map用到的url的是mmpk文件
| | |
| | | if (examStatus.getEnter()==ENTER){ |
| | | double scale = mMapView.getMapScale(); |
| | | MyLog.i(TAG,String.format("进入[%d] map,scale=%f",examStatus.getMap_id(),scale)); |
| | | mMapView.setViewpointScaleAsync(scale * 0.2); |
| | | mMapView.setViewpointScaleAsync(scale * 0.5*0.5); |
| | | |
| | | |
| | | |
| | |
| | | double scale = mMapView.getMapScale(); |
| | | MyLog.i(TAG,String.format("退出[%d] map,scale=%f",examStatus.getMap_id(),scale)); |
| | | |
| | | mMapView.setViewpointScaleAsync(scale * 5); |
| | | mMapView.setViewpointScaleAsync(scale * 2); |
| | | |
| | | } |
| | | } |
| | |
| | | // create an empty map instance |
| | | ArcGISMap map = new ArcGISMap(); |
| | | Log.i(TAG,String.format("map.getMiniScale=%f",map.getMinScale())); |
| | | map.setMinScale(400.0); |
| | | map.setMinScale(300.0); |
| | | // add map image layer as operational layer |
| | | map.getOperationalLayers().add(mapImageLayer); |
| | | mMapView.setMap(map); |
| | |
| | | |
| | | |
| | | |
| | | url = Environment.getExternalStorageDirectory().getAbsolutePath()+ File.separator+_mActivity.getPackageName()+"/shoufei0220.mmpk"; |
| | | url = Environment.getExternalStorageDirectory().getAbsolutePath()+ File.separator+_mActivity.getPackageName()+"/shoufei0223.mmpk"; |
| | | Log.i(TAG,"url ========="+url); |
| | | final MobileMapPackage mobileMapPackage = new MobileMapPackage(url); |
| | | mobileMapPackage.loadAsync(); |
| | |
| | | canvas3.drawCircle((float) base_x, (float) base_y, 2, paint); |
| | | |
| | | paint.setColor(Color.RED); |
| | | |
| | | Log.i(TAG,String.format("scalex=%d,scaley=%d,car[0][0]=%f,base_x=%f,base_y=%f",scale_x,scale_y,car[tire.get(0)][0],base_x,base_y)); |
| | | canvas3.drawCircle((float) (base_x + (car[tire.get(0)][0]) * scale_x), (float) (base_y + (car[tire.get(0)][1]) * scale_y), 2.5f, paint); |
| | | canvas3.drawCircle((float) (base_x + (car[tire.get(1)][0]) * scale_x), (float) (base_y + (car[tire.get(1)][1]) * scale_y), 2.5f, paint); |
| | | canvas3.drawCircle((float) (base_x + (car[tire.get(2)][0]) * scale_x), (float) (base_y + (car[tire.get(2)][1]) * scale_y), 2.5f, paint); |
| | |
| | | if (messageRemoteService != null){ |
| | | this.cmd = messageRemoteService.msgCode; |
| | | this.json = messageRemoteService.json; |
| | | MyLog.i(TAG, json); |
| | | |
| | | |
| | | RealTimeCarPos timeCarPos = gson.fromJson((String) json, RealTimeCarPos.class); |
| | |
| | | } |
| | | } |
| | | }else{ |
| | | MyLog.i(TAG,"暂时支持曲线"); |
| | | map_other = new double[xys.size()/2][2]; |
| | | for (int k=0; k<xys.size();k++){ |
| | | if ((k % 2) == 0) { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | messageRemoteService = (MessageRemoteService) queue.poll(); |
| | | if (messageRemoteService != null) { |
| | | MyLog.i(TAG, messageRemoteService.json+" 消息队列长度:"+queue.size()); |
| | | |
| | | |
| | | RealTimeCarPos timeCarPos = gson.fromJson((String) messageRemoteService.json, RealTimeCarPos.class); |
| | |
| | | |
| | | messageRemoteService = (MessageRemoteService) queue.poll(); |
| | | if (messageRemoteService != null) { |
| | | MyLog.i(TAG, messageRemoteService.json+" 消息队列长度:"+queue.size()); |
| | | |
| | | |
| | | RealTimeCarPos timeCarPos = gson.fromJson((String) messageRemoteService.json, RealTimeCarPos.class); |
| | |
| | | case R.id.view_map: |
| | | |
| | | String url = getArcGisUrl(ExamPlatformData.getInstance().getExamType()); |
| | | Log.i(TAG,"map head lulao gps url="+url); |
| | | MyLog.i(TAG,"map head arcgis url="+url); |
| | | startArcGisMapFragment(url); |
| | | |
| | | |
| | |
| | | |
| | | private void startArcGisMapFragment(String url) { |
| | | |
| | | // url = "http://arcgis.aaej.cn/arcgis/rest/services/高庙村首飞驾校科二地图/MapServer"; |
| | | url = "http://arcgis.aaej.cn/arcgis/rest/services/高庙村首飞驾校科二地图/MapServer"; |
| | | if (!TextUtils.isEmpty(url)) { |
| | | ArcGisMapFragment jiaXiaoFragment = findFragment(ArcGisMapFragment.class); |
| | | if (jiaXiaoFragment == null) { |
| | |
| | | } |
| | | |
| | | private void loadJson() { |
| | | MyLog.i("loadJson"); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |