Geolocation Field provides a field type to store geographical locations as pairs of latitude and longitude (lan,lng). The Drupal 8 version also provides a views proximity search plugin. Geolocation Field can be used with all fieldable entities like nodes, users, comments, taxonomy terms, etc.
Geolocation Field aims to provide a light-weight, easy-to-use and robust alternative to more complex solutions.
The Drupal 8 version of Geolocation Field is a complete rewrite. Please test and open an issue to fix a bug or share your thoughts.
If you need paid support beyond the issue queue, you can drop a message to the main D8 developer
- field storage of lat,lng pairs
- basic lat,lng text input widget
- basic lat,lng formatter with microdata output (rich snippet: twig template).
- configurable Google Maps formatter
- proximity field
- proximity filter
- boundary filter
- proximity sort
- CommonMap views style - display multiple results on the same map
- Ajax Views support - AirBnB like formatter
- Lots of tests
- Google Places API geocoding support
- Geolocation Demo - views and feature demos
- Geolocation Street View - additionally to the geolocation, control and store the street view perspective
- Plain text (input & output)
- Google Maps (input & output)
- Geolocation HTML5 (input & output)
- Geolocation Proximity for proximity/distance based view results.
- 7.x-1.x-dev Google Maps Geocoder (backport of Drupal 8 version)
- 7.x-1.x-dev Template based microdata formatter (backport of Drupal 8 version)
Technical background (Drupal 7/Drupal 8)
At the moment Geolocation stores the following values in the database:
- lat (latitude),
- lng (longitude),
- lat_sin (precalculated latitude sine),
- lat_cos (precalculated latitude cosine),
- lng_rad (precalculated radian longitude).
The precalculated values will speed up proximity SQL look ups.
- Maintenance status: Actively maintained
- Development status: Under active development
- Reported installs: 19,384 sites currently report using this module. View usage statistics.
- Downloads: 144,399
- Automated tests: Enabled
- Last modified: March 9, 2017
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.