Drupal GMap Module: How to automatically zoom and centre gmap views?

Building a map view using the Drupal views, gmap and location module you might require a solution that automatically zooms the map to the section that displays all results. This is in particular required, if you offer the user a search function based on filters.

Step 1: 
Adjust the Gmap settings

Although this requirement sounds quite complex, it can be achieved by adding one single argument to the Gmap view.

  1. Edit the view
  2. Open the settings of the chosen GMap format
  3. Add "behavior=+autozoom" to the "Macro" field
  4. Save the view and enjoy!
Adjust the gmap settings within view to enable autozoom of map

Drupal themes to be compared