Geofield is a module for storing geographic data in Drupal 7 & Drupal 8. It supports all geo-types (points, lines, polygons, multitypes etc.)
Latitude and Longitude
Supports entering data as both Decimal Degrees (122.340932) and Degrees-Minutes-Seconds (-123° 49' 55.2" W). The Degrees-Minutes-Seconds input is very tolerant of inconsistent input.
Bouding Box
Four textfields where lat / lon can be entered
Well Known Text (WKT)
A textarea for direct WKT input
Draw on an OpenLayers Map
Allows drawing of Points, Lines, Polygons and Bouding Boxes
HTML5 Geolocation
Transparently asks the browser for the user's current location. Works great on Chrome and smartphones with GPS.
Geocode from another field
There is good Integrations with the Drupal 7 & Drupal 8 version of the Geocoder module (http://drupal.org/project/geocoder). This allows you to use data from one field to populate your geofield automatically. Supported geocoders include:
Latitude and Longitude
Supports display as both Decimal Degrees (122.340932) and Degrees-Minutes-Seconds (-123° 49' 55.2" W)
Well Known Text (WKT)
GeoJSON
KML
KML is the format used by Google Earth
GPX
GPX is the format used by GPS devices
OpenLayers Map
Display your data on a map, can use all of OpenLayers mapping functionality including behaviors and styles.
For Drupal 7 version all you need to do is install the geoPHP module, which is required by geofield.
Since 8.x-1.0-alpha2 version, this module is not depending on GeoPHP module anymore.
The Drupal 8 version of Geofield module needs to be installed using Composer to manage Drupal site dependencies, it means simply running the following command from your project root (where the main composer.json file is sited):
$ composer require 'drupal/geofield_map'
This process will also download the required GeoPHP library dependency, that will be sited in the /vendor folder (as Drupal 8 default settings).
Once installed you can enable the module in the usual way, both from the extend/modules backend interfaces or via drush with the following command:
$ drush en geofield
Once enabled the module it will be possible to add a "Geofield" field type to
any entity type/bundle and then choose the preferred widget or formatter.
<georss:point>
, <georss:polygon>
etc. element for geofieldsA special thanks to the following organization for sponsoring the development of geofield: HighWire Press, Phase 2, and GeoScienceWorld. Also, thanks to all of our contributing developers and many others who have helped with bug fixing and documentation.
<