';
controlUI.appendChild(controlText);
}
// This is the maximise to full browser control div (only visible) for embedded maps
function MaximiseControl(controlDiv, map) {
controlDiv.style.padding = '5px';
// Set CSS for the control border.
var controlUI = document.createElement('div');
controlUI.style.backgroundImage = "url('icons/WebsiteIcons/background.png')";
controlUI.style.backgroundRepeat = "repeat";
controlUI.style.cursor = 'pointer';
controlUI.style.borderRadius = '10px';
controlUI.style.textAlign = 'center';
controlUI.title = 'Make fullscreen for increased functionality';
controlDiv.appendChild(controlUI);
// Set CSS for the control interior.
var controlText = document.createElement('div');
controlText.style.fontFamily = 'Arial,sans-serif';
controlText.style.fontSize = '10px';
controlText.style.color = 'white';
controlText.style.paddingLeft = '5px';
controlText.style.paddingRight = '2px';
controlText.style.paddingTop = '2px';
controlText.style.paddingBottom = '6px';
controlText.innerHTML = '
Make fullscreen
';
controlUI.appendChild(controlText);
google.maps.event.addDomListener(controlUI, 'click', function () {
window.open(window.location.href, '_blank');;
});
}
// This is the GHT control div (links to GHT website when clicked)
function GhtControl(controlDiv, map) {
controlDiv.style.padding = '5px';
// Set CSS for the control border.
var controlUI = document.createElement('div');
controlUI.id = 'GhtControlDiv';
controlUI.style.cursor = 'pointer';
controlUI.style.textAlign = 'center';
controlUI.title = 'GHT Website';
controlDiv.appendChild(controlUI);
// Set CSS for the control interior.
var controlText = document.createElement('div');
controlText.style.paddingBottom = '10px';
controlText.innerHTML = '
';
controlUI.appendChild(controlText);
google.maps.event.addDomListener(controlUI, 'click', function () {
window.location = "http://thegreathimalayatrail.org/";
});
}
google.maps.event.addDomListener(window, 'load', initialize);
window.onresize = function (event) {
google.maps.event.trigger(map, 'resize');
map.setZoom(map.getZoom());
var mapDiv = document.getElementById('map-canvas');
var elevationDiv = document.getElementById('elevation_chart');
var legendControlDiv = document.getElementById('legendControlDiv');
var homeControlDiv = document.getElementById('homeControlDiv');
mapHeight = mapDiv.clientHeight;
elevationHeight = elevationDiv.clientHeight;
if (elevationHeight > 0) {
mapDiv.style.height = windowHeight - elevationHeight + 'px';
elevationDiv.clientWidth = windowWidth + 'px';
}
if (windowHeight