| | |
| | | mapPoints.push_back((*itr2).GetDouble()); |
| | | } |
| | | |
| | | SetRoadMapPoints(mapPoints); |
| | | } |
| | | |
| | | if (doc.HasMember("maps")) { |
| | |
| | | tts = s.GetString(); |
| | | } |
| | | |
| | | AddRoadMapParent(id, type, tts, stop_flag, redLines, redAreas, greenLines, triggerLines, roadEdgeLines, area, stopLine); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (doc.HasMember("special_area")) { |
| | | const Value &a = doc["special_area"]; |
| | | |
| | | vector<special_area_t> specialAreas; |
| | | |
| | | for (Value::ConstValueIterator itr = a.Begin(); |
| | | itr != a.End(); ++itr) { |
| | | special_area_t specialArea; |
| | |
| | | } |
| | | } |
| | | if (doc.HasMember("trigger_line")) { |
| | | const Value &a = doc["trigger_line"]; |
| | | |
| | | for (Value::ConstValueIterator itr = a.Begin(); |
| | | itr != a.End(); ++itr) { |
| | | trigger_line_t trigger; |
| | | |
| | | if (itr->HasMember("type")) { |
| | | const Value &s = (*itr)["type"]; |
| | | trigger.active = s.GetInt(); |
| | | } |
| | | if (itr->HasMember("id")) { |
| | | const Value &s = (*itr)["id"]; |
| | | trigger.id = s.GetInt(); |
| | | } |
| | | if (itr->HasMember("road")) { |
| | | const Value &s = (*itr)["road"]; |
| | | trigger.road = s.GetInt(); |
| | | } |
| | | if (itr->HasMember("tts")) { |
| | | const Value &s = (*itr)["tts"]; |
| | | trigger.tts = s.GetString(); |
| | | } |
| | | if (itr->HasMember("time")) { |
| | | const Value &s = (*itr)["time"]; |
| | | trigger.time = s.GetInt(); |
| | | } else { |
| | | trigger.time = 0; |
| | | } |
| | | if (itr->HasMember("distance")) { |
| | | const Value &s = (*itr)["distance"]; |
| | | trigger.distance = s.GetInt(); |
| | | } else { |
| | | trigger.distance = 0; |
| | | } |
| | | |
| | | if (itr->HasMember("line")) { |
| | | const Value &a2 = (*itr)["line"]; |
| | | |
| | | for (Value::ConstValueIterator itr2 = a2.Begin(); |
| | | itr2 != a2.End(); ++itr2) { |
| | | trigger.points.push_back(mapPoints[(*itr2).GetInt()]); |
| | | } |
| | | } |
| | | |
| | | map.triggerLines.push_back(trigger); |
| | | } |
| | | } |
| | | DEBUG("地图解析完毕"); |
| | | |