Nice page! Any chance of publishing how you created the page and the listening service? I'm not a coder,
Neither am I....
I especially like the fact that you are displaying the "streets and roads" view rather than the satellite imagery!
Basically it was for my customers, and Satellite view was too confusing...
So, the inside : a very dirty phpmysql code :
publish page code example :
<?php
$lat = $_GET['lat'];
$long = $_GET['long'];
$time = $_GET['time'];
$id = $_GET['id'];
$user = "*******";
$host = "localhost";
$password = "********";
$database = "gps";
$cxn = mysql_connect($host,$user,$password)
or die ("connexion impossible");
mysql_select_db($database);
$query = "INSERT INTO `geoloc` ( `long` , `lat` , `time` , `id` )
VALUES ('$long','$lat','$time','$id')";
$result = mysql_query($query)
or die ("Requete impossible.");
echo "<DIV ALIGN=CENTER>Derniere mise a jour de la base <br> <br> <b>$time</b>";
echo "<br> <br> <a href=http://maps.google.com/staticmap?center=$lat,$long&zoom=11&size=250x210&format=png32&frame=true&maptype=mobile&markers=$lat,$long,redt&key=ABQIAAAAUqaeoI9pEzpRF07mouEtuRRq8q6wEl7v2HTtTICzSod2DfI23xSz2kPtXn9ZWtmRvHdmq8NVfH4wsg>Carte</a>";
echo "</DIV>";
?>
View page code :
<?php
$user="******";
$host="localhost";
$password="*******";
$cxn = mysql_connect($host,$user,$password)
or die ("Couldn't connect to server");
$db = mysql_select_db("gps")
or die ("Couldn't select database");
$query = 'SELECT `long` , `lat` , `time` , `id` FROM `geoloc` WHERE 1 ORDER BY `time` DESC LIMIT 0, 1';
$result = mysql_query($query)
or die ("Couldn't execute query.");
while($row = mysql_fetch_assoc($result))
{
extract($row);
echo "<script type=\"text/javascript\">\n";
echo "function initialize() { \n";
echo "if (GBrowserIsCompatible()) {\n";
echo " var map = new GMap2(document.getElementById(\"map_canvas\"))\n";
echo "map.setMapType(G_NORMAL_MAP)\n";
echo "map.addControl(new GSmallMapControl())\n";
echo "map.addControl(new GMapTypeControl())\n";
echo "map.setCenter(new GLatLng($lat,$long),14)\n";
echo "map.addOverlay(new GMarker(new GLatLng($lat,$long)))\n";
echo " }\n";
echo "}\n";
echo "</script>\n";
}
?>