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

Link zur Detailseite für jedes Ergebnis eingefügt

parent 36669c83
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ public function boundingBoxSearch($search, $latMin, $lonMin, $latMax, $lonMax, $ ...@@ -37,6 +37,7 @@ public function boundingBoxSearch($search, $latMin, $lonMin, $latMax, $lonMax, $
$tmp["boundingbox"] = $result["boundingbox"]; $tmp["boundingbox"] = $result["boundingbox"];
$tmp["geojson"] = $result["geojson"]; $tmp["geojson"] = $result["geojson"];
$tmp["huerotate"] = hexdec(substr(md5(serialize($result)), 0, 5)) % 360; $tmp["huerotate"] = hexdec(substr(md5(serialize($result)), 0, 5)) % 360;
$tmp["place_id"] = $result["place_id"];
$searchResults[] = $tmp; $searchResults[] = $tmp;
} }
......
...@@ -55,7 +55,7 @@ $.each(searchResults, function(index, value) { ...@@ -55,7 +55,7 @@ $.each(searchResults, function(index, value) {
opening_hours = opening_hours.replace(/;/g, ",<br />"); opening_hours = opening_hours.replace(/;/g, ",<br />");
population = typeof value["extratags"]["population"] !== 'undefined' ? " (" + numberWithPoints(value["extratags"]["population"]) + " Einwohner)" : ""; population = typeof value["extratags"]["population"] !== 'undefined' ? " (" + numberWithPoints(value["extratags"]["population"]) + " Einwohner)" : "";
} }
var res = $("<div class=\"result col-xs-12\" id=\"result-"+index+"\"><div class=\"col-xs-2\"><span class=\"marker\" style=\"filter: hue-rotate("+value["huerotate"]+"deg);\">"+index+"</span></div>" + "<div class=\"col-xs-10\"><p class=\"title\">" + value["title"] + "</p>" + "<p class=\"type\">" + type + population + "</p>" + "<p class=\"address\">" + road + " " + house_number + "</p><p class=\"city\">" + city + "</p>" + "<p class=\"opening-hours\">" + opening_hours + "</p>" + "<p class=\"tags\">" + "</p></div></div>"); var res = $("<div class=\"result col-xs-12\" id=\"result-"+index+"\"><div class=\"col-xs-2\"><span class=\"marker\" style=\"filter: hue-rotate("+value["huerotate"]+"deg);\">"+index+"</span></div>" + "<div class=\"col-xs-10\"><p class=\"title\">" + value["title"] + "</p>" + "<p class=\"type\">" + type + population + "</p>" + "<p class=\"address\">" + road + " " + house_number + "</p><p class=\"city\">" + city + "</p>" + "<p class=\"opening-hours\">" + opening_hours + "</p>" + "<p class=\"tags\">" + "</p><a href=\"https://maps.metager.de/nominatim/details.php?place_id="+value["place_id"]+"\" target=\"_blank\" class=\"btn btn-default btn-xs\">Details</a></div></div>");
var resPopup = $("<div class=\"result col-xs-12\"> " + "<p class=\"title\">" + value["title"] + "</p>" + "<p class=\"type\">" + type + population + "</p>" + "<p class=\"address\">" + road + " " + house_number + "</p><p class=\"city\">" + city + "</p>" + "<p class=\"opening-hours\">" + opening_hours + "</p>" + "<p class=\"tags\">" + "</p>" + "</div>"); var resPopup = $("<div class=\"result col-xs-12\"> " + "<p class=\"title\">" + value["title"] + "</p>" + "<p class=\"type\">" + type + population + "</p>" + "<p class=\"address\">" + road + " " + house_number + "</p><p class=\"city\">" + city + "</p>" + "<p class=\"opening-hours\">" + opening_hours + "</p>" + "<p class=\"tags\">" + "</p>" + "</div>");
$("#results").append(res); $("#results").append(res);
el.click(function(evt){ el.click(function(evt){
......
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