Closed (fixed)
Project:
Location
Version:
6.x-3.1-rc1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Jul 2009 at 07:21 UTC
Updated:
20 Jun 2011 at 17:12 UTC
I am trying to create Gmaps that show the node location as one type of marker (green for example) and then the neighboring similar types of node types as another marker (say orange). I have seen this on a lot of web sites. All my nodes are entered using the location module CCK fields and use views to produce a Gmap of the node location. The view shows the node using the argument Node ID NId, but what other argument would be needed to add the neighboring locations in another marker color to the map and how do they work together? Thanks
Comments
Comment #1
rooby commentedSome of this related to location and some gmap.
How do you determine what is neighbouring? Do you want to use the distance between the focus node and the other nodes to determine this?
If so this is what I would do:
* For the argument (which will be the nid of the main location) use the Global: Null argument. Otherwise, if you use the regular nid argument you can only show the main location OR the neighbouring locations, not both.
* You can also use the "Center on node argument" and "Highlight marker for node argument" options if you want that main location to stand out more. These settings are in the style settings for the gmap views style.
* Also in the gmap style settings for the view you want to select "By content type" for the "Marker handling:" option. This will allow different marker colours for different content types.
* Then add a filter "Location: Distance / Proximity" and for the "Origin" select "Node's Latitude / Longitude from views nid argument", for the "Node ID argument to use: " option select "Global: Null", for the "Location to use: " option select the cck location field you are using and for the "Distance: " option enter the distance from the main node you want to use to determine which nodes are neighbouring.
That views set up will give you all nodes within the distance you entered of the main node (including the main node).
To select what colour markers to use for each content type go to admin/settings/gmap_location
You need to be using at least location 3.1 and gmap 1.1 for some of this funcitonality.
Comment #2
einpol commentedvery nice explanation. thanks for the heads up!
Comment #4
guillaumeg2 commentedrooby, i have one question :
- i follow your explanation but it doesn't work for me. I have location 3.1 and gmap 1.1, i have build a view but there is no result when i add the filter "Location: Distance / Proximity". Do you have any idea of what i have done wrong?
Thank you in advance, and sorry for my english (i'm french).
Comment #5
guillaumeg2 commentedrooby, i solve my problem thanks to you :
http://drupal.org/node/718928#comment-3162664
-> i used the nid option