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

replaced domain for search requests

parent 2cb49619
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ class SearchController extends Controller
public function search($search)
{
$link = "https://tiles.metager.de/nominatim/search.php?q=" . urlencode($search) . "&limit=10&polygon_geojson=1&format=json&extratags=1&addressdetails=1&namedetails=1";
$link = "https://maps.metager.de/nominatim/search.php?q=" . urlencode($search) . "&limit=10&polygon_geojson=1&format=json&extratags=1&addressdetails=1&namedetails=1";
$searchResults = $this->makeSearch($link, $search, true);
return $searchResults;
}
......@@ -29,7 +29,7 @@ public function boundingBoxSearch(Request $request, $search, $latMin, $lonMin, $
# Eine Suche in den gesamten Kartendaten führen wir nur durch, wenn keine View-Spezifische Suche durchgeführt werden soll
if ($adjustView) {
# Wir werden zunächst eine Suche ohne das übergebene Gebiet als Begrenzung durchführen.
$link = "https://tiles.metager.de/nominatim/search.php?q=" . urlencode($search) . "&limit=$limit&polygon_geojson=1&format=json&dedupe=1&extratags=1&addressdetails=1&namedetails=1";
$link = "https://maps.metager.de/nominatim/search.php?q=" . urlencode($search) . "&limit=$limit&polygon_geojson=1&format=json&dedupe=1&extratags=1&addressdetails=1&namedetails=1";
$results = $this->makeSearch($link, $search, false);
$exactMatches = $this->getExactMatchesCount($search, $results);
}
......@@ -39,7 +39,7 @@ public function boundingBoxSearch(Request $request, $search, $latMin, $lonMin, $
if ($exactMatches >= 10) {
# Okay, das sind ganz schön viele Ergebnisse
# Es würde sich wohl lohnen die Suche doch auf das angegebene Gebiet zu begrenzen
$link = "https://tiles.metager.de/nominatim/search.php?q=" . urlencode($search) . "&limit=$limit&dedupe=1&bounded=1&polygon_geojson=1&viewbox=$latMin,$lonMin,$latMax,$lonMax&format=json&extratags=1&addressdetails=1&namedetails=1";
$link = "https://maps.metager.de/nominatim/search.php?q=" . urlencode($search) . "&limit=$limit&dedupe=1&bounded=1&polygon_geojson=1&viewbox=$latMin,$lonMin,$latMax,$lonMax&format=json&extratags=1&addressdetails=1&namedetails=1";
$tmpResults = $this->makeSearch($link, $search, false);
# Wenn In diesem Bereich Ergebnisse gefunden wurden, nehmen wir diese an Stelle der anderen:
if (sizeof($tmpResults) > 0) {
......
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