I have done it. For those who would like to see the dynamically
generated .gpx file to be used for GPS devices:
http://ozcamps.net/gpx.php
For those interested in the PHP code I used to generate this:
_____________________________________________________
<?php require_once('Connections/conOzcamps.php');
mysql_select_db($database_conOzcamps, $conOzcamps);
$query_rsMap = "SELECT tblholiday.Title, tblholiday.Lat,
tblholiday.`Long` FROM tblholiday WHERE tblholiday.`Delete`=0";
$rsMap = mysql_query($query_rsMap, $conOzcamps) or die(mysql_error());
$row_rsMap = mysql_fetch_assoc($rsMap);
$totalRows_rsMap = mysql_num_rows($rsMap);
?>
<?php
// Send the headers
# This line will stream the file to the user rather than spray it
across the screen
header("Content-type: application/octet-stream");
# replace excelfile.xls with whatever you want the filename to default
to
header("Content-Disposition: attachment; filename=ozcamps.gpx");
header("Pragma: no-cache");
header("Expires: 0");
?>
<?php echo('<?xml version="1.0" encoding="UTF-8"?><gpx xmlns="http://
www.topografix.com/GPX/1/1" xmlns:xalan="http://xml.apache.org/xalan"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creator="Brett
Kinross" version="1.1">
<metadata><name><![CDATA[OzCamps]]></name><desc><![CDATA[OzCamps -
Independent Camping for Australia]]></desc><author><name><![CDATA
[Brett Kinross]]></name></author></metadata><name>OzCamps</name>
'); ?>
<?php if ($totalRows_rsMap > 0) { // Show if recordset not empty ?>
<?php do { ?>
<wpt lat="<?php echo $row_rsMap['Lat']; ?>" lon="<?php echo
$row_rsMap['Long']; ?>">
<name><?php echo $row_rsMap['Title']; ?></name>
<?php /*?> <?php foreach ($row_rsMap as
$column=>$value) { ?>
<<?php echo $column; ?>><![CDATA[<?php echo
$row_rsMap[$column]; ?>]]
></<?php echo $column; ?>>
<?php } ?><?php */?>
</wpt>
<?php } while ($row_rsMap = mysql_fetch_assoc($rsMap)); ?>
</gpx>
<?php } // Show if recordset not empty ?>
<?php
mysql_free_result($rsMap);
?>
________________________________________
Cheers
Brett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---