X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f42e40712e1a20d9e6ca1e497123a0c16c83be82..6c6560ca53b7fe270eeb5069664e8eb5f078d658:/website/details.php?ds=inline diff --git a/website/details.php b/website/details.php index 44d4956b..39fa0afa 100644 --- a/website/details.php +++ b/website/details.php @@ -44,6 +44,16 @@ if ($sOsmType && $iOsmId > 0) { $sSQL .= ' ORDER BY class ASC'; $sPlaceId = $oDB->getOne($sSQL, array(':type' => $sOsmType, ':id' => $iOsmId)); + + // Nothing? Maybe it's an interpolation. + // XXX Simply returns the first parent street it finds. It should + // get a house number and get the right interpolation. + if (!$sPlaceId && $sOsmType == 'W' && (!$sClass || $sClass == 'place')) { + $sSQL = 'SELECT place_id FROM location_property_osmline' + .' WHERE osm_id = :id LIMIT 1'; + $sPlaceId = $oDB->getOne($sSQL, array(':id' => $iOsmId)); + } + // Be nice about our error messages for broken geometry if (!$sPlaceId) {