diff --git a/modules/geolocation_html5/geolocation_html5.css b/modules/geolocation_html5/geolocation_html5.css
new file mode 100644
index 0000000..062bbeb
--- /dev/null
+++ b/modules/geolocation_html5/geolocation_html5.css
@@ -0,0 +1,29 @@
+/**
+ * @file
+ * CSS for Geolocation Field.
+ */
+.geolocation-html5-map {
+  width:450px;
+  height:250px;
+  background:url("world-map.png") no-repeat scroll 0 0 transparent;
+  position:relative;
+  padding:0;
+  margin:0;
+  display:none;
+}
+
+.geolocation-html5-messages .geolocating {
+  display:none;
+}
+
+.geolocation-html5-map .dot {
+  -webkit-border-radius:4px;
+  -moz-border-radius:4px;
+  border-radius:4px;
+  border: 4px solid #064771;
+  display: none;
+  height: 0;
+  margin: -4px;
+  position: absolute;
+  width: 0;
+}
diff --git a/modules/geolocation_html5/geolocation_html5.info b/modules/geolocation_html5/geolocation_html5.info
new file mode 100644
index 0000000..8c2ab4d
--- /dev/null
+++ b/modules/geolocation_html5/geolocation_html5.info
@@ -0,0 +1,6 @@
+name = Geolocation HTML5
+description = Provides a widget and formatter for geolocation field based on <a href="http://www.w3.org/TR/geolocation-API/">HTML5’s geolocation API</a>.
+package = Geolocation
+core = 6.x
+dependencies[] = geolocation
+
diff --git a/modules/geolocation_html5/geolocation_html5.js b/modules/geolocation_html5/geolocation_html5.js
new file mode 100644
index 0000000..3490e8d
--- /dev/null
+++ b/modules/geolocation_html5/geolocation_html5.js
@@ -0,0 +1,115 @@
+
+/**
+ * @file
+ * Javascript for Geolocation Field.
+ */
+
+
+(function () {
+  function latitudeToMercator(latitude) {
+    return Math.log(Math.tan(latitude * Math.PI / 180) + 1 / Math.cos(latitude * Math.PI / 180));
+  }
+
+  Drupal.latitudeToPx = function (latitude, topLatitude, bottomLatitude, height) {
+    return (latitudeToMercator(latitude) - latitudeToMercator(bottomLatitude)) / (latitudeToMercator(topLatitude) - latitudeToMercator(bottomLatitude)) * height;
+  }
+
+  Drupal.longitudeToPx = function (longitude, leftLongitude, width) {
+    return (longitude - leftLongitude + 360) / 360 % 1 * width;
+  }
+  
+  
+  
+
+  function plot(widgetParentElement) {
+    var thisMap = $('.geolocation-html5-map', widgetParentElement);
+    var latitude = $('input.geolocation-lat', widgetParentElement).attr('value');
+    var longitude = $('input.geolocation-lng', widgetParentElement).attr('value');
+    if (latitude == 0 && longitude == 0) {
+      return;
+    }
+
+    var latPx = Math.round( Drupal.latitudeToPx(latitude, 78, -58, thisMap.height()) );
+    var lngPx = Math.round( Drupal.longitudeToPx(longitude, -168, thisMap.width()) );
+
+    
+   $('.dot',thisMap).css({
+      left: '' + lngPx + 'px',
+      bottom: '' + latPx + 'px'
+    }).show();
+    /*
+    // Plot coords on map.
+    $('.dot', thisMap).show();
+   // alert($('.dot', thisMap).html());
+    $('.dot', thisMap).css('bottom', latpx + 'px');
+    $('.dot', thisMap).css('left', lngpx + 'px');
+        //$('.dot').css({bottom: '' + latpx + 'px',left: '' + lngpx + 'px'}).show();
+*/
+  }
+
+
+
+  function getLocation(widgetParentElement) {
+    var thisMap = $('.geolocation-html5-map', widgetParentElement);
+    var messages = $('.geolocation-html5-messages', widgetParentElement);
+    var busyMessage = $('.geolocating', messages);
+
+    if ($('input.form-checkbox', widgetParentElement).attr('checked')) {
+
+      thisMap.slideDown('fast', function() {
+        // Get position
+        busyMessage.show();
+        navigator.geolocation.getCurrentPosition(function (position) {
+          // Save coords to hidden inputs.
+          $('input.geolocation-lat', widgetParentElement).attr('value', position.coords.latitude);
+          $('input.geolocation-lng', widgetParentElement).attr('value', position.coords.longitude);
+
+          plot(widgetParentElement);
+          busyMessage.hide();
+        }, function () { // getCurrentPosition error callback
+          busyMessage.hide();
+          $('input.form-checkbox', widgetParentElement).attr('checked', false).change();
+          $('input.form-checkbox', widgetParentElement).attr('disabled', true);
+        },
+        {
+          maximumAge: Infinity
+        });
+      });
+    }
+    else { // Location not checked
+      busyMessage.hide();
+      $('.dot', thisMap).attr('style', '');
+      $('input.geolocation-lat', widgetParentElement).attr('value', 0);
+      $('input.geolocation-lng', widgetParentElement).attr('value', 0);
+      thisMap.slideUp('fast');
+    }
+  }
+  
+
+
+    Drupal.behaviors.GeolocationHTML5 = function (context) {
+
+      if (navigator.geolocation) {
+        $('.field-geolocation-latlng input.form-checkbox:not(.geolocation-html5-processed)',context)
+        .change(function () {
+          var widgetParentElement = $(this).parent().parent().parent().parent();
+          getLocation(widgetParentElement);
+        })
+        .each(function () {
+          $(this).addClass('geolocation-html5-processed');
+          var widgetParentElement = $(this).parent().parent().parent().parent();
+          $('.description',widgetParentElement).html(Drupal.t('Your location will be saved and may be shared.'));
+          getLocation(widgetParentElement);
+        });
+      }
+      else { // HTML5 Geolocation not supported
+        // Hide all map widgets and disable checkboxes.
+        $('.geolocation-html5-map').hide();
+        $('.field-type-geolocation-latlng .form-type-checkbox input').attr('disabled', true);
+      }
+     
+    }
+     
+}());
+
+
diff --git a/modules/geolocation_html5/geolocation_html5.module b/modules/geolocation_html5/geolocation_html5.module
new file mode 100644
index 0000000..22165a1
--- /dev/null
+++ b/modules/geolocation_html5/geolocation_html5.module
@@ -0,0 +1,168 @@
+<?php
+
+/**
+ * @file
+ * HTML5 widget and formaters for Geolocation.
+ */
+
+function geolocation_html5_theme() {
+  return array(
+    // Themes for the formatters.
+    'geolocation_html5_formatter_html5maps_static' => array(
+      'arguments' => array('element' => NULL),
+    ),
+  );
+}
+
+
+/**
+ * Implements hook_field_formatter_info().
+ */
+function geolocation_html5_field_formatter_info() {
+  return array(
+    'geolocation_html5_mapimage' => array(
+      'label' => t('HTML5 Map image'),
+      'field types' => array('geolocation_latlng'),
+    ),
+  );
+}
+
+
+/**
+* Theme function for field formatter.
+*
+* $element['#item']: the sanitized $delta value for the item,
+* $element['#field_name']: the field name,
+* $element['#type_name']: the $node->type,
+* $element['#formatter']: the $formatter_name,
+* $element['#node']: the $node,
+* $element['#delta']: the delta of this item, like '0',
+*
+*/
+function theme_geolocation_html5_formatter_html5maps_static($element) {
+
+  $item = $element['#item'];
+  $latitude = $item['lat'];
+  $longitude = $item['lng'];
+  $save=$item['save'];
+
+  drupal_add_css(drupal_get_path('module', 'geolocation_html5') . '/geolocation_html5.css', 'file');
+
+  return '<div id="html5-user-geolocation-map"><div class="dot"></div></div>';
+}
+
+
+
+
+
+/**
+ * Implements hook_field_widget_info().
+ */
+function geolocation_html5_widget_info() {
+  return array(
+    'geolocation_html5' => array(
+      'label' => t('HTML5 widget'),
+      'field types' => array('geolocation_latlng'),
+    ),
+  );
+}
+
+
+
+/**
+ * Implements hook_field_widget_form().
+ */
+function geolocation_html5_widget(&$form, &$form_state, $field, $items, $delta = 0) {
+  $lat_value = isset($items[$delta]['lat']) ? $items[$delta]['lat'] : 0;
+  $lng_value = isset($items[$delta]['lng']) ? $items[$delta]['lng'] : 0;
+
+      $element['lat'] = array(
+        '#type' => 'hidden',
+        '#attributes' => array('class' => 'geolocation-lat'),
+        '#default_value' => $lat_value,
+        '#maxlength' => 30,
+      );
+      $element['lng'] = array(
+        '#type' => 'hidden',
+        '#attributes' => array('class' => 'geolocation-lng'),
+        '#default_value' => $lng_value,
+        '#maxlength' => 30,
+      );
+
+      $element['save'] = array(
+        '#type' => 'checkbox',
+        '#prefix' => '<div class="field-geolocation-latlng">',
+        '#suffix' => '</div>',
+        '#title' => t('Save my location'),
+        '#default_value' => $lat_value !=0,
+        '#description' => t('Your web browser does not support geolocation (<a href="http://en.wikipedia.org/wiki/W3C_Geolocation_API">W3C Geolocation API</a>).'),
+      );
+
+
+      $dot_style = '';
+      // If we have a lat/lng pair, calculate dot position.
+        $latitude = $lat_value;
+        $longitude = $lng_value;
+
+
+        $left = _geolocation_html5_lng2px($longitude, -168, 450);
+        $bottom = _geolocation_html5_lat2px($latitude, 78, -58, 250);
+        $dot_style = ' style="display:block; left:'. $left .'px; bottom:'. $bottom .'px;"';
+
+        $element[$delta]['mapimage'] = array(
+          '#type' => 'markup',
+          '#value' => '<div class="geolocation-html5-map" style="display:block;"><div class="dot"'. $dot_style .'></div></div>',
+        );
+
+
+      $element['messages'] = array(
+        '#type' => 'markup',
+        '#value' => '<div class="geolocation-html5-messages"><div class="geolocating">' . t('Your browser is looking for your location, you may need to approve this…') . '</div></div>',
+      );
+
+     drupal_add_css(drupal_get_path('module', 'geolocation_html5') . '/geolocation_html5.css');
+     drupal_add_js(drupal_get_path('module', 'geolocation_html5') . '/geolocation_html5.js');
+
+
+
+
+  // Make defaults available as javascript settings. In JS files use:
+  // Drupal.settings.map_defaults.lat
+  // TODO: better defaults.
+  $map_defaults_lat = ($lat_value == '') ? 49.9148115245017 : $lat_value;
+  $map_defaults_lng = ($lng_value == '') ? 10.8783125877381 : $lng_value;
+  $map_defaults = array(
+    $delta => array(
+      'lat' => $map_defaults_lat,
+      'lng' => $map_defaults_lng,
+    ),
+  );
+
+
+
+  return $element;
+}
+
+
+
+/**
+ * Helper function converts latitude to mercator value (Mercator projection).
+ */
+function _lat2mercator($latitude) {
+  return log(tan($latitude * pi() / 180) + 1 / cos($latitude * pi() / 180));
+}
+
+/**
+ * Helper function converts longitude pixel value for display in image map.
+ */
+function _geolocation_html5_lng2px($longitude, $leftLongitude, $width) {
+  return fmod(($longitude - $leftLongitude + 360) / 360, 1) * $width;
+}
+
+/**
+ * Helper function converts latitude pixel value for display in image map.
+ */
+function _geolocation_html5_lat2px($latitude, $topLatitude, $bottomLatitude, $height) {
+  return (_lat2mercator($latitude) - _lat2mercator($bottomLatitude)) / (_lat2mercator($topLatitude) - _lat2mercator($bottomLatitude)) * $height;
+}
+
diff --git a/modules/geolocation_html5/world-map.png b/modules/geolocation_html5/world-map.png
new file mode 100644
index 0000000..8f01315
Binary files /dev/null and b/modules/geolocation_html5/world-map.png differ
