mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-18 21:55:08 +00:00
set routing.mode to routing.provider
This commit is contained in:
@@ -14,6 +14,6 @@ The routing service provides point to point directions
|
|||||||
|
|
||||||
The following config must be set
|
The following config must be set
|
||||||
|
|
||||||
- **routing.mode**: "google" or "osrm"
|
- **routing.provider**: "google" or "osrm"
|
||||||
- **routing.address"**: location of osrm api if used
|
- **routing.address"**: location of osrm api if used
|
||||||
- **google.apikey**: google maps api key if using google
|
- **google.apikey**: google maps api key if using google
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ func main() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// decide whether to use google or osrm
|
// decide whether to use google or osrm
|
||||||
c, err := config.Get("routing.mode")
|
c, err := config.Get("routing.provider")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Fatalf("Error loading config: %v", err)
|
logger.Fatalf("Error loading config: %v", err)
|
||||||
}
|
}
|
||||||
// defaults to google
|
// defaults to google
|
||||||
mode := c.String("google")
|
mode := c.String("")
|
||||||
|
|
||||||
switch mode {
|
switch mode {
|
||||||
case "google":
|
case "google":
|
||||||
|
|||||||
Reference in New Issue
Block a user