Hi, I'm creating a location map, this works for multi values from db.
PHP Code:
while($row = mysql_fetch_array( $result )) {
$lat=$row['lat'];
$lon=$row['lon'];
$pt = getlocationcoords($lat, $lon, $scale_x, $scale_y);
imagefilledrectangle($im,$pt["x"]-2,$pt["y"]-2,$pt["x"]+2,$pt["y"]+2,$dotcolor);
}
problem is I need to do this with 2 pairs of lat and lon with a foreach
not sure of the format how to do this or how to use the key/s properly
PHP Code:
$cord;
$cord["lat1"] = $lat1;
$cord["lon1"] = $lon1
$cord["dotcolor1"] = $dotcolor1;
$cord["lat2"] = $lat2;
$cord["lon2"] = $lon2
$cord["dotcolor2"] = $dotcolor2;
foreach( $cord as $key => $value){
//$pt = getlocationcoords($lat, $lon, $scale_x, $scale_y);
//imagefilledrectangle($im,$pt["x"]-2,$pt["y"]-2,$pt["x"]+2,$pt["y"]+2,$dotcolor);
}
Thanks
Sonny