X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/fa7730d4af7c330d5443c6ae32f5ab73c48bf7a3..1ba3dbeac4c9cb7514ec07b11540960e0a1ccbc0:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index 48055ec6..5c99919c 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1271,6 +1271,12 @@ } } } + // If a coordinate is given, the search must either + // be for a name or a special search. Ignore everythin else. + else if ($aSearch['fLon'] && !sizeof($aSearch['aName']) && !sizeof($aSearch['aAddress']) && !$aSearch['sClass']) + { + $aPlaceIDs = array(); + } else { $aPlaceIDs = array(); @@ -1652,8 +1658,11 @@ $oPlaceLookup->setPolygonSimplificationThreshold($this->fPolygonSimplificationThreshold); $aOutlineResult = $oPlaceLookup->getOutlines($aResult['place_id'], $aResult['lon'], $aResult['lat'], $fDiameter/2); - $aResult = array_merge($aResult, $aOutlineResult); - + if ($aOutlineResult) + { + $aResult = array_merge($aResult, $aOutlineResult); + } + if ($aResult['extra_place'] == 'city') { $aResult['class'] = 'place';