Skip to content

Instantly share code, notes, and snippets.

@ifnull
Last active December 11, 2015 08:58
Show Gist options
  • Save ifnull/4576872 to your computer and use it in GitHub Desktop.
Save ifnull/4576872 to your computer and use it in GitHub Desktop.
Drupal GMaps
// Get IDs
gmap_tool = jQuery('#tools .view-partners-map .gmap').attr('id').split('-')[1]
gmap_home = jQuery('#page-content .view-partners-map .gmap').attr('id').split('-')[1]
// Resize fix
google.maps.event.trigger(Drupal.gmap.getMap('auto2map').map, "resize")
// Add map styles
Drupal.gmap.getMap('auto2map').map.setOptions({styles: styles});
// Remove controls
Drupal.gmap.getMap('auto2map').map.setOptions({mapTypeControl: false});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment