endian11
2020-09-17 0832081b696b58a01f50e0c65aa20cc538e19e4b
app/src/main/java/safeluck/drive/evaluation/routecollect/impl/RouteModel.java
@@ -29,22 +29,33 @@
        @Override
        public void onCEvent(String topic, int msgCode, int resultCode, Object obj) {
            //,"coord_x":0.974,"coord_x_dir":"N","coord_y":-0.191,"c
            if (iLoadListener != null){
                CollectPointResult collectPointResult = new CollectPointResult();
                try {
                    JSONObject jsonObject = new JSONObject((String)obj);
                    double x = jsonObject.getDouble("coord_x");
                    double y = jsonObject.getDouble("coord_y");
            if (msgCode==Constant.RTK_INFO){
                if (iLoadListener != null){
                    CollectPointResult collectPointResult = new CollectPointResult();
                    try {
                        JSONObject jsonObject = new JSONObject((String)obj);
                        double x = jsonObject.getDouble("coord_x");
                        double y = jsonObject.getDouble("coord_y");
                    Log.i(TAG,String.format("采集到的点【x=%f,y=%f]",x,y));
                    collectPointResult.setX(Utils.getdouble(x,4));
                    collectPointResult.setY(Utils.getdouble(y,4));
                    iLoadListener.finishCollectItem(collectPointResult);
                } catch (JSONException e) {
                    e.printStackTrace();
                        Log.i(TAG,String.format("采集到的点【x=%f,y=%f]",x,y));
                        collectPointResult.setX(Utils.getdouble(x,4));
                        collectPointResult.setY(Utils.getdouble(y,4));
                        iLoadListener.finishCollectItem(collectPointResult);
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
            }
            if (msgCode == Constant.ENTER_OR_EXIT_ROAD_ID){
                Log.i(TAG,"道路消息"+(String)obj);
            }
            if (msgCode == Constant.ENTER_OR_EXIT_ROADCROSS_ID){
                Log.i(TAG,"路口消息"+(String)obj);
            }
        }
    };