There are two versions of this module for Drupal 7. When Geocoder 2.x will be stable, the old Geocoder 1.x will be deprecated. The API has changed between those two modules, so please, if you use this module, get ready to update your code.
This module will geocode just about anything you throw at it including addresses, GPX files, geo-tagged images, and KML files.
This module also makes available an API to convert the information you already have into geographic information. It support a variety of input formats and runs them through pluggable backends to produce geographic information. In addition to Latitude / Longitude points, this API also supports more complex geographies such as lines and polygons.
If you'd like to help improve the module your patches and co-maintenance are welcome!
- Geocode Address or location data from any text or Addressfield value (using Google, Yahoo, Yandex, or MapQuest).
- Read Geotags from EXIF data in your photos.
- Convert any GPX Tracklog into a Linestring.
- Convert uploaded KML files into geometries.
- Convert uploaded or typed GeoJSON and WKT into geometries.
- Services module integration. You can easily transform Drupal into a general purpose geocoding server using REST, SOAP, XMLRPC etc.
- Geofield (recommended location storage)
- Addressfield (recommended address storage)
- Core Image and File modules (for images and uploaded files - KML, GPX etc.)
- Core Text fields (alternative address storage)
- location (alternative location or address storage)
- geolocation (alternative location storage)
- geocoder-autocomplete Provides a nice auto-complete text-widget. (Doesn't use geocoder api)
- Computed Field
All you need to do is install the geoPHP module, which is required by geocoder.
There's a nice video tutorial on using geocoder, addressfield, and geofield here: http://vimeo.com/38558646
In addition to the GUI-based widget, geocoder also provides a nice general API for doing geocoding. Here's an example:
// Geocode an address $address = '4925 Gair Ave, Terrace, BC'; $point = geocoder('google',$address); $geoJSON = $point->out('json'); // List all available handlers $handlers = geocoder_handler_info(); dpm($handlers);
New geocoder handlers as easy to define. Simply create a new ctools plugin of the type "geocoder_handler".
Development version released the 16th of January.
This is a complete rewrite of the code, based on the Geocoder PHP library.
- Solid API based on Geocoder PHP library
- Geocode and Reverse Geocode using one or multiple providers (list)
- Results can be dumped into multiple formats (list)
- Submodule Geocoder Field: provides Drupal fields widgets and formatters, with even more options.
- Submodule Geocoder Services: provides a Geocoding and reverse geocoding service through the contrib module Services.
- File geocoding, Addressfield integration, caching enabled by default.
- drush dl composer_manager
- drush dl service_container
- drush dl composer-8.x-1.x
- drush dl geocoder-7.x-2.x
- drush en geocoder -y
Have a look at the log of the installation on my computer.
Warning: I only use drush to install modules, documentation on how to install without it is to be done.
Find the documentation on the API in the README file.
Modules using Geocoder 2.x
- Maintenance status: Seeking co-maintainer(s)
- Development status: Maintenance fixes only
- Module categories: Fields, Location, Utility
- Reported installs: 32,185 sites currently report using this module. View usage statistics.
- Downloads: 245,774
- Last modified: January 31, 2016
- Stable releases receive coverage from the Drupal Security Team.
Look for the shield icon below.