Geolocation Field Overview

Geolocation Field provides a field type to store geographical locations as pairs of latitude and longitude (lan,lng). Currently, a stable and secure version exists for both Drupal 7 and 8. Since the Drupal 8 version was a complete rewrite the two modules differ in functionality and will be handled separately below. The documentation is currently far behind the module itself, so please feel free to submit any 'how tos' or detailed directions on configuring and using this module.

With the increased use of mobile, the importance and the potential of Geolocation increase every day. Geolocation continues to prove itself a vital aspect of monetizing websites as the benefits of "localizing" web content for the advertiser, the vendor, and the user become clearer. With that in mind, be inspired to contribute, comment, or test!

Mission:
Geolocation Field aims to provide a light-weight, easy-to-use and robust alternative to more complex solutions.

Current Goals: [a top five hit list here]

Geolocation Field for Drupal 7:

Geolocation Field remains a key part of the Geolocation modules for Drupal 7. The module is a light-weight alternative to the Geofield module, since it does not automatically enable its own widgets, but implements the widgets in submodules.

Users of Address field can use Geolocation Field to geocode their address using the Geocoder helper module.

Other helper modules include:

Geolocation Field for Drupal 8:

See https://www.drupal.org/docs/8/modules/geolocation-field

Comments

windsurfitaly’s picture

how to show the distance between the point of the node is the user viewing, from the user home point set in his profile?

simonsoftware’s picture

I've a node that contains a WKT closed POLIGON (in a field named "percorso_area") and i have a POI list (with a field named "latlon") with a POINT. I've tried to use a view to get all POI's contained by the POLYGON using a Geolocation Relation ST_CONTAINS but i have this error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'node__field_latlon.field_latlon_geometry' in 'on clause': SELECT "node_field_data"."created" AS "node_field_data_created", "node_field_data"."nid" AS "nid", "node_field_data__nid"."nid" AS "node_field_data__nid_nid" FROM {node_field_data} "node_field_data" LEFT JOIN {node__field_percorso_area} "node__field_percorso_area" ON node_field_data.nid = node__field_percorso_area.entity_id AND node__field_percorso_area.deleted = :views_join_condition_0 INNER JOIN {node__field_percorso_area} "node__field_percorso_area2" ON ST_Within(node__field_latlon.field_latlon_geometry, node__field_percorso_area2.field_percorso_area_geometry) INNER JOIN {node_field_data} "node_field_data__nid" ON node__field_percorso_area2.entity_id = node_field_data__nid.nid WHERE ("node_field_data"."status" = :db_condition_placeholder_1) AND ("node_field_data__nid"."type" IN (:db_condition_placeholder_2)) ORDER BY "node_field_data_created" DESC LIMIT 11 OFFSET 0; Array ( [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => distributore [:views_join_condition_0] => 0 )

Someone can help me?