Skip to content

Commit

Permalink
Use already existed Annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
NV4RE committed Oct 6, 2020
1 parent 881d1b1 commit 1c5130e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
10 changes: 1 addition & 9 deletions table.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
package osrm

type TableAnnotation string

const (
TableAnnotationDuration TableAnnotation = "duration"
TableAnnotationDistance TableAnnotation = "distance"
TableAnnotationDurationDistance TableAnnotation = "duration,distance"
)

// TableRequest represents a request to the table method
type TableRequest struct {
Profile string
Coordinates Geometry
Sources, Destinations []int
Annotations TableAnnotation
Annotations Annotation
}

// TableResponse resresents a response from the table method
Expand Down
17 changes: 9 additions & 8 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,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
Expand Down

0 comments on commit 1c5130e

Please sign in to comment.