diff options
| author | Comment <tim@gray.(none)> | 2013-08-04 21:40:34 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-08-04 21:40:34 +0100 |
| commit | 95792250582b53d129ffaeec44765b2a16b1f9cc (patch) | |
| tree | abb15f71ce03f599f68916299289481e770eceb3 | |
| parent | 73c5d1fbc23047f628da95a724aa6b61af3b44d5 (diff) | |
| -rwxr-xr-x | map.js | 12 | ||||
| -rwxr-xr-x | map_prepare.php | 1 | ||||
| -rwxr-xr-x | maps-extra.js | 8 |
3 files changed, 12 insertions, 9 deletions
@@ -204,7 +204,15 @@ function loadMarkers(m) { //---------build customised markers from a database ta prepareData(); do_menuchoices(); //console.log("search:"+search_posted); - if (search_posted!="") onsearch(search_posted); + // Check if the POST search variables (query/building) was passed to Javascript. + if (building_posted != ''&&parseInt(building_posted)>0) + { + show_building(parseInt(building_posted)); + } + else if (search_posted != '') + { + onsearch(search_posted); + } } }); }); @@ -394,7 +402,7 @@ function getPlacesTab() { popup+="<div id='map_building_permalink'>"; var linkname; linkname=this.name; - popup+="<a href='map.php?q="+this.id+"' >Permalink</a>"; //urlencode(linkname) + popup+="<a href='map.php?b="+this.id+"' >Permalink</a>"; //urlencode(linkname) lat=this.getPosition().lat(); lng=this.getPosition().lng(); diff --git a/map_prepare.php b/map_prepare.php index b4d2ea7..511dc26 100755 --- a/map_prepare.php +++ b/map_prepare.php @@ -16,6 +16,7 @@ <?php echo "STARTPOS=new G.LatLng(".$startlat.",".$startlng.");\n";?> // Pass any POST variables to Javascript, which are then used in maps-extra.js var search_posted = '<?php echo (isset($_GET['q']) ? str_replace("'", "\'", htmlspecialchars($_GET['q'])) : ''); // DS added htmlspecialchars 2013 May 8 and single quote escaping 2013 May 9 ?>'; + var building_posted = '<?php echo (isset($_GET['b']) ? str_replace("'", "\'", htmlspecialchars($_GET['b'])) : ''); ?>'; var quicklinks_posted = '<?php //echo $quicklinks_posted; ?>'; var submit_the_query_form = false; </script>
\ No newline at end of file diff --git a/maps-extra.js b/maps-extra.js index a2b1f2c..f1cd2bd 100755 --- a/maps-extra.js +++ b/maps-extra.js @@ -108,13 +108,7 @@ function callback_for_resizing() { $(window).resize(function() { resize_map_and_results(); }); - // Check if the POST search variable was passed to Javascript. - if (search_posted != '') - { - // Update the search results. - onsearch(search_posted); - } - // Check if the POST quicklinks variable was passed to Javascript. + // Check if the POST quicklinks variable were passed to Javascript. if (quicklinks_posted != '') { // Update the search results. |
