增加本地保存mmpk路径,以及修改场地mmpk加载成roadmmmpk路径错误
| | |
| | | private String yardMmpkPath=""; |
| | | public void setRoadMMPKPath(String roadMmpkPath) { |
| | | this.roadMmpkPath = roadMmpkPath; |
| | | SPUtils.put(app.getAppContext(),SPUtils.ROAD_MMPK,yardMmpkPath); |
| | | } |
| | | |
| | | public String getRoadMmpkPath(){ |
| | | roadMmpkPath = (String) SPUtils.get(app.getAppContext(),SPUtils.ROAD_MMPK,""); |
| | | return roadMmpkPath; |
| | | } |
| | | |
| | | public String getYardMmpkPath(){ |
| | | return roadMmpkPath; |
| | | yardMmpkPath = (String) SPUtils.get(app.getAppContext(),SPUtils.YARD_MMPK,""); |
| | | return yardMmpkPath; |
| | | } |
| | | |
| | | public void setYardMMPKPath(String yardMmpkPath) { |
| | | this.yardMmpkPath = yardMmpkPath; |
| | | SPUtils.put(app.getAppContext(),SPUtils.YARD_MMPK,yardMmpkPath); |
| | | } |
| | | } |
| | |
| | | if (!isExist){ |
| | | Toast.makeText(_mActivity, "请在\"设置\"里选择道路离线地图包", Toast.LENGTH_SHORT).show(); |
| | | }else{ |
| | | |
| | | showMMPK(); |
| | | // url = Environment.getExternalStorageDirectory().getAbsolutePath()+ File.separator+_mActivity.getPackageName()+"/road.mmpk"; |
| | | } |
| | | }else{ |
| | |
| | | if (!isExist){ |
| | | Toast.makeText(_mActivity, "请在\"设置\"里选择场地离线地图包", Toast.LENGTH_SHORT).show(); |
| | | }else{ |
| | | |
| | | showMMPK(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | return view; |
| | | } |
| | | |
| | | private void showMMPK() { |
| | | MyLog.i(TAG,"现在加载:"+url); |
| | | final MobileMapPackage mobileMapPackage = new MobileMapPackage(url); |
| | | mobileMapPackage.loadAsync(); |
| | |
| | | mMapView.setMap(mainArcGismapMMPK); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | return view; |
| | | } |
| | | |
| | | |
| | | |
| | | RTKInfoBean rtkInfoBean; |
| | |
| | | public static final String EXAM_ID = "exam_id"; |
| | | public static final String EXAM_ROUTE_ID = "exam_route_id";//训练/考试用的 线路id,本地化存储,app重置之后根据它检索数据库 |
| | | public static final String BLUETOOTH_MAC = "bluetooth_mac"; |
| | | public static final String YARD_MMPK = "yard_mmpk_path"; |
| | | public static final String ROAD_MMPK = "road_mmpk_path"; |
| | | |
| | | //将 HashMap 用sp存储起来 |
| | | public static void saveHashMap(HashMap<BaseDataUIBean.TYPE_,MapInfoHead> map, Context context){ |