Zip code proximity search drupal 7




















DevOps Continuous integration, monitoring, and trouble-free deployments. Technical Audit Assess an existing implementation to find the top opportunities for improvement. Upgrade Get Sitecore's latest and greatest marketing powers. Migrate Easily move content, templates, workflows, and more to Sitecore.

Marketing Boost Maximize Sitecore's advanced marketing capabilities. Commerce Create experience-focused commerce with Sitecore. Test Automation Ensure an error-free site before—and after—launch. If each provider had only one office, sorting by and displaying proximity information would be reasonably easy.

But many providers have more than one office. I could not find a module to solve this problem. Each provider is a node of a particular content type. Office locations are stored in a multi-valued field provided by the Location module an alternative to Addressfield that, at least the time of original implementation, was more reliable and full-featured.

Recent versions of Solr support proximity search on multi-value geo fields, but no Drupal module I could find takes advantage of that capability. Search API Location covers a lot of the ground, but out of the box it only works for single-value location fields provided by the Geofield module. The following description of the solution assumes that you are reasonably familiar with the workings of Search API and Search API Solr and assumes that you have set up geocoding for your Location field.

PHPDoc function headers have been stripped out to make the code listings shorter. I was able to setup a user proximity search for D7 with the following combo of geo modules on drupal. To get it to work you will have to add an address field and a geofield to the user profile.

Set the geofield to "Geocode from another field" and it will automatically store the correct geo location info from the address field. Then in a user view you can use the Proximity filters supplied by the github module for filtering proximity on address,zip-codes etc etc.

Within a certain distance. There is also a features module that has great views example for a regular node proximity search.

This module uses the same module recipe from above except for the proximity module but the github code will work as well because it forked from the original and just adds entity support for user locations.

Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. User proximity search? Ask Question. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science.

Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related 0.

Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.



0コメント

  • 1000 / 1000