yy1717
2020-03-20 3a48a0de38910517352557510882f2ff4d8436ae
lib/src/main/cpp/master/comm_if.cpp
@@ -492,11 +492,15 @@
            if (!doc.HasParseError()) {
                CleanRoadMap();
                DEBUG("开始解析路考地图");
                vector<double> mapPoints;
                mapPoints.clear();
                if (doc.HasMember("points")) {
                    const Value &s = doc["points"];
                    DEBUG("得到所有点");
                    // X-Y坐标集合
                    for (Value::ConstValueIterator itr2 = s.Begin();
                             itr2 != s.End(); ++itr2) {
@@ -510,6 +514,8 @@
                    const Value &a = doc["maps"];
                    for (Value::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr) {
                        DEBUG("得到各子地图");
                        if (itr->IsObject()) {
                            // a Map
                            int id, type;
@@ -520,7 +526,11 @@
                            vector<vector<int>> greenLines;
                            vector<vector<int>> triggerLines;
                            vector<vector<int>> redAreas;
                            vector<int> area;
                            vector<int> stopLine;
                            stopLine.clear();
                            area.clear();
                            tts.clear();
                            redLines.clear();
                            greenLines.clear();
@@ -557,8 +567,8 @@
                                }
                            }
                            if (itr->HasMember("trigger_line")) {
                                const Value &s = (*itr)["trigger_line"];
                            if (itr->HasMember("all_trigger_line")) {
                                const Value &s = (*itr)["all_trigger_line"];
                                for (Value::ConstValueIterator itrLine = s.Begin();
                                     itrLine != s.End(); ++itrLine) {
@@ -585,6 +595,24 @@
                                }
                            }
                            if (itr->HasMember("area")) {
                                const Value &s = (*itr)["area"];
                                for (Value::ConstValueIterator itrPoint = s.Begin();
                                     itrPoint != s.End(); ++itrPoint) {
                                    area.push_back((*itrPoint).GetInt());
                                }
                            }
                            if (itr->HasMember("stop_line")) {
                                const Value &s = (*itr)["stop_line"];
                                for (Value::ConstValueIterator itrPoint = s.Begin();
                                     itrPoint != s.End(); ++itrPoint) {
                                    stopLine.push_back((*itrPoint).GetInt());
                                }
                            }
                            if (itr->HasMember("id")) {
                                const Value &s = (*itr)["id"];
                                id = s.GetInt();
@@ -605,7 +633,7 @@
                                tts = s.GetString();
                            }
                            AddRoadMapParent(id, type, tts, redLines, redAreas, greenLines, triggerLines);
                            AddRoadMapParent(id, type, tts, redLines, redAreas, greenLines, triggerLines, area, stopLine);
                        }
                    }
                }