diff --git a/app/Http/Controllers/RoutingController.php b/app/Http/Controllers/RoutingController.php index 588e2060457fa014ac9ba2b0fd79e1e623109cd0..af5238613871b8b61d3ba191c22706f8b7051189 100644 --- a/app/Http/Controllers/RoutingController.php +++ b/app/Http/Controllers/RoutingController.php @@ -39,6 +39,9 @@ public function routingOverviewGeoJson($vehicle, $points) $port = 5000; } $url = "http://maps.metager.de:$port/route/v1/$vehicle/$points?steps=true&geometries=geojson"; + if($port == 5002){ + $url = "http://94.130.163.243:$port/route/v1/$vehicle/$points?steps=true&geometries=geojson"; + } $cacheHash = md5($url); if (Cache::has($cacheHash)) { $result = Cache::get($cacheHash); @@ -90,6 +93,9 @@ public function routingGeoJson($vehicle, $points, $bearingStartPoint = "") $port = 5000; } $url = "http://maps.metager.de:$port/route/v1/$vehicle/$points?steps=true&alternatives=true&geometries=geojson&overview=full&annotations=true"; + if($port == 5002){ + $url = "http://94.130.163.243:$port/route/v1/$vehicle/$points?steps=true&alternatives=true&geometries=geojson&overview=full&annotations=true"; + } # Maybe we need to add Bearings: if ($bearingStartPoint !== "") { @@ -150,7 +156,9 @@ public function match($vehicle, $points, $timestamp, $radiuses) $port = 5000; } $url = 'http://maps.metager.de:' . $port . '/match/v1/' . $vehicle . '/' . $points . '?steps=true&geometries=geojson×tamps=' . $timestamp . '&radiuses=' . $radiuses; - + if($port == 5002){ + $url = "http://94.130.163.243" . $port . '/match/v1/' . $vehicle . '/' . $points . '?steps=true&geometries=geojson×tamps=' . $timestamp . '&radiuses=' . $radiuses; + } // make request $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url);