CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Proximity Search for Drupal Views
Pages: [1]

Author Topic: Proximity Search for Drupal Views  (Read 4907 times)

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Proximity Search for Drupal Views
March 23, 2011, 03:24:25 pm
I just created a new project that adds proximity search to exposed search forms in Views. The project is available on github right now - https://github.com/qjensen/CiviCRM-Proximity-Search and I hope to have it approved and available at d.o soon. In the meantime any testing, bug reports, feedback etc are greatly appreciated.

Thanks to a suggestion from Lobo, this project is built on code from the OpenLayers Proximity project.

If you have any questions, please feel free to get in touch.
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Proximity Search for Drupal Views
October 09, 2011, 11:42:38 pm
Ah - interesting - had just concluded that Proximity was an option for CiviCRM Views when working with the Open Layers module - are you suggesting this is the missing bit of the jigsaw - ie if i enable this will I then get a Proximity filter in a View that is of type CiviEvent that is using OpenLayer Data and Maps?
Pls say yes, pls, pls ;-)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Proximity Search for Drupal Views
October 10, 2011, 06:33:16 am
The module was written to work with the lat/long info stored with contact records, but I don't think it would be difficult to add event support. I am going to be out of the office much of today but I can take a look later.
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Proximity Search for Drupal Views
October 19, 2011, 08:28:46 pm
very gentle bump
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Proximity Search for Drupal Views
October 20, 2011, 02:54:22 am
Thanks for the bump. You question fell off my radar because of some other craziness - sorry for the delay.

The short answer is that it looks like this can be done. Event address isn't exposed in views currently so that would have to be included in the module before the proximity search would be available. It would require a little bit of work, but all the parts are there.
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Proximity Search for Drupal Views
October 20, 2011, 10:51:02 am
Thanks for taking the time to reply. The 'event' address actually just comes through as any other type of event - and I have them already showing on an Open Layer map. But it is on a View of type CiviEvent, not CiviContact - but maybe that isn't a problem.
I will give your code a whirl and report back.
Did you get any further in getting it on to d.o. as a fully fledged module?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Proximity Search for Drupal Views
October 20, 2011, 12:06:29 pm
I haven't had a chance to make the changes requested for the module. I decided to go back to school this fall and it has been a little more difficult than I expected to juggle all of the pieces :) Hopefully I can finish that in the next couple of weeks.

I see that newer versions of CiviCRM already have the event address field exposed. The module was originally developed on a site running 3.3 and that version is lacking an event address field. In that case it would be fairly easy to duplicate the code that is there for contacts and replicate the functionality for events. I will take a look at it later and see what would be involved.
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Proximity Search for Drupal Views
October 20, 2011, 12:21:22 pm
Thanks Q

I think this will be a nice enhancement and I will do a blog on my adventures when we get it firing. Will await an update from you when your juggling skills have encompassed this, life and study.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Proximity Search for Drupal Views
October 21, 2011, 02:42:19 am
I appreciate you may not have the time to answer or engage - but i may as well ask.
having installed your module and i now have an exposed filter including 'great circle' but I am still not getting all the bits of the puzzle
i followed http://drupal.org/node/1112308 ie unlocked 'location' and unset Force Single and Optional.
But I still get the warning that 'location not found'
My understanding is that Open Layers Proximity requires an index to be built that I presume normally works off the geocode fields of nodes. Maybe that isn't required if we already have Lat Long (which I do and the Events are showing as a Data Layer on the Map page)
admin/build/openlayers/proximity

Looks like i am also seeing a Distance field. Not sure if that is part of the puzzle but adding it made no difference.

Can you attach your View so I can fire it up and work backwards?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Proximity Search for Drupal Views
October 25, 2011, 06:00:49 pm
I have attached a copy of the view that I built with this filter for you to take a look at.

The module does use the lat/long data in the CiviCRM database, but it isn't currently event aware. I am working on updating the site that is using this module currently so I can see how it works with the newly exposed event address fields in civicrm views.

The only difference I see up front is that I have a distance field added to my view that uses the GreatCircle as its location provider.

I think the UI for presenting this needs to be cleaned up a little bit so it is easier to understand. I am glad someone else is using it so I can get feedback.

Thanks for your input.
Q
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Proximity Search for Drupal Views
October 25, 2011, 06:38:50 pm
Thanks Q - will give it a whirl soon(ish) - always happy to test and feedback and help document/promote
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

zkrebs

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Re: Proximity Search for Drupal Views
December 22, 2011, 09:41:32 am
Quote from: qjensen on October 25, 2011, 06:00:49 pm
I have attached a copy of the view that I built with this filter for you to take a look at.

The module does use the lat/long data in the CiviCRM database, but it isn't currently event aware. I am working on updating the site that is using this module currently so I can see how it works with the newly exposed event address fields in civicrm views.

The only difference I see up front is that I have a distance field added to my view that uses the GreatCircle as its location provider.

I think the UI for presenting this needs to be cleaned up a little bit so it is easier to understand. I am glad someone else is using it so I can get feedback.

Thanks for your input.
Q


What does the distance field do? How do you work with it? Can't seem to get this to work...

chiebert

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Proximity Search for Drupal Views
November 07, 2012, 03:31:21 pm
Hey qjensen and petendz: Just wondering how this all panned out, whether anyone's had a crack at porting it for D7/Views3 and Civi 4.x, and if not, where the latest version of the D6/Civi3 code lives and who wants to work at bringing it up to speed? I've got a client with geocoded data in Civi, but who's less happy with the Civi proximity search workflow and would love to be able to do this from a Views3 display and Openlayers, etc.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Proximity Search for Drupal Views
November 07, 2012, 03:42:11 pm
Good question - I can't recall off hand but don't think we had a chance to progress it further. Sorry
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

zkrebs

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Re: Proximity Search for Drupal Views
February 04, 2013, 11:31:10 am
Our organization is willing to support development for D7/views 3. We have a budget of $100, would that cover getting it upgraded?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Proximity Search for Drupal Views

This forum was archived on 2017-11-26.