Created
December 11, 2012 00:58
-
-
Save jaseflow/4254797 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Wotif MapView | |
* @requires jQuery v1.7.2+ | |
* | |
* Description | |
* | |
* @author ... | |
*/ | |
!(function($) { | |
window.Wotif.mapView = window.Wotif.mapView || window.Wotif.BaseModule(function() { | |
var $el, | |
map, | |
mapOptions; | |
return { | |
init: function() { | |
$el = $('body'); | |
this.attachEvents(); | |
}, | |
attachEvents: function() { | |
$el.on('click', '.toggle-map', this.events.loadMap); | |
}, | |
events: { | |
loadMap: function(e) { | |
e.preventDefault(); | |
var styles = [ | |
{ | |
stylers: [ | |
{ hue: '#00ffe6' }, | |
{ saturation: -20 } | |
] | |
},{ | |
featureType: 'road', | |
elementType: 'geometry', | |
stylers: [ | |
{ lightness: 100 }, | |
{ visibility: 'simplified' } | |
] | |
},{ | |
featureType: 'road', | |
elementType: 'labels', | |
stylers: [ | |
{ visibility: 'off' } | |
] | |
} | |
]; | |
mapOptions = { | |
center: new google.maps.LatLng(-27.486345,153.025406), | |
zoom: 11, | |
mapTypeId: google.maps.MapTypeId.ROADMAP, | |
styles: styles | |
}; | |
map = new google.maps.Map(document.getElementById("map_canvas"), | |
mapOptions); | |
$('.grid-header .slider-arrow').toggle(); | |
} | |
} | |
} | |
}()); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment