Skip to content
Snippets Groups Projects
Commit b9d46422 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Testweise Autoroute für Europa aktiviert.

parent b6e1dc23
No related branches found
No related tags found
No related merge requests found
......@@ -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&timestamps=' . $timestamp . '&radiuses=' . $radiuses;
if($port == 5002){
$url = "http://94.130.163.243" . $port . '/match/v1/' . $vehicle . '/' . $points . '?steps=true&geometries=geojson&timestamps=' . $timestamp . '&radiuses=' . $radiuses;
}
// make request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment