Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2022-02-24 11:35:33 +00:00
parent 664e8e8299
commit 1251b49828
29 changed files with 1462 additions and 1462 deletions

View File

@@ -4,6 +4,41 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/routing/api](h
Endpoints:
## Directions
Turn by turn directions from a start point to an end point including maneuvers and bearings
[https://m3o.com/routing/api#Directions](https://m3o.com/routing/api#Directions)
```go
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)
}
```
## Route
Retrieve a route as a simple list of gps points along with total distance and estimated duration
@@ -74,38 +109,3 @@ Origin: &routing.Point{
}
```
## Directions
Turn by turn directions from a start point to an end point including maneuvers and bearings
[https://m3o.com/routing/api#Directions](https://m3o.com/routing/api#Directions)
```go
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)
}
```