diff --git a/modules/geolocation_googlemaps/geolocation_googlemaps.module b/modules/geolocation_googlemaps/geolocation_googlemaps.module
index 46a24a4..305663a 100644
--- a/modules/geolocation_googlemaps/geolocation_googlemaps.module
+++ b/modules/geolocation_googlemaps/geolocation_googlemaps.module
@@ -8,13 +8,15 @@
 /**
  * Implements hook_field_formatter_info().
  */
-function geolocation_googlemaps_field_formatter_info() {
+function geolocation_googlemaps_field_formatter_info()
+{
   return array(
     'geolocation_googlemaps_static' => array(
       'label' => t('Static Google Map'),
       'field types' => array('geolocation_latlng', 'geofield'),
       'settings' => array(
-        'map_dimensions' => '300x300',
+        'map_width' => '300px',
+        'map_height' => '300px',
         'map_zoomlevel' => '7',
         'map_imageformat' => 'png8',
         'map_maptype' => 'roadmap',
@@ -25,7 +27,8 @@ function geolocation_googlemaps_field_formatter_info() {
       'label' => t('Dynamic Google Map'),
       'field types' => array('geolocation_latlng', 'geofield'),
       'settings' => array(
-        'map_dimensions' => '300x300',
+        'map_width' => '300px',
+        'map_height' => '300px',
         'map_zoomlevel' => '7',
         'map_imageformat' => 'png8',
         'map_maptype' => 'roadmap',
@@ -39,7 +42,8 @@ function geolocation_googlemaps_field_formatter_info() {
 /**
  * Implements hook_field_formatter_settings_form().
  */
-function geolocation_googlemaps_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
+function geolocation_googlemaps_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state)
+{
 
   $display = $instance['display'][$view_mode];
   $type = $display['type'];
@@ -49,12 +53,20 @@ function geolocation_googlemaps_field_formatter_settings_form($field, $instance,
 
   // Implement some configuration options.
   // http://code.google.com/intl/en/apis/maps/documentation/staticmaps/
-  $element['map_dimensions'] = array(
+  $element['map_width'] = array(
     '#type' => 'textfield',
-    '#title' => t('Map dimensions'),
-    '#description' => t('Enter custom map dimensions, default is 300x300.'),
-    '#default_value' => $settings['map_dimensions'],
+    '#title' => t('Map width'),
+    '#description' => t('Enter custom map width (e.g. 300px or 300%), default is 300px.'),
+    '#default_value' => $settings['map_width'],
   );
+
+  $element['map_height'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Map height'),
+    '#description' => t('Enter custom map height (e.g. 300px or 300%), default is 300px.'),
+    '#default_value' => $settings['map_height'],
+  );
+
   $element['marker_icon'] = array(
     '#type' => 'textfield',
     '#title' => t('Marker icon'),
@@ -137,13 +149,14 @@ function geolocation_googlemaps_field_formatter_settings_form($field, $instance,
 /**
  * Implements hook_field_formatter_settings_summary().
  */
-function geolocation_googlemaps_field_formatter_settings_summary($field, $instance, $view_mode) {
+function geolocation_googlemaps_field_formatter_settings_summary($field, $instance, $view_mode)
+{
 
   $display = $instance['display'][$view_mode];
   $type = $display['type'];
   $settings = $display['settings'];
 
-  $summary = '<strong>Map:</strong> ' . $settings['map_dimensions'];
+  $summary = '<strong>Map:</strong> ' . $settings['map_width'] . " by " . $settings['map_height'];
   switch ($type) {
     case 'geolocation_googlemaps_static':
       $summary .= ' (' . $settings['map_imageformat'] . ')';
@@ -170,10 +183,27 @@ function geolocation_googlemaps_field_formatter_settings_summary($field, $instan
 /**
  * Implements hook_field_formatter_view().
  */
-function geolocation_googlemaps_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
+function geolocation_googlemaps_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display)
+{
   $settings = $display['settings'];
   $element = array();
   $lat_key = 'lat';
+
+  if (strpos($settings['map_height'], 'px'))
+    $height = strtok($settings['map_height'], 'p');
+  elseif (strpos($settings['map_height'], '%'))
+    $height = strtok($settings['map_height'], '%');
+  elseif (!strpos($settings['map_height'], '%') || !strpos($settings['map_height'], 'px'))
+    $height = $settings['map_height'];
+
+
+  if (strpos($settings['map_width'], 'px'))
+    $width = strtok($settings['map_width'], 'p');
+  elseif (strpos($settings['map_width'], '%'))
+    $width = strtok($settings['map_width'], '%');
+  elseif (!strpos($settings['map_width'], '%') || !strpos($settings['map_width'], 'px'))
+    $width = $settings['map_width'];
+
   // To make this widget compatible with geofiled we need to rename the keys for
   // longitude. Geofield uses "lon" while Geolocation Field uses "lng".
   $lng_key = ($field['type'] == 'geofield') ? 'lon' : 'lng';
@@ -185,7 +215,7 @@ function geolocation_googlemaps_field_formatter_view($entity_type, $entity, $fie
         $query = array(
           'sensor' => 'false',
           'zoom' => $settings['map_zoomlevel'],
-          'size' => $settings['map_dimensions'],
+          'size' => $width . "x" . $height,
           'format' => $settings['map_imageformat'],
           'maptype' => $settings['map_maptype'],
           'markers' => 'size:mid|color:red|' . $item[$lat_key] . ',' . $item[$lng_key],
@@ -211,8 +241,8 @@ function geolocation_googlemaps_field_formatter_view($entity_type, $entity, $fie
 
       foreach ($items as $delta => $item) {
 
-        $width = strtok($settings['map_dimensions'], 'x') . "px";
-        $height = strtok('') . "px";
+      $width = $settings['map_width'];
+      $height = $settings['map_height'];
 
         $id = 'geolocation-googlemaps-dynamic-' . 'e_' . $eid . 'i_' . $instance['id'] . '-d_' . $delta;
         $map_element['googlemap'] = array(
@@ -272,7 +302,8 @@ function geolocation_googlemaps_field_formatter_view($entity_type, $entity, $fie
 /**
  * Implements hook_field_widget_info().
  */
-function geolocation_googlemaps_field_widget_info() {
+function geolocation_googlemaps_field_widget_info()
+{
   return array(
     'geolocation_googlemap' => array(
       'label' => t('Google Map'),
@@ -284,7 +315,8 @@ function geolocation_googlemaps_field_widget_info() {
 /**
  * Implements hook_field_widget_settings_form().
  */
-function geolocation_googlemaps_field_widget_settings_form($field, $instance) {
+function geolocation_googlemaps_field_widget_settings_form($field, $instance)
+{
   $widget = $instance['widget'];
   $settings = $widget['settings'];
 
@@ -307,7 +339,8 @@ function geolocation_googlemaps_field_widget_settings_form($field, $instance) {
 /**
  * Implements hook_field_widget_form().
  */
-function geolocation_googlemaps_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
+function geolocation_googlemaps_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element)
+{
 
   // In order to make Geolocation field work with the popular Field collection module
   // we check if our map widget is part of a Field collection and add the 
@@ -316,8 +349,7 @@ function geolocation_googlemaps_field_widget_form(&$form, &$form_state, $field,
     $depth = count($element['#field_parents']) - 1;
     $parent_delta = $element['#field_parents'][$depth];
     $id = $instance['id'] . '-' . $parent_delta . '-' . $delta;
-  }
-  else {
+  } else {
     $id = $instance['id'] . '-' . $delta;
   }
 
@@ -444,13 +476,13 @@ function geolocation_googlemaps_field_widget_form(&$form, &$form_state, $field,
 /**
  * Validation handler for geolocation_googlemaps_field_widget_form().
  */
-function geolocation_googlemaps_field_widget_validate($element, &$form_state, $form) {
+function geolocation_googlemaps_field_widget_validate($element, &$form_state, $form)
+{
   if ($element['#required']) {
     if (!$element['lat']['#value'] || !$element['lng']['#value']) {
       form_error($element, t('!name field is required.', array('!name' => $element['#title'])));
     }
-  }
-  else {
+  } else {
     switch (TRUE) {
       case $element['lng']['#value'] && !$element['lat']['#value']:
         form_error($element, t('!name field is incomplete, latitude value is missing.', array('!name' => $element['#title'])));
@@ -463,8 +495,9 @@ function geolocation_googlemaps_field_widget_validate($element, &$form_state, $f
   }
 }
 
-function geolocation_googlemaps_field_widget_set_value($element, &$form_state, $form) {
-  $values = &drupal_array_get_nested_value($form_state['values'], $element['#parents']);
+function geolocation_googlemaps_field_widget_set_value($element, &$form_state, $form)
+{
+  $values = & drupal_array_get_nested_value($form_state['values'], $element['#parents']);
   if ($values['field_type'] == 'geofield') {
     // Geofield needs the values in their own format which is exactly what
     // geofield_compute_values does, but we have to change first the longitude
@@ -477,7 +510,8 @@ function geolocation_googlemaps_field_widget_set_value($element, &$form_state, $
 /**
  * Implements hook_field_widget_error().
  */
-function geolocation_googlemaps_field_widget_error($element, $error, $form, &$form_state) {
+function geolocation_googlemaps_field_widget_error($element, $error, $form, &$form_state)
+{
   switch ($error['error']) {
     case 'geolocation_invalid_lat':
     case 'geolocation_invalid_lng':
