[Firebug-cvs] firebug/web/gmaps db_gmap.php,1.3,1.4 db_render_xml.php,1.9,1.10
Brought to you by:
doolin
From: David M. D. <do...@us...> - 2005-06-14 20:25:06
|
Update of /cvsroot/firebug/firebug/web/gmaps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23624 Modified Files: db_gmap.php db_render_xml.php Log Message: Added weather data to gmap front end. Index: db_render_xml.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/gmaps/db_render_xml.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** db_render_xml.php 9 Jun 2005 18:55:27 -0000 1.9 --- db_render_xml.php 14 Jun 2005 20:24:57 -0000 1.10 *************** *** 71,75 **** /** TODO: Remove hardcoded db and table names. */ ! $dbname = "task"; $tblname = "gga_l"; --- 71,75 ---- /** TODO: Remove hardcoded db and table names. */ ! $dbname = "rfs_demo_06_09_2005"; $tblname = "gga_l"; *************** *** 99,104 **** die("Cannot select from table\n"); } - - /*** --- 99,102 ---- *************** *** 142,149 **** $icon = $icons[$nodeid]; $id = $ids[$i]; $title = "Firebug sensor $nodeid"; ! $address = "<line>Firebug sensor $nodeid</line>"; emit_gps_location($id,$lat,$long,$image,$icon,$title,$address); $global_id = $i; } --- 140,168 ---- $icon = $icons[$nodeid]; $id = $ids[$i]; + + $title = "Firebug sensor $nodeid"; ! ! ! $query = "SELECT temperature,humidity,pressure FROM xbow_weather_l where nodeid = $nodeid"; ! $result = @pg_query($dbh,$query); ! if(!result) { ! die("Cannot select from table\n"); ! } ! ! $wrow = pg_fetch_array($result, NULL, PGSQL_ASSOC) or perr("db_render_xml", "Cannot retrieve data"); ! $temp = $wrow["temperature"]; ! $humidity = $wrow["humidity"]; ! $pressure = $wrow["pressure"]; ! ! $address = "<line>Firebug sensor $nodeid</line><line>Temp: $temp C</line><line>Rel. Hum: $humidity%</line><line>Press: $pressure mBar</line>"; ! emit_gps_location($id,$lat,$long,$image,$icon,$title,$address); $global_id = $i; + + + + + } *************** *** 171,176 **** $lat = 37.918128; $long = 122.33185; ! $address = "<line>Here be spiders...</line>\n<line>Building 454, Room 1</line>"; ! $image = "/firebug/images/spider.png"; //print($icon); --- 190,195 ---- $lat = 37.918128; $long = 122.33185; ! $address = "<line>Nick's office</line>\n<line>Building 454, Room 1</line>"; ! $image = "images/sitar.jpg"; //print($icon); Index: db_gmap.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/gmaps/db_gmap.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_gmap.php 9 Jun 2005 03:53:08 -0000 1.3 --- db_gmap.php 14 Jun 2005 20:24:56 -0000 1.4 *************** *** 26,30 **** } ! t.dump = function(a) {alert(a);} //debugging function _loadXmlFileFromURL(url, mapApp) { --- 26,30 ---- } ! //t.dump = function(a) {alert(a);} //debugging function _loadXmlFileFromURL(url, mapApp) { |