1
This commit is contained in:
Alex Yatskov 2015-09-22 14:04:17 +09:00
parent f07bb9d94b
commit 14d2734a2b
2 changed files with 31 additions and 1 deletions

View File

@ -8,6 +8,10 @@
th {
white-space: nowrap;
}
div#map {
width: 100%;
height: 500px;
}
</style>
</head>
<body>
@ -80,7 +84,20 @@
<!-- visualizer -->
<div class="col-md-9">
<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800" height="500"></svg>
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#semTab">Semantics</a></li>
<li><a data-toggle="tab" href="#mapTab">Map</a></li>
</ul>
<div class="tab-content">
<div id="semTab" class="tab-pane fade in active">
<h3>Semantic Tweaker</h3>
<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800" height="500"></svg>
</div>
<div id="mapTab" class="tab-pane fade">
<h3>Result Map</h3>
<div id="map"></div>
</div>
</div>
</div>
</div>
@ -154,6 +171,7 @@
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="scripts/search.js"></script>
<script src="scripts/grapher.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&callback=initMap"></script>
</body>
</html>

View File

@ -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();