-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialize ref field #67
Comments
Road struct that bundles the name & designation gets my vote 😄 |
The struct will need to be implemented in Objective-C, so it'll bridge to Swift. If we implement it in Swift, it won't bridge to Objective-C. |
Here are two options for the implementation:
We should avoid the term “ref”, because that’s OpenStreetMap jargon (really just an OSM tag name). A better term is “road designation”. Based on #77 (comment), we’ll also need to trim the parenthesized designation from the |
I'm for this. This allows the developer to decide if and when to use a |
Both options let the developer decide if and when to use a |
To avoid a proliferation of properties on RouteStep, we’re definitely going to need a |
Hey! I came across this discussion, because "road designation" sounds like the exact property I need. Looking throught the source code, this now seems to be "code" and it isn't what I imagined. How could I acess road types pls? "Cycling path" "residential" etc. I can see them mentioned in other projects :) Can't find documentation yet. Any way to access it? The obvious .type on step is not working. Thanks |
“Road designation” (now |
Once Project-OSRM/osrm-backend#2857 makes it into production and the Directions API exposes a separate ref field for each step, we'll need to add a route reference property to each RouteStep, similar to the one for destinations. Assuming that v4 doesn't add this separate field, we'll fall back to a regular expression that parses the ref out of the way name.
Better yet, we could implement a Road struct that bundles a road's name with its route designation. Eventually that struct could grow to include other information about the road, such as its classification.
/cc @bsudekum
The text was updated successfully, but these errors were encountered: