Skip to content

Instantly share code, notes, and snippets.

@jaseflow
Created December 11, 2012 00:58
Show Gist options
  • Save jaseflow/4254797 to your computer and use it in GitHub Desktop.
Save jaseflow/4254797 to your computer and use it in GitHub Desktop.
/*!
* 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