Replies: 3 comments
-
Prounuciation data must exist on the original OSM data in the https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/lib/way_handlers.lua#L35 |
Beta Was this translation helpful? Give feedback.
-
Are you saying that if the OSM data carries Prounuciation, the Prounuciation field will be displayed in the API response json? |
Beta Was this translation helpful? Give feedback.
-
That is the intent, yes. There are tests for this behaviour here: osrm-backend/features/car/names.feature Lines 8 to 25 in 31e31a6 |
Beta Was this translation helpful? Give feedback.
-
src/engine/api/json_factory.cpp
util::json::Object makeRouteStep(guidance::RouteStep step, util::json::Value geometry)
{
util::json::Object route_step;
route_step.values["distance"] = std::round(step.distance * 10) / 10.;
route_step.values["duration"] = step.duration;
route_step.values["weight"] = step.weight;
route_step.values["name"] = std::move(step.name);
if (!step.ref.empty())
route_step.values["ref"] = std::move(step.ref);
if (!step.pronunciation.empty())
route_step.values["pronunciation"] = std::move(step.pronunciation);
if (!step.destinations.empty())
route_step.values["destinations"] = std::move(step.destinations);
if (!step.exits.empty())
route_step.values["exits"] = std::move(step.exits);
if (!step.rotary_name.empty())
{
route_step.values["rotary_name"] = std::move(step.rotary_name);
if (!step.rotary_pronunciation.empty())
{
route_step.values["rotary_pronunciation"] = std::move(step.rotary_pronunciation);
}
}
}
The pronunciation field is implemented, but there is no pronunciation field in the json string returned by the http api. Why is this?
Beta Was this translation helpful? Give feedback.
All reactions