| 328 | } |
| 329 | |
| 330 | int RemoteSearch::getRoadMaxId(roadpkid& roadMaxId) { |
| 331 | std::string baseUrl = pTrans->location(); |
| 332 | std::string url = UrlGen(baseUrl).db(dbName).getRoadMaxId().url(); |
| 333 | |
| 334 | std::string jsonData; |
| 335 | if (pTrans->get(url, jsonData)) { |
| 336 | neb::CJsonObject jsonParser; |
| 337 | jsonParser.Parse(jsonData); |
| 338 | |
| 339 | std::string id; |
| 340 | jsonParser.Get("maxId", id); |
| 341 | roadMaxId = roadpkid(std::stoull(id)); |
| 342 | |
| 343 | return TX_HADMAP_DATA_OK; |
| 344 | } |
| 345 | |
| 346 | return TX_HADMAP_DATA_ERROR; |
| 347 | } |
| 348 | |
| 349 | int RemoteSearch::getRoad(const roadpkid& roadId, const bool& wholeData, hadmap::txRoadPtr& roadPtr) { |
| 350 | std::string baseUrl = pTrans->location(); |