$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

webgeer’s picture

Status: Active » Fixed

I 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

Anonymous’s picture

Status: Fixed » Closed (fixed)