diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d4a88b5b4cfad0a7974af8a2ec6ce5769c31abdc..4f9ecc72d30a8f3b7b06a42ac73fec90312563f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,8 @@ build_asset_images: - source .env - echo "COMPOSER_VERSION=$COMPOSER_VERSION" > .composerversion.env - echo "NODE_TAG=$NODE_TAG" >> .composerversion.env + rules: + - if: $CI_COMMIT_BRANCH == "master" artifacts: reports: dotenv: .composerversion.env @@ -59,6 +61,8 @@ composer_install: cache: paths: - app/.composer + rules: + - if: $CI_COMMIT_BRANCH == "master" npm_install: image: $IMAGE_NAME/node:$NODE_TAG # Node Tag variable was defined in build artifact dotenv from previous job @@ -76,6 +80,8 @@ npm_install: cache: paths: - app/.npm + rules: + - if: $CI_COMMIT_BRANCH == "master" build_images: image: $BUILD_DOCKER_IMAGE @@ -90,6 +96,8 @@ build_images: - docker compose push nginx fpm after_script: - docker logout $CI_REGISTRY + rules: + - if: $CI_COMMIT_BRANCH == "master" deploy: stage: deploy @@ -101,3 +109,5 @@ deploy: script: - kubectl -n $KUBE_NAMESPACE create secret generic $DEPLOYMENT_CHART_NAME --from-file=.env=$ENV_PRODUCTION --dry-run=client --save-config -o yaml | kubectl apply -f - - helm -n $KUBE_NAMESPACE upgrade --install $DEPLOYMENT_CHART_NAME maps/ -f $HELM_VALUES_FILE --set nginx.image.repository=$CI_REGISTRY_IMAGE/nginx --set secretName=$DEPLOYMENT_CHART_NAME --set nginx.image.tag=$IMAGE_TAG --set fpm.image.repository=$CI_REGISTRY_IMAGE/fpm --set fpm.image.tag=$IMAGE_TAG + rules: + - if: $CI_COMMIT_BRANCH == "master" diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000000000000000000000000000000000..c5fd7784e18d533c0e588bb2e0ae71c9823d257f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "PHP - Listen for XDebug", + "type": "php", + "request": "launch", + "port": 9003, + "pathMappings": { + "/html": "${workspaceRoot}/app" + } + } + ] +} diff --git a/app/.env.example b/app/.env.example index 192cca210480535bca027b2aed90c517aed9aa94..75469fc8c86873277fa4461d4a755f353fdd52c3 100644 --- a/app/.env.example +++ b/app/.env.example @@ -49,4 +49,5 @@ PUSHER_APP_CLUSTER=mt1 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" -NOMINATIM_HOST=https://nominatim.openstreetmap.org \ No newline at end of file +NOMINATIM_HOST=https://nominatim.openstreetmap.org +TILESERVER_HOST=http://tileserver.invalid \ No newline at end of file diff --git a/app/app/Http/Controllers/RoutingController.php b/app/app/Http/Controllers/RoutingController.php index 7d9e76c4e9e47374f624ea1afe50240b931093b8..b64f6b897833421c982e3ef2727d8e6c24bdd1fe 100644 --- a/app/app/Http/Controllers/RoutingController.php +++ b/app/app/Http/Controllers/RoutingController.php @@ -7,12 +7,10 @@ use Log; use Response; -class RoutingController extends Controller -{ - public function calcRoute(Request $request, $vehicle, $points) - { +class RoutingController extends Controller { + public function calcRoute(Request $request, $vehicle, $points) { $debug = false; - if ($request->has("debug")) { + if($request->has("debug")) { $debug = true; } return view('map') @@ -24,11 +22,10 @@ public function calcRoute(Request $request, $vehicle, $points) ->with('getPosition', 'true'); } - public function routingOverviewGeoJson($vehicle, $points) - { + public function routingOverviewGeoJson($vehicle, $points) { // This is the function to calculate the Route from $from to $to with the given vehicle $port = 0; - switch ($vehicle) { + switch($vehicle) { case "bicycle": $port = 5001; break; @@ -41,7 +38,7 @@ public function routingOverviewGeoJson($vehicle, $points) $url = "http://94.130.13.157:$port/route/v1/$vehicle/$points?steps=true&geometries=geojson"; $cacheHash = md5($url); - if (Cache::has($cacheHash)) { + if(Cache::has($cacheHash)) { $result = Cache::get($cacheHash); } else { $result = ""; @@ -63,7 +60,7 @@ public function routingOverviewGeoJson($vehicle, $points) // If there is no geometry we will return an empty geojson Object $geojson = "{coordinates: [],type: \"LineString\"}"; - if ($result["code"] === "Ok" && sizeof($result["routes"]) >= 1) { + if($result["code"] === "Ok" && sizeof($result["routes"]) >= 1) { $geojson = $result["routes"][0]["geometry"]; } @@ -76,56 +73,74 @@ public function routingOverviewGeoJson($vehicle, $points) return $response; } - public function routingGeoJson($vehicle, $points, $bearingStartPoint = "") - { + public function routingGeoJson($vehicle, $points, $bearingStartPoint = "") { // This is the function to calculate the Route from $from to $to with the given vehicle $port = 0; - switch ($vehicle) { + + switch($vehicle) { case "bicycle": - $port = 5001; - break; + $vehicle = "bike"; case "car": - $port = 5002; + case "foot": break; default: - $port = 5000; + abort(404); } - $url = "http://94.130.13.157:$port/route/v1/$vehicle/$points?steps=true&alternatives=true&geometries=geojson&overview=full&annotations=true"; + + $routing_host = config("maps.routingserver.host"); + + // Points are formatted for OSRM... we need to fix them + $points = explode(";", $points); + foreach($points as $index => $point) { + $point_values = explode(",", $point); + $points[$index] = $point_values[1].",".$point_values[0]; + } + unset($point_values, $point); + + $query = [ + "profile" => $vehicle, + "locale" => "de", + "calc_points" => "true", + "points_encoded" => "false", + "algorithm" => "alternative_route", + "alternative_route.max_paths" => 3, + ]; # Maybe we need to add Bearings: - if ($bearingStartPoint !== "") { - $bearing = $bearingStartPoint . ",90"; - # We got the starting Bearing submitted but we need to add bearings for the rest of the points, too - $remainingPoints = sizeof(explode(";", $points)) - 1; - for ($i = $remainingPoints; $i > 0; $i--) { - # For each remaining Point we are gonna add a bearing of 0 with a range of 180° - # Hopefully this will nullify the value - $bearing .= ";0,180"; - } - $url .= "&bearings=" . $bearing; + if($bearingStartPoint) { + $query["heading"] = $bearingStartPoint; } + $url = $routing_host."/route?".http_build_query($query); + + foreach($points as $point) { + $url .= "&point=".$point; + } + + $cacheHash = md5($url); - if (Cache::has($cacheHash)) { + $status = 0; + $result = ""; + if(Cache::has($cacheHash) && 1 == 0) { $result = Cache::get($cacheHash); + $status = 200; } else { - $result = ""; try { - $result = file_get_contents($url); - $result = base64_encode($result); - Cache::put($cacheHash, $result, now()->addMinutes(60)); + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $result = curl_exec($ch); + $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); + if($status === 200) { + Cache::put($cacheHash, $result, now()->addMinutes(60)); + } } catch (\ErrorException $e) { Log::error("Konnte den Routing Server nicht erreichen"); } } - $result = base64_decode($result); - - $result = json_decode($result, true); - if ($result["code"] === "Ok") { - $result = json_encode($result); - $response = Response::make($result, 200); + if($status == 200) { + $response = Response::make($result, $status); $response->header('Content-Type', 'application/json'); return $response; @@ -136,11 +151,10 @@ public function routingGeoJson($vehicle, $points, $bearingStartPoint = "") } - public function match($vehicle, $points, $timestamp, $radiuses) - { + public function match($vehicle, $points, $timestamp, $radiuses) { // This is the function to calculate the Route from $from to $to with the given vehicle $port = 0; - switch ($vehicle) { + switch($vehicle) { case "bicycle": $port = 5001; break; @@ -150,7 +164,7 @@ public function match($vehicle, $points, $timestamp, $radiuses) default: $port = 5000; } - $url = 'http://94.130.13.157:' . $port . '/match/v1/' . $vehicle . '/' . $points . '?steps=true&geometries=geojson×tamps=' . $timestamp . '&radiuses=' . $radiuses; + $url = 'http://94.130.13.157:'.$port.'/match/v1/'.$vehicle.'/'.$points.'?steps=true&geometries=geojson×tamps='.$timestamp.'&radiuses='.$radiuses; // make request $ch = curl_init(); diff --git a/app/config/maps.php b/app/config/maps.php index 920e73f0bd10e7cfde79cf780eb98fe8de4d9bca..3d48aa96a1a653f0a9c6d07a025276b8a803ced8 100644 --- a/app/config/maps.php +++ b/app/config/maps.php @@ -1,10 +1,13 @@ <?php return [ - "nominatim" => [ + "nominatim" => [ "host" => env("NOMINATIM_HOST", ""), ], - "tileserver" => [ + "tileserver" => [ "host" => env("TILESERVER_HOST", ""), ], + "routingserver" => [ + "host" => env("ROUTINGSERVER_HOST", ""), + ], ]; \ No newline at end of file diff --git a/app/public/mix-manifest.json b/app/public/mix-manifest.json index 5e06f688d9e3b007d7ff06fa34f803a39b416bf9..f014b4fa1e85c6a2034530c41600ce9dbb392a07 100644 --- a/app/public/mix-manifest.json +++ b/app/public/mix-manifest.json @@ -2,7 +2,7 @@ "/js/modules.js": "/js/modules.js?id=6e01750e4a5262f0aa6b58c1102448f2", "/resources/css/offline-module.css": "/resources/css/offline-module.css?id=9de68a717293298cc813e57caf5dc970", "/js/lib.js": "/js/lib.js?id=5e13e04914a8734ddea7a01a64d8a3ba", - "/js/map.js": "/js/map.js?id=d21a6fab1a8538dce3785463f20342cb", + "/js/map.js": "/js/map.js?id=02031119bc65d3e8328f934b2d9f9a12", "/js/turf.min.js": "/js/turf.min.js?id=859561c2951cc6bd635ac2b0e8813256", "/css/staticPages.css": "/css/staticPages.css?id=74737c858d58797108ca9ac733c7fa59", "/css/general.css": "/css/general.css?id=787dbb34eea9bbfaa241777238c92e72", diff --git a/app/resources/css/routing.css b/app/resources/css/routing.css index 45baf4193d264ae8e06a810469bc657b6803d261..53125166c34aabc65da4dac1a8f9a232641ff5d0 100644 --- a/app/resources/css/routing.css +++ b/app/resources/css/routing.css @@ -13,10 +13,16 @@ #route-finder-addon #waypoint-list-container div.wait-for-search { color: white; } +.route-description .collapse > ul { + display: grid; + gap: .5rem; +} + .route-description .collapse > ul > li { display: flex; - align-items: flex-end; - padding: 10px 0 5px 0; + align-items: center; + border-bottom: 1px dotted #e7e7e7; + padding-right: .25rem; } .route-description .collapse > ul > li > div.step-image { @@ -26,8 +32,6 @@ .route-description .collapse > ul > li > div.step-image { .route-description .collapse > ul > li > div.step-string { flex-shrink: 1; flex-grow: 1; - border-bottom: 1px dotted #e7e7e7; - padding-bottom: 5px; } .route-description .collapse > ul > li > div.step-length { diff --git a/app/resources/js/Leg.js b/app/resources/js/Leg.js index 6c92b1f82e5fc984fd448710f8e40c9a0a1ae08c..a59a0a4affd0601185ce84ef31655bd9480d5fb8 100644 --- a/app/resources/js/Leg.js +++ b/app/resources/js/Leg.js @@ -1,20 +1,17 @@ -function Leg(legJson, route, legIndex, legSize){ +function Leg(legJson, route){ this.route = route; this.json = legJson; this.hash = md5(JSON.stringify(this.json)); this.steps = []; var caller = this; - $.each(this.json.steps, function(index, value){ - var nextStreet = undefined; - if(caller.json.steps.length > (index+1) && caller.json.steps[index+1].name !== undefined) - nextStreet = caller.json.steps[index+1].name; - caller.steps.push(new Step(value, nextStreet, legIndex, legSize)); + $.each(this.json.instructions, function(index, value){ + caller.steps.push(new Step(value)); }); } Leg.prototype.getDuration = function(){ // Returns the approximate duration left for this Leg - var duration = this.json.duration; + var duration = this.json.time; return duration; } @@ -40,18 +37,22 @@ Leg.prototype.shiftStep = function(){ } Leg.prototype.generateRouteDescriptionHtml = function(){ - var summary = this.json.summary; - summary = summary.replace(",", " , "); - sumamry = summary.replace(/\s+/, " "); - summary = summary.replace(",", "und"); + var summary = ""; + if(this.json.description){ + this.json.description.forEach(description => { + summary += description + " und"; + }); + summary = "über " + summary.replace(/und$/, ""); + } + var result = $('\ <button class="btn btn-primary leg-description-toggle" type="button" data-toggle="collapse" data-target="#' + this.hash + '" aria-expanded="false" aria-controls="collapseExample">\ <div class="summary">\ - über ' + summary + '\ + ' + summary + '\ </div>\ <div class="information">\ <div class="dur">\ - ' + this.route.durationString(this.json.duration) + '\ + ' + this.route.durationString(this.json.time) + '\ </div>\ <div class="dist">\ ' + this.route.distanceString(this.json.distance) + '\ diff --git a/app/resources/js/Route.js b/app/resources/js/Route.js index e277276305e41f0c1224f1d06d7a2239fdcb9bdb..d736c0bc7bd96b2b17c9dc958f7fdb2d5df0b66b 100644 --- a/app/resources/js/Route.js +++ b/app/resources/js/Route.js @@ -16,26 +16,15 @@ function Route(waypoints, vehicle, interactiveMap, callback, route) { Route.prototype.switchActiveRoute = function(index) { this.route.activeRoute = index; - this.legs = this.extractLegs(); + this.leg = this.extractLeg(); }; -Route.prototype.extractLegs = function() { - var result = []; +Route.prototype.extractLeg = function() { var caller = this; - $.each(this.route.routes[this.route.activeRoute].legs, function( - index, - value - ) { - result.push( - new Leg( - value, - caller, - index, - caller.route.routes[caller.route.activeRoute].legs.length - ) - ); - }); - return result; + return new Leg( + this.route.paths[this.route.activeRoute], + caller + ) }; Route.prototype.addVehicleChangedEvent = function() { @@ -152,7 +141,7 @@ Route.prototype.calculateRoute = function() { this.updateRouteInformation(); this.updateMapExtent(); // Save the legs - this.legs = this.extractLegs(); + this.leg = this.extractLeg(); if (typeof this.callback === "function") { this.callback(); } @@ -234,13 +223,13 @@ Route.prototype.updateMapExtent = function(initPadding) { }; Route.prototype.updateRouteInformation = function() { - var length = this.route.routes[this.route.activeRoute].distance; + var length = this.route.paths[this.route.activeRoute].distance; var distanceString = this.distanceString(length); $( "#route-finder-addon #waypoint-list-container .route-information .length" ).html(distanceString); - var duration = this.route.routes[this.route.activeRoute].duration; + var duration = this.route.paths[this.route.activeRoute].time; var durationString = this.durationString(duration); $( "#route-finder-addon #waypoint-list-container .route-information .duration" @@ -281,7 +270,7 @@ Route.prototype.distanceString = function(length) { }; Route.prototype.durationString = function(duration) { - duration = Math.abs(duration); + duration = Math.abs(duration / 1000); duration = Math.floor(duration); var result = ""; if (duration >= 3600) { @@ -318,19 +307,19 @@ Route.prototype.printRoute = function() { } // Geometry of the active route - this.geom = this.route.routes[this.route.activeRoute].geometry; + this.geom = this.route.paths[this.route.activeRoute].points; // Let's print alternative routes, first - if (this.route.routes.length > 1) { + if (this.route.paths.length > 1) { var altRouteColor = "#797979"; var altRouteHoverColor = "#FF0000"; - for (var i = 0; i < this.route.routes.length; i++) { + for (var i = 0; i < this.route.paths.length; i++) { if ( i == this.route.activeRoute || - (typeof this.route.routes[i]["available"] == "boolean" && - !this.route.routes[i]["available"]) + (typeof this.route.paths[i]["available"] == "boolean" && + !this.route.paths[i]["available"]) ) continue; - var altgeojson = this.route.routes[i].geometry; + var altgeojson = this.route.paths[i].points; this.interactiveMap.map.addLayer( { id: "alt-route-" + i, @@ -356,12 +345,16 @@ Route.prototype.printRoute = function() { // would need to drive // The most complicated part about that is to calculate the correct position for this information var pos = this.calculateAlternativeRoutePopupPosition( - this.route.routes[i] + this.route.paths[i] ); var time = - this.route.routes[i].duration - - this.route.routes[this.route.activeRoute].duration; + this.route.paths[i].time - + this.route.paths[this.route.activeRoute].time; var timeString = this.durationString(time); + let descriptionString = ""; + if(this.route.paths[i].description){ + descriptionString = this.route.paths[i].description[0]; + } var popup = $( '\ <div id="popup-alt-route-' + @@ -376,7 +369,7 @@ Route.prototype.printRoute = function() { (time > 0 ? "+" : "-") + timeString + "</font> <br /> <nobr>" + - this.route.routes[i].legs[0].summary + + descriptionString + "</nobr>\ </div>\ </div>" @@ -396,7 +389,7 @@ Route.prototype.printRoute = function() { var tmpI = $($(this)[0]._content) .find(".alternative-route") .attr("data-index"); - caller.route.routes[tmpI]["available"] = false; + caller.route.paths[tmpI]["available"] = false; caller.printRoute(); }; } @@ -466,22 +459,19 @@ Route.prototype.printRoute = function() { Route.prototype.calculateAlternativeRoutePopupPosition = function( alternativeRoute ) { - var parts = []; - var tmpLineString = undefined; - // We will use copies of the array because we will delete a whole ton of waypoints from it. // Because that will significantly speed up our process - var ar1 = alternativeRoute.geometry.coordinates.slice(); + var ar1 = alternativeRoute.points.coordinates.slice(); var caller = this; var pos = []; $.each(ar1, function(index, value) { if ( value[0] !== - caller.route.routes[caller.route.activeRoute].geometry.coordinates[ + caller.route.paths[caller.route.activeRoute].points.coordinates[ index ][0] || value[1] !== - caller.route.routes[caller.route.activeRoute].geometry.coordinates[ + caller.route.paths[caller.route.activeRoute].points.coordinates[ index ][1] ) { @@ -530,7 +520,7 @@ Route.prototype.deleteRoute = function() { * The first Step that Matches the current Gps Location enough to be sure that the user is at that step will be returned. */ Route.prototype.calcPointOnRoute = function() { - var r = this.route.routes[this.route.activeRoute]; + var r = this.route.paths[this.route.activeRoute]; // Wir Ziehen einen Punkt auf den nächsten 4 Schritten in betracht // Wenn der Punkt dort nicht zu finden ist, müssen wir neu berechnen var stepCounter = 1; @@ -606,7 +596,7 @@ Route.prototype.removeLeg = function() { // Remove The first Leg of the route if (this.legs.length <= 0) return; this.legs.shift(); - var route = this.route.routes[this.route.activeRoute]; + var route = this.route.paths[this.route.activeRoute]; while (route.legs[0].stepslength > 0) { this.shiftStep(); } @@ -633,8 +623,8 @@ Route.prototype.shiftStep = function() { if (this.legs.length == 0) return; this.legs[0].steps.shift(); - var route = this.route.routes[this.route.activeRoute]; - var leg = this.route.routes[this.route.activeRoute].legs[0]; + var route = this.route.paths[this.route.activeRoute]; + var leg = this.route.paths[this.route.activeRoute].legs[0]; if (leg.steps.length == 0) return; var step = leg.steps.shift(); @@ -660,8 +650,8 @@ Route.prototype.shiftStep = function() { Route.prototype.shiftStepStep = function() { // This Function will remove only the First Coordinate from the current step if there is a minimum of 3 left - var route = this.route.routes[this.route.activeRoute]; - var leg = this.route.routes[this.route.activeRoute].legs[0]; + var route = this.route.paths[this.route.activeRoute]; + var leg = this.route.paths[this.route.activeRoute].legs[0]; var step = leg.steps[0]; if (step.geometry.coordinates.length > 2) { // Update the step itself @@ -684,13 +674,13 @@ Route.prototype.shiftStepStep = function() { }; Route.prototype.getFirstPoint = function() { - var point = this.route.routes[this.route.activeRoute].legs[0].steps[0] + var point = this.route.paths[this.route.activeRoute].legs[0].steps[0] .geometry.coordinates[0]; return point; }; Route.prototype.getNextPoint = function() { - var point = this.route.routes[this.route.activeRoute].legs[0].steps[0] + var point = this.route.paths[this.route.activeRoute].legs[0].steps[0] .geometry.coordinates[1]; return point; }; diff --git a/app/resources/js/RouteFinder.js b/app/resources/js/RouteFinder.js index 2c8a8050ad45f3b38530ab650e8e331f8895d7db..238e7ffe5a8216f58ec38b0205c37f093e71667f 100644 --- a/app/resources/js/RouteFinder.js +++ b/app/resources/js/RouteFinder.js @@ -374,17 +374,12 @@ RouteFinder.prototype.addLegDescriptions = function () { var waypoints = $("#waypoint-list > li"); var caller = this; $.each(waypoints, function (index, value) { - if ( - caller.route.route.routes[caller.route.route.activeRoute].legs.length - - 1 >= - index - ) { - var leg = caller.route.legs[index]; + var leg = caller.route.leg; var legHtml = leg.generateRouteDescriptionHtml(); var descrHtml = $('<li class="route-description"></li>'); $(descrHtml).append(legHtml); $(value).after(descrHtml); - } + return false; }); this.updateMobilesWindow(); this.adjustMapView(); diff --git a/app/resources/js/Step.js b/app/resources/js/Step.js index 3b642a66883442061128f45949402c9614cb59c1..4bf550c0074a53fab5af6b93dcc85c765773dbe9 100644 --- a/app/resources/js/Step.js +++ b/app/resources/js/Step.js @@ -1,7 +1,6 @@ -function Step(stepJson, nextStreet, legIndex, legSize){ +function Step(stepJson){ this.json = stepJson; - this.nextStreet = nextStreet; - this.instruction = osrmTextInstructions.compile('de', stepJson, {"legCount": legSize, "legIndex": legIndex}); + this.instruction = stepJson.text; } @@ -12,55 +11,31 @@ Step.prototype.toString = function(){ Step.prototype.parseImg = function() { var step = this.json; - switch (step["maneuver"]["type"]) { - case "depart": - case "new name": + switch (step.sign) { + case 0: return "/img/straight.png"; - case "roundabout turn": - case "continue": - case "end of road": - case "turn": - switch (step["maneuver"]["modifier"]) { - case "left": - return "/img/turn-left.png"; - case "sharp left": - return "/img/turn-sharp-left.png"; - case "right": - return "/img/turn-right.png"; - case "sharp right": - return "/img/turn-sharp-right.png"; - case "uturn": - return "/img/uturn.png"; - case "slight right": - return "/img/fork-slight-right.png"; - case "slight left": - return "/img/fork-slight-left.png"; - case "straight": - return "/img/straight.png"; - default: - } - break; - case "roundabout": - case "rotary": + case -1: + return "/img/fork-slight-left.png"; + case -2: + return "/img/turn-left.png"; + case -3: + return "/img/turn-sharp-left.png"; + case -7: + return "/img/fork-slight-left.png"; + case -8: + return "/img/uturn.png"; + case 1: + return "/img/fork-slight-right.png"; + case 2: + return "/img/turn-right.png"; + case 3: + return "/img/turn-sharp-right.png"; + case 7: + return "/img/fork-slight-right.png"; + case 8: + return "/img/uturn.png"; + case 6: return "/img/roundabout.png"; - case "on ramp": - return "/img/auffahren.png"; - case "merge": - case "off ramp": - case "fork": - switch (step["maneuver"]["modifier"]) { - case "left": - return "/img/fork-left.png"; - case "right": - return "/img/fork-right.png"; - case "slight right": - return "/img/fork-slight-right.png"; - case "slight left": - return "/img/fork-slight-left.png"; - case "straight": - return "/img/straight.png"; - default: - } default: } return ""; diff --git a/build/fpm/configuration/development/xdebug.ini b/build/fpm/configuration/development/xdebug.ini index a2f99427f3ed085c05ecddd6e47e644497cd6011..edc9a8282355d51e7ac9b93f8cd6af26df267d6f 100644 --- a/build/fpm/configuration/development/xdebug.ini +++ b/build/fpm/configuration/development/xdebug.ini @@ -1,4 +1,8 @@ zend_extension=xdebug.so +xdebug.mode = debug +xdebug.log_level = 0 +xdebug.start_with_request = yes +xdebug.client_host = host.docker.internal xdebug.remote_enable = 1 xdebug.remote_autostart = 1 xdebug.remote_connect_back = 1 diff --git a/docker-compose.yml b/docker-compose.yml index e894def0385d38cbcc8ae6c13e86fe91ad79ce59..3dec2608b05989424ccf5ee426c02185e25ebc2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,6 +33,8 @@ services: volumes: - ./app:/html - bootstrap-cache:/html/bootstrap/cache + extra_hosts: + - "host.docker.internal:host-gateway" assets: restart: unless-stopped image: ${IMAGE_NAME}/node:${NODE_TAG}