| 128 | } |
| 129 | |
| 130 | string LogAs2GisPath(Graph::EdgeVector const & path) |
| 131 | { |
| 132 | CHECK(!path.empty(), ("Paths should not be empty")); |
| 133 | |
| 134 | ostringstream ost; |
| 135 | ost << "https://2gis.ru/moscow?queryState="; |
| 136 | |
| 137 | auto ll = mercator::ToLatLon(path.front().GetStartPoint()); |
| 138 | ost << "center%2F" << ll.m_lon << "%2C" << ll.m_lat << "%2F"; |
| 139 | ost << "zoom%2F" << 17 << "%2F"; |
| 140 | ost << "ruler%2Fpoints%2F"; |
| 141 | for (auto const & e : path) |
| 142 | { |
| 143 | ll = mercator::ToLatLon(e.GetStartPoint()); |
| 144 | ost << ll.m_lon << "%20" << ll.m_lat << "%2C"; |
| 145 | } |
| 146 | ll = mercator::ToLatLon(path.back().GetEndPoint()); |
| 147 | ost << ll.m_lon << "%20" << ll.m_lat; |
| 148 | |
| 149 | return ost.str(); |
| 150 | } |
| 151 | |
| 152 | string LogAs2GisPath(Graph::Edge const & e) |
| 153 | { |
no test coverage detected