From: Sarah Hoffmann Date: Mon, 17 Dec 2012 22:07:03 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~654 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/d76eca32f4c96f5725877aec555c7352a8452ba2?hp=7e26dcb4772ff6c827177e445c672364d47bcae7 Merge remote-tracking branch 'upstream/master' Conflicts: lib/init-website.php settings/settings.php --- diff --git a/lib/init-website.php b/lib/init-website.php index ce046eaa..eb275af2 100644 --- a/lib/init-website.php +++ b/lib/init-website.php @@ -1,4 +1,16 @@ ".htmlspecialchars($aPlace['langaddress']).""; - if ($bShowAddressDetails) { + if ($bShowAddressDetails) { echo ""; foreach($aAddress as $sKey => $sValue) { @@ -39,7 +38,7 @@ echo ""; } echo ""; - } + } } - + echo ""; diff --git a/lib/template/details-html.php b/lib/template/details-html.php index e2799539..b56f3989 100644 --- a/lib/template/details-html.php +++ b/lib/template/details-html.php @@ -46,18 +46,31 @@ }); var feature = freader.read(''); + var featureCentre = freader.read('POINT( )'); if (feature) { map.zoomToExtent(feature.geometry.getBounds()); - feature.style = { strokeColor: "#75ADFF", fillColor: "#F0F7FF", strokeWidth: , strokeOpacity: 0.75, fillOpacity: 0.75, - pointRadius: 100 + pointRadius: 50 + }; + + + featureCentre.style = { + strokeColor: "#008800", + fillColor: "#338833", + strokeWidth: , + strokeOpacity: 0.75, + fillOpacity: 0.75, + pointRadius: 8 }; + vectorLayer.addFeatures([feature,featureCentre]); + vectorLayer.addFeatures([feature]); + } } @@ -84,6 +97,7 @@ echo '
Rank: '.$aPointDetails['rank_search_label'].'
'; if ($aPointDetails['calculated_importance']) echo '
Importance: '.$aPointDetails['calculated_importance'].($aPointDetails['importance']?'':' (estimated)').'
'; echo '
Coverage: '.($aPointDetails['isarea']=='t'?'Polygon':'Point').'
'; + echo '
Centre Point: '.$aPointDetails['lat'].','.$aPointDetails['lon'].'
'; $sOSMType = ($aPointDetails['osm_type'] == 'N'?'node':($aPointDetails['osm_type'] == 'W'?'way':($aPointDetails['osm_type'] == 'R'?'relation':''))); if ($sOSMType) echo '
OSM: '.$sOSMType.' '.$aPointDetails['osm_id'].'
'; if ($aPointDetails['wikipedia']) diff --git a/lib/template/search-json.php b/lib/template/search-json.php index 45272d35..4b3b279d 100644 --- a/lib/template/search-json.php +++ b/lib/template/search-json.php @@ -1,4 +1,6 @@ $aPointDetails) { diff --git a/lib/template/search-xml.php b/lib/template/search-xml.php index fa6b14a3..aa029d2b 100644 --- a/lib/template/search-xml.php +++ b/lib/template/search-xml.php @@ -1,6 +1,5 @@ ARRAY[isin_token] - AND ST_DWithin(centroid, point, 0.01) + AND ST_DWithin(centroid, point, 0.03) AND search_rank between 22 and 27 ORDER BY distance ASC limit 1 LOOP diff --git a/website/details.php b/website/details.php index 124b0f90..8c838d46 100755 --- a/website/details.php +++ b/website/details.php @@ -63,6 +63,8 @@ $sSQL = "select place_id, osm_type, osm_id, class, type, name, admin_level, housenumber, street, isin, postcode, country_code, importance, wikipedia,"; $sSQL .= " to_char(indexed_date, 'YYYY-MM-DD HH24:MI') as indexed_date, parent_place_id, rank_address, rank_search, get_searchrank_label(rank_search) as rank_search_label, get_name_by_language(name,$sLanguagePrefArraySQL) as localname, "; $sSQL .= " ST_GeometryType(geometry) in ('ST_Polygon','ST_MultiPolygon') as isarea, "; +// $sSQL .= " ST_Area(geometry::geography) as area, "; + $sSQL .= " ST_y(centroid) as lat, ST_x(centroid) as lon,"; $sSQL .= " case when importance = 0 OR importance IS NULL then 0.75-(rank_search::float/40) else importance end as calculated_importance, "; $sSQL .= " ST_AsText(CASE WHEN ST_NPoints(geometry) > 5000 THEN ST_SimplifyPreserveTopology(geometry, 0.0001) ELSE geometry END) as outlinestring"; $sSQL .= " from placex where place_id = $iPlaceID"; diff --git a/website/reverse.php b/website/reverse.php index 2c62948f..95889fc4 100755 --- a/website/reverse.php +++ b/website/reverse.php @@ -154,8 +154,9 @@ $sSQL .= " get_name_by_language(name, ARRAY['ref']) as ref,"; $sSQL .= " st_y(st_centroid(geometry)) as lat, st_x(st_centroid(geometry)) as lon"; $sSQL .= " from placex where place_id = $iPlaceID "; -//var_dump($sSQL); + $aPlace = $oDB->getRow($sSQL); +//var_dump($sSQL, $aPlace); exit; if ($bShowAddressDetails) {