]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/details-html.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / template / details-html.php
index e2799539c896cfbc89d424d48d6382f879dec705..83df4814f2ea9afec0824cf7b1c98ba3a55fdc9d 100644 (file)
@@ -18,7 +18,6 @@
                                                                                new OpenLayers.Control.Permalink(),
                                                                                new OpenLayers.Control.Navigation(),
                                                                                new OpenLayers.Control.PanZoomBar(),
-                                                                               new OpenLayers.Control.MouseDefaults(),
                                                                                new OpenLayers.Control.MousePosition(),
                                                                                new OpenLayers.Control.Attribution()],
                 maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
                        });
 
                        var feature = freader.read('<?php echo $aPointDetails['outlinestring'];?>');
+                       var featureCentre = freader.read('POINT(<?php echo $aPointDetails['lon'];?> <?php echo $aPointDetails['lat'];?>)');
                        if (feature) {
                                map.zoomToExtent(feature.geometry.getBounds());
-
                                feature.style = {
                                        strokeColor: "#75ADFF",
                                        fillColor: "#F0F7FF",
                                        strokeWidth: <?php echo ($aPointDetails['isarea']=='t'?'2':'5');?>,
                                        strokeOpacity: 0.75,
                                        fillOpacity: 0.75,
-                                       pointRadius: 100
+                                       pointRadius: 50
+                               };
+
+<?php if ($aPointDetails['isarea']=='t') {?>
+                               featureCentre.style = {
+                                       strokeColor: "#008800",
+                                       fillColor: "#338833",
+                                       strokeWidth: <?php echo ($aPointDetails['isarea']=='t'?'2':'5');?>,
+                                       strokeOpacity: 0.75,
+                                       fillOpacity: 0.75,
+                                       pointRadius: 8
                                };
+                               vectorLayer.addFeatures([feature,featureCentre]);
+<?php } else { ?>
                                vectorLayer.addFeatures([feature]);
+<?php } ?>
                        }
                }
        </script>
@@ -68,7 +80,7 @@
        echo '<h1>';
        if ($aPointDetails['icon'])
        {
-               echo '<img style="float:right;margin-right:40px;" src="'.CONST_Website_BaseURL.'images/mapicons/'.$aPointDetails['icon'].'.n.32.png'.'">';
+               echo '<img style="float:right;margin-right:40px;" src="'.CONST_Website_BaseURL.'images/mapicons/'.$aPointDetails['icon'].'.n.32.png'.'" alt="'.$aPointDetails['icon'].'" />';
        }
        echo $aPointDetails['localname'].'</h1>';
        echo '<div class="locationdetails">';
@@ -84,6 +96,7 @@
        echo ' <div>Rank: <span class="rankaddress">'.$aPointDetails['rank_search_label'].'</span></div>';
        if ($aPointDetails['calculated_importance']) echo ' <div>Importance: <span class="rankaddress">'.$aPointDetails['calculated_importance'].($aPointDetails['importance']?'':' (estimated)').'</span></div>';
        echo ' <div>Coverage: <span class="area">'.($aPointDetails['isarea']=='t'?'Polygon':'Point').'</span></div>';
+       echo ' <div>Centre Point: <span class="area">'.$aPointDetails['lat'].','.$aPointDetails['lon'].'</span></div>';
        $sOSMType = ($aPointDetails['osm_type'] == 'N'?'node':($aPointDetails['osm_type'] == 'W'?'way':($aPointDetails['osm_type'] == 'R'?'relation':'')));
        if ($sOSMType) echo ' <div>OSM: <span class="osm">'.$sOSMType.' <a href="http://www.openstreetmap.org/browse/'.$sOSMType.'/'.$aPointDetails['osm_id'].'">'.$aPointDetails['osm_id'].'</a></span></div>';
        if ($aPointDetails['wikipedia'])