diff --git a/static/index.html b/static/index.html index 4b4d177..5b3faee 100644 --- a/static/index.html +++ b/static/index.html @@ -8,6 +8,10 @@ th { white-space: nowrap; } + div#map { + width: 100%; + height: 500px; + } @@ -80,7 +84,20 @@
- + +
+
+

Semantic Tweaker

+ +
+
+

Result Map

+
+
+
@@ -154,6 +171,7 @@ + diff --git a/static/scripts/search.js b/static/scripts/search.js index 0a1dd4c..f7324b8 100644 --- a/static/scripts/search.js +++ b/static/scripts/search.js @@ -55,6 +55,10 @@ $('iframe').attr('src', $('iframe').attr('src')); } }); + $('#mapTab').on('shown', function(e) { + google.maps.event.trigger(window.map, 'resize'); + alert('done'); + }); window.accessReview = function(id) { $.post('/access', JSON.stringify({id: id, profile: getProfile()})); @@ -193,6 +197,14 @@ } }; + window.initMap = function() { + window.map = new google.maps.Map( + document.getElementById('map'), + {center: {lat: -34.397, lng: 150.644}, zoom: 8} + ); + }; + + $(document).on({ ajaxStart: function() { $('#spinner').show();