Closed (fixed)
Project:
GMap Module
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 May 2006 at 07:02 UTC
Updated:
27 Jun 2006 at 05:16 UTC
$resultb=db_query("SELECT * FROM {location} WHERE (longitude !=0 OR latitude !=0) AND type='user'");
while ($u=db_fetch_object($resultb)) {
$buddyfrom['point']= $u->latitude.','.$u->longitude;
$buddylist = buddylist_get_buddies($u->oid);
foreach ($buddylist as $buddy_uid => $buddy) {
$resultbuddy=db_query("SELECT * FROM {location} WHERE oid=$buddy_uid AND (longitude !=0 OR latitude !=0) AND type='user'");
while ($ubuddy=db_fetch_object($resultbuddy)) {
$buddyto['point']= $ubuddy->latitude.','.$ubuddy->longitude;
$myline .= "var polyline = new GPolyline([ new GLatLng(".$buddyfrom['point']."), new GLatLng(".$buddyto['point'].") ],
'#DDFFAA', "."3".");
usermap.addOverlay(polyline);";
}
}
Draws a line in the defined color and thinkness (here #DDFFAA, 3) between "buddied" users.
Looks like http://drupaler.net/map/users
Comments
Comment #1
webgeer commentedI have now implemented this in the cvs version. The method I used was different (and more in keeping with the gmap methodology). I have left it as the default line type and I have not made any switch to turn this on or off (If you have the buddylist module installed, it will be on)
James
Comment #2
(not verified) commented