Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Drupal views - CiviCRM Contact Distance Search - with a map!

Parent Feed: 

Drupal module - CiviCRM Contact Distance Search

MillerTech released this Drupal module back in 2015 but have recently updated with new features (map and use your location) and to make it more configurable.

This module offers a fully configurable/extendable Drupal view that provides the functionality to search from a postcode and a distance.

Use case scenario – Find schools from my postcode within a 5 mile radius.

With the example above you would have schools as contacts in your CiviCRM database with a primary address and both the latitude and longitude fields should be populated.

The Drupal view that’s shipped with this module can be configured to filter on a particular contact subtype i.e. schools.

Search results will provide you with schools within a 5 mile radius of the entered postcode along with distance.

Distance is calculated by road (or as the road winds or as the crow walks etc.) and NOT as the crow flies.

New features includes an option to display a map –

And also an option for your device to use your location which will populate the postcode field (works best with mobile devices for accuracy) –

CiviCRM extension page - https://civicrm.org/extensions/civicrm-contact-distance-search

Full installation steps available on the Drupal module page - https://www.drupal.org/project/civicrm_contact_distance_search

Filed under

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web