diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2011-06-12 18:34:23 +0400 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2011-06-12 18:34:23 +0400 |
commit | 5f09cf550fe9a5a2faafc749e776ba669b0d518d (patch) | |
tree | 888a5f46efdd3ab76e1ac8b24423d74ef38122a0 /js/tbl_gis_visualization.js | |
parent | 7fca97fdde95fdcbc59c008b474e95792d228377 (diff) |
Visualize GIS data with OpenStreetMap as a base layer
Diffstat (limited to 'js/tbl_gis_visualization.js')
-rw-r--r-- | js/tbl_gis_visualization.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/js/tbl_gis_visualization.js b/js/tbl_gis_visualization.js index c5eaad301b..97339d23eb 100644 --- a/js/tbl_gis_visualization.js +++ b/js/tbl_gis_visualization.js @@ -62,6 +62,35 @@ function zoomAndPan() { * Displaying tooltips for GIS objects. */ $(document).ready(function() { + var $placeholder = $('#placeholder'); + var $openlayersmap = $('#openlayersmap'); + + if ($('#choice').prop('checked') != true) { + $openlayersmap.hide(); + } else { + $placeholder.hide(); + } + + var cssObj = { + 'border' : '1px solid #aaa', + 'width' : $placeholder.width(), + 'height' : $placeholder.height(), + 'float' : 'right' + }; + $openlayersmap.css(cssObj); + drawOpenLayers(); + + $('.choice').show(); + $('#choice').bind('click', function() { + if ($(this).prop('checked') == false) { + $placeholder.show(); + $openlayersmap.hide(); + } else { + $placeholder.hide(); + $openlayersmap.show(); + } + }); + $('#placeholder').svg({ onLoad: function(svg_ref) { svg = svg_ref; |