-
-
Save ademilter/fd6231266a42db70cde5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$(function() { | |
var map = new google.maps.Map(document.getElementById("map_canvas"), {}); | |
var newyork = new google.maps.LatLng(40.69847032728747, -73.9514422416687); | |
var googleMapWidth = $("#map_canvas").css('width'); | |
var googleMapHeight = $("#map_canvas").css('height'); | |
map.setCenter(newyork); | |
$('#enter-full-screen').click(function(){ | |
$("#map_canvas").css("position", 'fixed'). | |
css('top', 0). | |
css('left', 0). | |
css("width", '100%'). | |
css("height", '100%'); | |
google.maps.event.trigger(map, 'resize'); | |
map.setCenter(newyork); | |
return false; | |
}); | |
$('#exit-full-screen').click(function(){ | |
$("#map_canvas").css("position", 'relative'). | |
css('top', 0). | |
css("width", googleMapWidth). | |
css("height", googleMapHeight); | |
google.maps.event.trigger(map, 'resize'); | |
map.setCenter(newyork); | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment