diff --git a/table.go b/table.go index a539131..f8f4779 100644 --- a/table.go +++ b/table.go @@ -5,6 +5,7 @@ type TableRequest struct { Profile string Coordinates Geometry Sources, Destinations []int + Annotations Annotations } // TableResponse resresents a response from the table method @@ -21,6 +22,9 @@ func (r TableRequest) request() *request { if len(r.Destinations) > 0 { opts.addInt("destinations", r.Destinations...) } + if r.Annotations != "" { + opts.add("annotations", string(r.Annotations)) + } return &request{ profile: r.Profile, diff --git a/types.go b/types.go index d59d6c1..c698b04 100644 --- a/types.go +++ b/types.go @@ -61,14 +61,15 @@ type Annotations string // Supported annotations param values const ( - AnnotationsTrue Annotations = "true" - AnnotationsFalse Annotations = "false" - AnnotationsNodes Annotations = "nodes" - AnnotationsDistance Annotations = "distance" - AnnotationsDuration Annotations = "duration" - AnnotationsDatasources Annotations = "datasources" - AnnotationsWeight Annotations = "weight" - AnnotationsSpeed Annotations = "speed" + AnnotationsTrue Annotations = "true" + AnnotationsFalse Annotations = "false" + AnnotationsNodes Annotations = "nodes" + AnnotationsDistance Annotations = "distance" + AnnotationsDuration Annotations = "duration" + AnnotationDurationDistance Annotations = "duration,distance" + AnnotationsDatasources Annotations = "datasources" + AnnotationsWeight Annotations = "weight" + AnnotationsSpeed Annotations = "speed" ) // String returns Annotations as a string