Changing info_footer to info_settings.
Location from footer to top right hand corner. modified: public_html/gmap.html modified: public_html/script.js modified: public_html/style.css
This commit is contained in:
parent
9e8c1053bd
commit
2d1325f014
|
@ -18,7 +18,7 @@
|
||||||
<p id="selinfo">Click on a plane for info.</p>
|
<p id="selinfo">Click on a plane for info.</p>
|
||||||
<div id="tabinfo"></div>
|
<div id="tabinfo"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="info_footer"><a href="#" onClick="resetMap();">Reset Map</a></div>
|
<div id="info_settings">[<a href="#" onClick="#resetMap();">Settings</a>]</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -363,17 +363,12 @@ function printTime() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function placeFooter() {
|
function placeSettings() {
|
||||||
var windHeight = $(window).height();
|
$('#info_settings').css('top', parseInt($('#utcTime').offset().top));
|
||||||
var footerHeight = $('#info_footer').height();
|
|
||||||
var offset = parseInt(windHeight) - parseInt(footerHeight);
|
|
||||||
|
|
||||||
var footerWidth = parseInt($('#info_footer').width());
|
var marginLeft = $('#info').width() - $('#info_settings').width();
|
||||||
var infoWidth = parseInt($('#info').width());
|
marginLeft -= parseInt($('#info_settings').width() / 3); // Little air around
|
||||||
var marginLeft = parseInt((infoWidth / 2) - (footerWidth / 2));
|
$('#info_settings').css('left', marginLeft);
|
||||||
|
|
||||||
$('#info_footer').css('top', offset);
|
|
||||||
$('#info_footer').css('margin-left', marginLeft);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetMap() {
|
function resetMap() {
|
||||||
|
@ -381,7 +376,8 @@ function resetMap() {
|
||||||
localStorage['CenterLon'] = 9.0;
|
localStorage['CenterLon'] = 9.0;
|
||||||
localStorage['ZoomLvl'] = 5;
|
localStorage['ZoomLvl'] = 5;
|
||||||
Map.setZoom(parseInt(localStorage['ZoomLvl']));
|
Map.setZoom(parseInt(localStorage['ZoomLvl']));
|
||||||
Map.setCenter(new google.maps.LatLng(parseInt(localStorage['CenterLat']), parseInt(localStorage['CenterLon'])));
|
Map.setCenter(new google.maps.LatLng(parseInt(localStorage['CenterLat']),
|
||||||
|
parseInt(localStorage['CenterLon'])));
|
||||||
Selected = null;
|
Selected = null;
|
||||||
refreshSelectedInfo();
|
refreshSelectedInfo();
|
||||||
}
|
}
|
||||||
|
@ -413,14 +409,14 @@ function initialize() {
|
||||||
maxZoom: 18
|
maxZoom: 18
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// show footer at info-area
|
// show settings at info-area
|
||||||
$(function(){
|
$(function(){
|
||||||
$(window).resize(function(e){
|
$(window).resize(function(e){
|
||||||
placeFooter();
|
placeSettings();
|
||||||
});
|
});
|
||||||
placeFooter();
|
placeSettings();
|
||||||
// hide it before it's positioned
|
// hide it before it's positioned
|
||||||
$('#info_footer').css('display','inline');
|
$('#info_settings').css('display','inline');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Listener for newly created Map
|
// Listener for newly created Map
|
||||||
|
|
|
@ -26,12 +26,9 @@ margin:0px;
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
font-size:16px;
|
font-size:16px;
|
||||||
}
|
}
|
||||||
#info_footer {
|
#info_settings {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: none;
|
display: none;
|
||||||
text-align: center;
|
|
||||||
padding:0px;
|
|
||||||
margin:0px;
|
|
||||||
}
|
}
|
||||||
#tabinfo{
|
#tabinfo{
|
||||||
height: 400px;
|
height: 400px;
|
||||||
|
|
Loading…
Reference in a new issue