Skip to content

Instantly share code, notes, and snippets.

@timbrandin
Created May 5, 2015 07:22
Show Gist options
  • Save timbrandin/78112918856012cc3945 to your computer and use it in GitHub Desktop.
Save timbrandin/78112918856012cc3945 to your computer and use it in GitHub Desktop.
Template.map_canvas.rendered = function() {
map = initialize();
if (map && $(window).width() < 1100) {
map.setOptions({
draggable: false,
scrollwheel: false,
zoomControl: false,
mapTypeControl: false,
scaleControl: false,
navigationControl: false,
overviewMapControl: false,
disableDoubleClickZoom: true
});
}
google.maps.event.addDomListener(window, 'resize', function() {
map.setCenter(new google.maps.LatLng(57.7221415, 12.0789806));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment