Skip to content

Instantly share code, notes, and snippets.

@Kaapiii
Created May 31, 2013 15:25
Show Gist options
  • Save Kaapiii/5685738 to your computer and use it in GitHub Desktop.
Save Kaapiii/5685738 to your computer and use it in GitHub Desktop.
Clean Solution for Google maps v3 and bootstrap issues
// Triggering a tab a second time, the map doesn't render properly
// This lines solves the rendering problem
google.maps.event.addListener(map, 'bounds_changed', function() {
google.maps.event.trigger(map, 'resize');
});
// If a map is located in a tab "tab-bane" class
// the map UI is messed up, to solve it, add the lines below
// map-canvas is the element where you load in the map
.map-canvas img{
max-width: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment