| | |
| | | import android.graphics.Paint; |
| | | import android.graphics.Path; |
| | | import android.os.Bundle; |
| | | import android.text.TextUtils; |
| | | import android.util.Log; |
| | | import android.view.LayoutInflater; |
| | | import android.view.SurfaceHolder; |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.reflect.TypeToken; |
| | | |
| | | import java.io.IOException; |
| | | import java.lang.reflect.Type; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | |
| | | import me.yokeyword.fragmentation.SupportFragment; |
| | | import safeluck.drive.evaluation.Constant; |
| | | import safeluck.drive.evaluation.R; |
| | | import safeluck.drive.evaluation.bean.ExamPlatformData; |
| | | import safeluck.drive.evaluation.bean.RealTimeCarPos; |
| | | import safeluck.drive.evaluation.bean.RoadExamMap; |
| | | import safeluck.drive.evaluation.cEventCenter.CEventCenter; |
| | |
| | | |
| | | private static final int ALL_MAP = 100; |
| | | private boolean isDrawing = false; |
| | | private StringBuffer buffer;//存放地图的buffer |
| | | private StringBuffer buffer = null;//存放地图的buffer |
| | | private ICEventListener rtcmicEventListener = new ICEventListener() { |
| | | @Override |
| | | public void onCEvent(String topic, int msgCode, int resultCode, final Object obj) { |
| | |
| | | } |
| | | }; |
| | | boolean flag = true; |
| | | String newmap = null; |
| | | class CalRunnable implements Runnable{ |
| | | |
| | | |
| | |
| | | tire.add(tire4.get(0)); |
| | | |
| | | |
| | | if (buffer == null) { |
| | | |
| | | buffer = FileUtil.readAssetTxtFile(_mActivity, Constant.ROAD_MAP); |
| | | Log.i(TAG, "ditu=" + buffer.toString().trim()); |
| | | } |
| | | final String roadMapPath = ExamPlatformData.getInstance().getRoadMapPath(); |
| | | if (!TextUtils.isEmpty(roadMapPath)){ |
| | | byte [] datas= FileUtil.readFile(roadMapPath); |
| | | if (datas != null){ |
| | | newmap= new String(datas); |
| | | }else{ |
| | | MyLog.i(String.format("文件:%s不存在",roadMapPath)); |
| | | } |
| | | |
| | | }else{ |
| | | |
| | | buffer = FileUtil.readAssetTxtFile(_mActivity, Constant.ROAD_MAP); |
| | | Log.i(TAG, "ditu=" + buffer.toString().trim()); |
| | | } |
| | | |
| | | |
| | | Type type = new TypeToken<RoadExamMap>() { |
| | | }.getType(); |
| | | if (buffer != null) { |
| | | examMaps = gson.fromJson(buffer.toString().trim(), type); |
| | | }else{ |
| | | examMaps = gson.fromJson(newmap.trim(),type); |
| | | } |
| | | if (examMaps != null) { |
| | | |