Expose pronunciation in RouteStep
Uses name:pronunciation by default for cars.
This commit is contained in:
@@ -145,6 +145,8 @@ class BaseDataFacade
|
||||
|
||||
virtual std::string GetNameForID(const unsigned name_id) const = 0;
|
||||
|
||||
virtual std::string GetPronunciationForID(const unsigned name_id) const = 0;
|
||||
|
||||
virtual std::size_t GetCoreSize() const = 0;
|
||||
|
||||
virtual std::string GetTimestamp() const = 0;
|
||||
|
||||
@@ -591,6 +591,14 @@ class InternalDataFacade final : public BaseDataFacade
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string GetPronunciationForID(const unsigned name_id) const override final
|
||||
{
|
||||
// We store the pronounciation directly after the name of a street.
|
||||
// We do this to get around the street length limit of 255 which would hit
|
||||
// if we concatenate these.
|
||||
return GetNameForID(name_id + 1);
|
||||
}
|
||||
|
||||
virtual unsigned GetGeometryIndexForEdgeID(const unsigned id) const override final
|
||||
{
|
||||
return m_via_node_list.at(id);
|
||||
|
||||
@@ -660,6 +660,11 @@ class SharedDataFacade final : public BaseDataFacade
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string GetPronunciationForID(const unsigned name_id) const override final
|
||||
{
|
||||
return GetNameForID(name_id + 1);
|
||||
}
|
||||
|
||||
bool IsCoreNode(const NodeID id) const override final
|
||||
{
|
||||
if (m_is_core_node.size() > 0)
|
||||
|
||||
Reference in New Issue
Block a user