From 14d2734a2b40e5fc79ccc5522e568f450a19f98b Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Tue, 22 Sep 2015 14:04:17 +0900 Subject: [PATCH] WIP --- static/index.html | 20 +++++++++++++++++++- static/scripts/search.js | 12 ++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) 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();