Skip to content

Instantly share code, notes, and snippets.

@dkobia
Created January 11, 2012 18:20
Show Gist options
  • Save dkobia/1595996 to your computer and use it in GitHub Desktop.
Save dkobia/1595996 to your computer and use it in GitHub Desktop.
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
var orig_width = $("#map").width();
var orig_height = $("#map").height();
currZoom = map.getZoom();
currCenter = map.getCenter();
$(".fullscreenmap_click").colorbox({
width:"100%",
height:"100%",
inline:true,
href:"#map",
// Resize Map DIV and Refresh
onComplete:function(){
$("#map").width("99%");
$("#map").height("99%");
// $("#map").append(<?php echo $categories_view;?>);
// $(".fullscreenmap_cats").draggable( { handle: 'h2' } );
map.setCenter(currCenter, currZoom, false, false);
map.pan(0,1); //++ Fixes white tile issue onresize
},
// Return DIV to original state
onClosed:function(){
$("#map").width(orig_width);
$("#map").height(orig_height);
$("#map").show();
map.setCenter(currCenter, currZoom, false, false);
}
});
});
</script>
@brianherbert
Copy link

I could swear I made the same change on my local. I guess Murphy is still a jerk. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment