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) »
  • Mapping and sorting Views
Pages: [1]

Author Topic: Mapping and sorting Views  (Read 1332 times)

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Mapping and sorting Views
July 13, 2012, 11:45:15 am
Has anyone ever used Views and gmaps to display data?

I am trying to query organization data, and map 10 of the nearest to whatever zipcode is entered.

example I enter 10001 and want the 10 libraries closest to me.

it's easy to turn the fields on and off in views, but I can't seem to get the location to work.

B.

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: Mapping and sorting Views
July 13, 2012, 01:39:35 pm
See if search -> custom searches -> proximity search suits your needs:

http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=6&reset=1

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: Mapping and sorting Views
July 13, 2012, 01:42:34 pm
Actually just noticed the demo doesn't have an API key (http://drupal.demo.civicrm.org/civicrm/admin/setting/mapping?reset=1), but the idea is that you can do the search and then can map all or some of the resulting contacts on a google map from there.

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: Mapping and sorting Views
July 13, 2012, 03:13:16 pm
we did a fair bit of proof of concept with OpenLayers using civi data - have a read here http://forum.civicrm.org/index.php/topic,18572.msg91263.html#msg91263
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

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: Mapping and sorting Views
July 13, 2012, 04:15:59 pm

bdanza:

if you do solve your problem, can you please post back your solution :)

I'd love to use that feature for the school to help facilitate car-pooling. i.e. give me the 10 closest school families who have kids in the middle school who live near me

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

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: Mapping and sorting Views
July 13, 2012, 04:32:21 pm
Can you use tags/groups to indicate "middle school" and then use proximity custom search, or am I misunderstanding this thread?

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: Mapping and sorting Views
July 13, 2012, 06:30:00 pm
I am going to have 5000 library records in civicrm, they are all going to offer varying levels of services.

Basically, what I am trying to do is build a full locator tool with out of the box tools,  if that doesn't work I will simply have to write it as a custom query.

basically I want to do this
http://www.fiveguys.com/locations.aspx?fAddress=20007&radius=5&units=mi

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: Mapping and sorting Views
July 13, 2012, 08:38:57 pm

i think you can take this search:

http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=6&reset=1

and modify it as follows:

1. Add a parameter to limit the number of contacts to display that are closest to the zip code / address

2. Display the results as a map instead of a listing

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

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Mapping and sorting Views
July 27, 2012, 07:52:16 am
I was able to map with Views and OpenLayers. Actually I think I prefer this method over the "Profile" method in CiviCRM.

It's not too bad once you understand that OpenLayers is a circular reference to itself with two views. First one to get the data inline to be used as an overlay layer on the actual "map" view.

Let me know if you need more details.  Took me a while cause often times people have a basic understanding of the module when explaining it so those new to a module sometimes have to read extensively to understand how it works rather than the simple explanation I give above.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: Mapping and sorting Views
July 27, 2012, 07:57:06 am
I would love some more detail if you have it, hit me up on the gchat bdanza@ gmail

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Mapping and sorting Views
July 27, 2012, 08:25:04 am
You should have a request from me for gtalk.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

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

This forum was archived on 2017-11-26.