Commit 7cba3f05 authored by oscar's avatar oscar

提交ids接口

parent a317328b
......@@ -76,6 +76,7 @@ namespace jf {
bool GetMapData(const Point& ptInLoc, double dCarAngle, long& lOutRaodId, std::vector<long>& vctlOutPreRoadId, std::vector<long>& vctlOutNxtRoadId, int& nLaneCnt, int& nOutLaneNum, LaneType& nOutLaneType, EdgeCrossType& nOutLeftEdgeCrossType,
EdgeCrossType& nOutRightEdgeCrossType, int& nOutSpeedLimit, double& dOutLaneAngle, Point& ptOutFoot);
bool GetMapIDS(const Point& ptInLoc, int& id);
};
} // namespace jf
......
......@@ -229,5 +229,22 @@ namespace jf {
return true;
}
bool MapInterface::GetMapIDS(const Point& ptInLoc, int& id)
{
id = 0;
char** vecRoad = nullptr;
int nSize = 0;
auto result = g_map.GetAllJunctionRoadIDS(ptInLoc.dLon, ptInLoc.dLat, vecRoad, nSize);
if (result)
{
if (nSize == 1)
{
std::string ids = vecRoad[0];
id = std::stol(ids);
}
}
return true;
}
} // namespace jf
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment