Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Direction ¶
type Direction struct { // distance to travel in meters Distance float64 `json:"distance"` // duration to travel in seconds Duration float64 `json:"duration"` // human readable instruction Instruction string `json:"instruction"` // intersections on route Intersections []Intersection `json:"intersections"` // maneuver to take Maneuver *Maneuver `json:"maneuver"` // street name or location Name string `json:"name"` // alternative reference Reference string `json:"reference"` }
type DirectionsRequest ¶
type DirectionsResponse ¶
type DirectionsResponse struct { // Turn by turn directions Directions []Direction `json:"directions"` // Estimated distance of the route in meters Distance float64 `json:"distance"` // Estimated duration of the route in seconds Duration float64 `json:"duration"` // The waypoints on the route Waypoints []Waypoint `json:"waypoints"` }
type EtaRequest ¶
type EtaRequest struct { // The end point for the eta calculation Destination *Point `json:"destination"` // The starting point for the eta calculation Origin *Point `json:"origin"` // speed in kilometers Speed float64 `json:"speed"` // type of transport. Only "car" is supported currently. Type string `json:"type"` }
type EtaResponse ¶
type EtaResponse struct { // eta in seconds Duration float64 `json:"duration"` }
type Intersection ¶
type RouteRequest ¶
type RouteResponse ¶
type RoutingService ¶
type RoutingService struct {
// contains filtered or unexported fields
}
func NewRoutingService ¶
func NewRoutingService(token string) *RoutingService
func (*RoutingService) Directions ¶
func (t *RoutingService) Directions(request *DirectionsRequest) (*DirectionsResponse, error)
Turn by turn directions from a start point to an end point including maneuvers and bearings
func (*RoutingService) Eta ¶
func (t *RoutingService) Eta(request *EtaRequest) (*EtaResponse, error)
Get the eta for a route from origin to destination. The eta is an estimated time based on car routes
func (*RoutingService) Route ¶
func (t *RoutingService) Route(request *RouteRequest) (*RouteResponse, error)
Retrieve a route as a simple list of gps points along with total distance and estimated duration
Click to show internal directories.
Click to hide internal directories.