mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
25 lines
525 B
Go
Executable File
25 lines
525 B
Go
Executable File
package example
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/routing"
|
|
)
|
|
|
|
// Turn by turn directions from a start point to an end point including maneuvers and bearings
|
|
func TurnByTurnDirections() {
|
|
routingService := routing.NewRoutingService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := routingService.Directions(&routing.DirectionsRequest{
|
|
Destination: &routing.Point{
|
|
Latitude: 52.529407,
|
|
Longitude: 13.397634,
|
|
},
|
|
Origin: &routing.Point{
|
|
Latitude: 52.517037,
|
|
Longitude: 13.38886,
|
|
},
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|