MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / getRoadMaxId

Method getRoadMaxId

common/map_sdk/map_engine/src/remote_search.cpp:330–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330int 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
349int RemoteSearch::getRoad(const roadpkid& roadId, const bool& wholeData, hadmap::txRoadPtr& roadPtr) {
350 std::string baseUrl = pTrans->location();

Callers

nothing calls this directly

Calls 5

urlMethod · 0.80
locationMethod · 0.45
getMethod · 0.45
ParseMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected