| 251 | } |
| 252 | |
| 253 | int RemoteSearch::getBoundaries(const std::vector<hadmap::laneboundarypkid>& ids, |
| 254 | hadmap::txLaneBoundaries& boundaries) { |
| 255 | std::string baseUrl = pTrans->location(); |
| 256 | std::string url = UrlGen(baseUrl).db(dbName).getBoundary().url(); |
| 257 | |
| 258 | std::vector<PostParamPtr> params; |
| 259 | for (auto& id : ids) params.push_back(PostParamPtr(new BoundaryIdParam(id))); |
| 260 | std::string postJson; |
| 261 | generatePostJson(params, postJson); |
| 262 | |
| 263 | std::string jsonData; |
| 264 | if (pTrans->post(url, postJson, jsonData)) { |
| 265 | boundaries.clear(); |
| 266 | |
| 267 | JsonParser::parseBoundary(jsonData, boundaries); |
| 268 | |
| 269 | return boundaries.empty() ? TX_HADMAP_DATA_EMPTY : TX_HADMAP_DATA_OK; |
| 270 | } |
| 271 | |
| 272 | return TX_HADMAP_DATA_ERROR; |
| 273 | } |
| 274 | |
| 275 | int RemoteSearch::getSections(const hadmap::txSectionId& sectionId, hadmap::txSections& sections) { |
| 276 | std::string baseUrl = pTrans->location(); |
nothing calls this directly
no test coverage detected