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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • using latitude and longtidue
Pages: [1]

Author Topic: using latitude and longtidue  (Read 3328 times)

CousiMo

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 2
using latitude and longtidue
April 22, 2008, 11:43:57 am
is there a way to calcualte how many miles the contact is from our location.?

if we are hosting an event, we would like to invite participants living within 60 miles,

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: using latitude and longtidue
April 22, 2008, 12:32:59 pm

no
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

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: using latitude and longtidue
April 23, 2008, 12:45:53 am
How important is it for you? I have been looking in to some GIS options. I doubt this would be that tricky. I can't offer any advice but would be happy to share ideas on approach. Basically it requires querying the database for any contacts whose geocoords fit within the polygon defined by , in your case, the circle centred on your location.
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

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: using latitude and longtidue
April 23, 2008, 08:22:29 am
Check out Drupal's proximity searches - I think they do this well. You may be able to create a custom view that would include the location lat/long and then be able to leverage the views proximity functionality. You may want to also explore usernode, nodeprofile and location modules if necessary.

Not sure whether Joomla! has this functionality.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: using latitude and longtidue
April 28, 2008, 02:36:33 am

I borrowed liberally from drupal's location module and hacked a custom search to do this. You can get the custom search code here:

http://svn.civicrm.org/civicrm/trunk/CRM/Contact/Form/Search/Custom/Proximity.php

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • using latitude and longtidue

This forum was archived on 2017-11-26.