| | |
| | | MakeLine(&temp.line, &p1, &p2); |
| | | } |
| | | } |
| | | if (itr2->HasMember("center_point")) { |
| | | const Value &s = (*itr2)["center_point"]; |
| | | |
| | | temp.centrePoint = mapPoints[s.GetInt()]; |
| | | } |
| | | crossing.push_back(temp); |
| | | } |
| | | |
| | |
| | | map.triggerLines.push_back(trigger); |
| | | } |
| | | } |
| | | if (doc.HasMember("red_line")) { |
| | | const Value &a = doc["red_line"]; |
| | | |
| | | for (Value::ConstValueIterator itr = a.Begin(); |
| | | itr != a.End(); ++itr) { |
| | | forbid_line_t forbid; |
| | | |
| | | if (itr->HasMember("type")) { |
| | | const Value &s = (*itr)["type"]; |
| | | forbid.type = s.GetInt(); |
| | | } |
| | | if (itr->HasMember("id")) { |
| | | const Value &s = (*itr)["id"]; |
| | | forbid.id = s.GetInt(); |
| | | } |
| | | if (itr->HasMember("points")) { |
| | | const Value &a2 = (*itr)["points"]; |
| | | |
| | | for (Value::ConstValueIterator itr2 = a2.Begin(); |
| | | itr2 != a2.End(); ++itr2) { |
| | | forbid.points.push_back(mapPoints[(*itr2).GetInt()]); |
| | | } |
| | | } |
| | | map.forbidLines.push_back(forbid); |
| | | } |
| | | } |
| | | |
| | | DEBUG("地图解析完毕"); |
| | | |
| | | CleanRoadMap(); |