-
Notifications
You must be signed in to change notification settings - Fork 24
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
iOS/Apple Annotations for entire Route #320
Comments
Hi @Archdoog I beileve this can be easly added as a computed properity this way: extension Route {
public var annotations: [ValhallaOsrmAnnotation] {
let decoder = JSONDecoder()
return steps
.compactMap(\.annotations)
.flatMap { annotations in
annotations.compactMap { annotationString in
guard let data = annotationString.data(using: .utf8) else {
return nil
}
return try? decoder.decode(ValhallaOsrmAnnotation.self, from: data)
}
}
}
} what do you think? |
@engali94 Here are some thoughts I have on full route annotations, including congestion (versus current annotation at the user's location as published for iOS in #287):
Side conversation:This may actually be a good exercise into whether it's a good idea that we hold the route inside navigation state. I wonder if might be better served as a standalone |
Add functionality to apply or publish annotation data for the entire Route. The existing iOS annotation publisher just publishes the current annotations. This would add the ability for the annotation publishing & publisher to add congestion data long the entire route (or route steps).
This could be used for things like congestion/traffic.
The text was updated successfully, but these errors were encountered: