[Firebug-cvs] firebug/web/postgres db_gmap.php,NONE,1.1 db_gmap.php~,NONE,1.1 db_render_xml.php,NONE
Brought to you by:
doolin
From: Karthik D. <da...@us...> - 2005-06-08 20:35:44
|
Update of /cvsroot/firebug/firebug/web/postgres In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20201 Modified Files: db_select.php db_table_buttons.php Added Files: db_gmap.php db_gmap.php~ db_render_xml.php db_render_xml.php~ db_xml_create.php db_xml_create.php~ geocodeinfo_rfs.xsl gmaps.html gmaps.xml gmaps_update.php hello.php Log Message: New code for working on gmaps. KAR. --- NEW FILE: db_gmap.php --- <html> <head> <title>Richmond Field Station Experiment</title> <script src="http://google.com/maps?file=js&hl=en" type="text/javascript"> </script> <script type="text/javascript"> _mSiteName = 'Richmond Field Station'; _mUsePrintLink=""; function initMap() { // // frb // myMapApp = new _MapsApplication(document.getElementById("container_frb"), document.getElementById("panel"), document.getElementById("metapanel"), document.getElementById("permalink"), document.getElementById("toggle"), document.getElementById("printheader")); myMapApp.loadMap(); /* Note: All XML & XSL files must be on same domain. */ _loadXmlFileFromURL("/firebug/web/gmaps/db_render_xml.php", myMapApp); } t.dump = function(a) {alert(a);} //debugging function _loadXmlFileFromURL(url, mapApp) { // // Loads the specified external XML file into the map view. // // frb // // NOTE: URL must be on same domain as page. var _getter = _XMLHttp.create(); _getter.open("GET", url); _getter.onreadystatechange=function() { if (_getter.readyState==4) { mapApp.loadXML(_getter.responseText); } } _getter.send(null); // Whoops, IE *needs* this to be last, Moz is lenient. } </script> <style type="text/css"> #panel table { border:solid 1px grey; width:50%; margin-bottom: 5px; } #panel table td:first-child { width: 24px; } .label { font-size:smaller; font-family:sans-serif; }; </style> </head> <body onload="initMap()"> <!----> <?php include("db_xml_create.php"); ?> <!-- Note: Map height always maximum? --> <div style="position:absolute;left:5px;top:10px;right:5px;border:solid thin grey;"> <div id="container_frb" style="float:right;width:35%;" > </div> <div style="float:left;position:relative;left:10px;width:60%"> <div style="position:absolute;left:0px;top:0px;width:50%;overflow:auto;"> <h1 style="font-family:sans-serif;font-size:medium;">Richmond Field Station Demo</h1> <p><dl> Sensor data last updated: </dl> </p> </div> <div style="position:absolute;left:50%;top:5px;width:50%;"> <div id="toggle" style="position:absolute;top:0px:left:10px;font-family:sans-serif;font-size:smaller;"> </div> <div style="position:absolute;top:30px;left:5px;"> <div id="panel" style="height:90%;width:100%;"> </div> <div id="metapanel">metapanel</div> <div id="permalink">permalink</div> <div id="printheader">header</div> </div> </div> </div> </div> <!-- </body> </html> --- NEW FILE: db_xml_create.php~ --- <?php if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } $dbname = $HTTP_SESSION_VARS["dbname"]; $tblname = $HTTP_SESSION_VARS["tblname"]; print("<h1>Mote activity: Database $dbname, table $tblname</h1>"); include("db_table_buttons.php"); $dbh = connect_postgres($dbname); $statement = "SELECT a.attname FROM pg_attribute a,pg_class c where c.relname ='$tblname' and a.attrelid = c.oid and a.attnum > 0"; $stat = @pg_exec($dbh,$statement); if (!$stat) { print "<strong>ERROR</strong>: Could not retrieve table header column names for<strong>".strtoupper($tblname)."</strong>."; } else { $statement = "SELECT * FROM $tblname"; $stat = @pg_exec($dbh,$statement); if (!$stat) { print "<strong>ERROR</strong>: Could not access table <strong>".strtoupper($tblname)."</strong>."; } else { /* function print_row($item2,$key) { print ("<td style=\"border-right: solid\" align=\"center\">\n"); echo "$item2\n"; print ("</td>\n"); } */ /*** * * ***** FIXME ********* * The field labels are hardcoded in here. * You have to change the labels for this to work. * ***/ $rows = pg_numrows($stat); /*** * * Setting up google maps specific stuff * * $ids contains the ten ids that you can associate * with locations * * $ imgs lists the image icons that you can have * ***/ $ids=array('A','B','C','D','E','F','G','H','I','J'); $imgs=array('http://libgmail.sourceforge.net/man.png', 'http://libgmail.sourceforge.net/spider.png'); $fh=fopen("gmaps2.xml", "w") or perr("db_xml_create", "unable to create file"); for ($i=0;$i<$rows;$i++) { fprintf($fh, "<location infoStyle=\"geocodeinfo_rfs.xsl\" id=\"%s\">\n", $ids[$i]) or perr("db_xml_create", "Cant fprintf"); $row = array_values(pg_fetch_row($stat,$i)) or perr("db_xml_create", "Cannot retrieve data"); foreach ($rows as $key => $value) { switch($key) { case "latitudedegree": $latdeg=$value; break; case "latitudeminutes": $latmin=$value; break; case "longitudedegree": $longdeg=$value; break; case "longtudeminute": $longmin=$value; break; default: $disp[$key]=$value; } } $lat = $latdeg + ($latmin/60.0); $long = $longdeg + ($longmin/60.0); print("Now printing values into the xml file\n"); fprintf($fh, "<point lat=\"%f\" lng=\"%f\"/>\n", $lat, $long) or perr("db_xml_create", "1"); fprintf($fh, "<icon image=\"%s\" class=\"local\"/>\n", $imgs[0]); fprintf($fh, $str1) or perr("db_xml_create","3"); fprintf($fh, "<info>") or perr("db_xml_create","4"); fprintf($fh, "<title xml:space=\"preserve\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">\n") or perr("db_xml_create","5"); fprintf($fh, "</title>\n") or perr("db_xml_create","6"); print("Halfway done\n") or perr("db_xml_create","7"); fprintf($fh, "<address>\n") or perr("db_xml_create","8"); fprintf($fh, "<line>Ms. Eva Green</line>\n") or perr("db_xml_create","9"); fprintf($fh, "</address>\n") or perr("db_xml_create","10"); fprintf($fh, "<image>\n") or perr("db_xml_create","11"); fprintf($fh, "http://www.google.co.nz/images/logo_sm.gif\n") or perr("db_xml_create","12"); fprintf($fh, "</image>\n") or perr("db_xml_create","13"); fprintf($fh, "</info>\n") or perr("db_xml_create","14"); } } print("Done with all\n"); pg_close($dbh); fclose($fh); } ?> --- NEW FILE: gmaps_update.php --- <?php --- NEW FILE: geocodeinfo_rfs.xsl --- <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:apply-templates select="location"/> </xsl:template> <xsl:template match="location"> <div style="padding-right: 8px; margin-top: 2px"> <xsl:apply-templates select="info"/> </div> </xsl:template> <xsl:template match="info"> <xsl:variable name="page" select="../@arg0"/> <xsl:variable name="address"> <xsl:for-each select="address/line"> <xsl:if test="position() > 1">, </xsl:if> <xsl:value-of select="."/> </xsl:for-each> </xsl:variable> <div style="font-weight: bold">Custom!</div> <div> <img> <xsl:attribute name="src"> <xsl:value-of select="image"/> </xsl:attribute> </img> </div> <div style="font-size: small; margin-top: 14px"> <xsl:apply-templates select="address/line"/> </div> </xsl:template> <xsl:template match="line"> <div style="margin-top: 2px"><xsl:value-of select="."/></div> </xsl:template> <xsl:template name="getSingleLineAddress"> <xsl:for-each select="address/line"> <xsl:if test="position() > 1">, </xsl:if> <xsl:value-of select="."/> </xsl:for-each> </xsl:template> </xsl:stylesheet> Index: db_select.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/postgres/db_select.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_select.php 6 Jun 2005 19:23:19 -0000 1.3 --- db_select.php 8 Jun 2005 20:35:33 -0000 1.4 *************** *** 9,13 **** ! <form action="db_table_select.php" method="post"> <?php --- 9,13 ---- ! <form action="db_gmap.php" method="post"> <?php --- NEW FILE: db_render_xml.php~ --- <?php if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } $dbname = $HTTP_SESSION_VARS["dbname"]; $tblname = $HTTP_SESSION_VARS["tblname"]; $dbh = connect_postgres($dbname); $statement = "SELECT a.attname FROM pg_attribute a,pg_class c where c.relname ='$tblname' and a.attrelid = c.oid and a.attnum > 0"; $stat = @pg_exec($dbh,$statement); $statement = "SELECT * FROM $tblname"; $stat = @pg_exec($dbh,$statement); /*** * * ***** FIXME ********* * The field labels are hardcoded in here. * You have to change the labels for this to work. * ***/ $rows = pg_numrows($stat); /*** * * Setting up google maps specific stuff * * $ids contains the ten ids that you can associate * with locations * * $ imgs lists the image icons that you can have * ***/ $ids=array('A','B','C','D','E','F','G','H','I','J'); $imgs=array('http://libgmail.sourceforge.net/man.png', 'http://libgmail.sourceforge.net/spider.png'); for ($i=0;$i<$rows;$i++) { printf("<location infoStyle=\"geocodeinfo_rfs.xsl\" id=\"%s\">\n", $ids[$i]) or perr("db_xml_create", "Cant fprintf"); $row = array_values(pg_fetch_row($stat,$i)) or perr("db_xml_create", "Cannot retrieve data"); foreach ($rows as $key => $value) { switch($key) { case "latitudedegree": $latdeg=$value; break; case "latitudeminutes": $latmin=$value; break; case "longitudedegree": $longdeg=$value; break; case "longtudeminute": $longmin=$value; break; default: $disp[$key]=$value; } } $lat = $latdeg + ($latmin/60.0); $long = $longdeg + ($longmin/60.0); printf("<point lat=\"%f\" lng=\"%f\"/>\n", $lat, $long) or perr("db_xml_create", "1"); printf("<icon image=\"%s\" class=\"local\"/>\n", $imgs[0]); print("<info>") or perr("db_xml_create","4"); print("<title xml:space=\"preserve\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">\n") or perr("db_xml_create","5"); print("</title>\n") or perr("db_xml_create","6"); print("<address>\n") or perr("db_xml_create","8"); print("<line>Ms. Eva Green</line>\n") or perr("db_xml_create","9"); print("</address>\n") or perr("db_xml_create","10"); print("<image>\n") or perr("db_xml_create","11"); print("http://www.google.co.nz/images/logo_sm.gif\n") or perr("db_xml_create","12"); print("</image>\n") or perr("db_xml_create","13"); print("</info>\n") or perr("db_xml_create","14"); } pg_close($dbh); ?> --- NEW FILE: db_render_xml.php --- <p> <?php include("connect.php"); /* if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } $dbname = $HTTP_SESSION_VARS["dbname"]; $tblname = $HTTP_SESSION_VARS["tblname"]; */ print("<?xml version=\"1.0\"?>\n"); print("<page>\n"); print("<title>Richmond Field Station Demo</title>\n"); print("<query>Demo?</query>\n"); print("<request/>\n"); print("<center lat=\"37.9177\" lng=\"-122.332\"/>\n"); print("<!-- Original -->\n"); print("<!--\n"); print("<span lat=\"0.0179\" lng=\"0.027586\"/>\n"); print("-->\n"); print("<span lat=\"0.002\" lng=\"0.003\"/>\n"); print("<overlay panelStyle=\"sidepanel.xsl\">\n"); $dbname = "task"; $tblname = "gga_l"; $dbh = connect_postgres($dbname); $statement = "SELECT a.attname FROM pg_attribute a,pg_class c where c.relname ='$tblname' and a.attrelid = c.oid and a.attnum > 0"; $stat = @pg_exec($dbh,$statement); if(!stat) { die("Cannot select from database\n"); } $statement = "SELECT * FROM $tblname"; $stat = @pg_exec($dbh,$statement); if(!stat) { die("Cannot select from table\n"); } /*** * * ***** FIXME ********* * The field labels are hardcoded in here. * You have to change the labels for this to work. * ***/ $rows = pg_numrows($stat); /*** * * Setting up google maps specific stuff * * $ids contains the ten ids that you can associate * with locations * * $ imgs lists the image icons that you can have * ***/ $ids=array('A','B','C','D','E','F','G','H','I','J'); $imgs=array('http://libgmail.sourceforge.net/man.png', 'http://libgmail.sourceforge.net/spider.png'); for ($i=0;$i<$rows;$i++) { printf("<location infoStyle=\"geocodeinfo_rfs.xsl\" id=\"%s\">\n", $ids[$i]) or perr("db_xml_create", "Cant fprintf"); $row = array_values(pg_fetch_row($stat,$i)) or perr("db_xml_create", "Cannot retrieve data"); foreach ($rows as $key => $value) { switch($key) { case "latitudedegree": $latdeg=$value; break; case "latitudeminutes": $latmin=$value; break; case "longitudedegree": $longdeg=$value; break; case "longtudeminute": $longmin=$value; break; default: $disp[$key]=$value; } } $lat = $latdeg + ($latmin/60.0); $long = $longdeg + ($longmin/60.0); printf("<point lat=\"%f\" lng=\"%f\"/>\n", $lat, $long) or perr("db_xml_create", "1"); printf("<icon image=\"%s\" class=\"local\"/>\n", $imgs[0]); print("<info>") or perr("db_xml_create","4"); print("<title xml:space=\"preserve\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">\n") or perr("db_xml_create","5"); print("</title>\n") or perr("db_xml_create","6"); print("<address>\n") or perr("db_xml_create","8"); print("<line>Ms. Eva Green</line>\n") or perr("db_xml_create","9"); print("</address>\n") or perr("db_xml_create","10"); print("<image>\n") or perr("db_xml_create","11"); print("http://www.google.co.nz/images/logo_sm.gif\n") or perr("db_xml_create","12"); print("</image>\n") or perr("db_xml_create","13"); print("</info>\n") or perr("db_xml_create","14"); } pg_close($dbh); ?> </p> --- NEW FILE: gmaps.xml --- <?xml version="1.0"?> <page> <title>Custom XSL Demo</title> <query>Why?</query> <request/> <center lat="37.9177" lng="-122.332"/> <!-- Original --> <!-- <span lat="0.0179" lng="0.027586"/> --> <span lat="0.002" lng="0.003"/> <overlay panelStyle="sidepanel.xsl"> <location infoStyle="geocodeinfo_rfs.xsl" id="A"> <point lat="37.91" lng="-122.33"/> <icon image="http://libgmail.sourceforge.net/man.png" class="local"/> <info> <title xml:space="preserve" xmlns:xml="http://www.w3.org/XML/1998/namespace"> </title> <address> <line>Mr G. Oogle</line> </address> <image> http://www.google.co.nz/images/logo_sm.gif </image> </info> </location> <location infoStyle="geocodeinfo_rfs.xsl" id="B"> <point lat="37.915" lng="-122.332"/> <icon image="http://maps.google.com/mapfiles/marker.png" class="local"/> <info> <title xml:space="preserve" xmlns:xml="http://www.w3.org/XML/1998/namespace"/> <address> <line>Here be spiders...</line> </address> <image> http://libgmail.sourceforge.net/spider.png </image> </info> </location> <location infoStyle="geocodeinfo_rfs.xsl" id="C"> <point lat="37.91862" lng="-122.3324"/> <icon image="http://maps.google.com/mapfiles/marker.png" class="local"/> <info> <title xml:space="preserve"/> <address> <line>Building 454, Room 124</line> </address> <image> http://libgmail.sourceforge.net/man.png </image> </info> </location> </overlay> </page> Index: db_table_buttons.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/postgres/db_table_buttons.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** db_table_buttons.php 7 Jun 2005 00:43:19 -0000 1.4 --- db_table_buttons.php 8 Jun 2005 20:35:33 -0000 1.5 *************** *** 1,5 **** ! <form action="db_table_select.php" method="post"> <?php --- 1,5 ---- ! <form action="db_gmap.php" method="post"> <?php --- NEW FILE: db_xml_create.php --- <?php if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } $dbname = $HTTP_SESSION_VARS["dbname"]; $tblname = $HTTP_SESSION_VARS["tblname"]; // print("<h1>Mote activity: Database $dbname, table $tblname</h1>"); // include("db_table_buttons.php"); $dbh = connect_postgres($dbname); $statement = "SELECT a.attname FROM pg_attribute a,pg_class c where c.relname ='$tblname' and a.attrelid = c.oid and a.attnum > 0"; $stat = @pg_exec($dbh,$statement); if (!$stat) { print "<strong>ERROR</strong>: Could not retrieve table header column names for<strong>".strtoupper($tblname)."</strong>."; } else { $statement = "SELECT * FROM $tblname"; $stat = @pg_exec($dbh,$statement); if (!$stat) { print "<strong>ERROR</strong>: Could not access table <strong>".strtoupper($tblname)."</strong>."; } else { /* function print_row($item2,$key) { print ("<td style=\"border-right: solid\" align=\"center\">\n"); echo "$item2\n"; print ("</td>\n"); } */ /*** * * ***** FIXME ********* * The field labels are hardcoded in here. * You have to change the labels for this to work. * ***/ $rows = pg_numrows($stat); /*** * * Setting up google maps specific stuff * * $ids contains the ten ids that you can associate * with locations * * $ imgs lists the image icons that you can have * ***/ $ids=array('A','B','C','D','E','F','G','H','I','J'); $imgs=array('http://libgmail.sourceforge.net/man.png', 'http://libgmail.sourceforge.net/spider.png'); $fh=fopen("gmaps2.xml", "w") or perr("db_xml_create", "unable to create file"); for ($i=0;$i<$rows;$i++) { fprintf($fh, "<location infoStyle=\"geocodeinfo_rfs.xsl\" id=\"%s\">\n", $ids[$i]) or perr("db_xml_create", "Cant fprintf"); $row = array_values(pg_fetch_row($stat,$i)) or perr("db_xml_create", "Cannot retrieve data"); foreach ($rows as $key => $value) { switch($key) { case "latitudedegree": $latdeg=$value; break; case "latitudeminutes": $latmin=$value; break; case "longitudedegree": $longdeg=$value; break; case "longtudeminute": $longmin=$value; break; default: $disp[$key]=$value; } } $lat = $latdeg + ($latmin/60.0); $long = $longdeg + ($longmin/60.0); print("Now printing values into the xml file\n"); fprintf($fh, "<point lat=\"%f\" lng=\"%f\"/>\n", $lat, $long) or perr("db_xml_create", "1"); fprintf($fh, "<icon image=\"%s\" class=\"local\"/>\n", $imgs[0]); fprintf($fh, $str1) or perr("db_xml_create","3"); fprintf($fh, "<info>") or perr("db_xml_create","4"); fprintf($fh, "<title xml:space=\"preserve\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">\n") or perr("db_xml_create","5"); fprintf($fh, "</title>\n") or perr("db_xml_create","6"); print("Halfway done\n") or perr("db_xml_create","7"); fprintf($fh, "<address>\n") or perr("db_xml_create","8"); fprintf($fh, "<line>Ms. Eva Green</line>\n") or perr("db_xml_create","9"); fprintf($fh, "</address>\n") or perr("db_xml_create","10"); fprintf($fh, "<image>\n") or perr("db_xml_create","11"); fprintf($fh, "http://www.google.co.nz/images/logo_sm.gif\n") or perr("db_xml_create","12"); fprintf($fh, "</image>\n") or perr("db_xml_create","13"); fprintf($fh, "</info>\n") or perr("db_xml_create","14"); } } print("Done with all\n"); pg_close($dbh); fclose($fh); } ?> --- NEW FILE: gmaps.html --- <html> <head> <title>Demo Two for Unofficial Google Maps Embedding How To</title> <script src="http://google.com/maps?file=js&hl=en" type="text/javascript"> </script> <script type="text/javascript"> _mSiteName = 'Richmond Field Station'; _mUsePrintLink=""; function initMap() { // // frb // myMapApp = new _MapsApplication(document.getElementById("container_frb"), document.getElementById("panel"), document.getElementById("metapanel"), document.getElementById("permalink"), document.getElementById("toggle"), document.getElementById("printheader")); myMapApp.loadMap(); /* Note: All XML & XSL files must be on same domain. */ _loadXmlFileFromURL("gmaps.xml", myMapApp); } t.dump = function(a) {alert(a);} //debugging function _loadXmlFileFromURL(url, mapApp) { // // Loads the specified external XML file into the map view. // // frb // // NOTE: URL must be on same domain as page. var _getter = _XMLHttp.create(); _getter.open("GET", url); _getter.onreadystatechange=function() { if (_getter.readyState==4) { mapApp.loadXML(_getter.responseText); } } _getter.send(null); // Whoops, IE *needs* this to be last, Moz is lenient. } </script> <style type="text/css"> #panel table { border:solid 1px grey; width:50%; margin-bottom: 5px; } #panel table td:first-child { width: 24px; } .label { font-size:smaller; font-family:sans-serif; }; </style> </head> <body onload="initMap()"> <!----> <!-- Note: Map height always maximum? --> <div style="position:absolute;left:5px;top:10px;right:5px;border:solid thin grey;"> <div id="container_frb" style="float:right;width:35%;" ></div> <div style="float:left;position:relative;left:10px;width:60%"> <div style="position:absolute;left:0px;top:0px;width:50%;overflow:auto;"> <h1 style="font-family:sans-serif;font-size:medium;">Unofficial Google Maps Embedding How To : Demo Two</h1> <p><tt>_MapsApplication({container div}, {panel div}, {metapanel div}, {permalink div}, {toggle div} | null, {printheader div})</tt></p> <p><dl> <dt style="font-weight:bold;">Container div</dt> <dd>The <tt><div></tt> where the map should be displayed.</dd> <dt style="font-weight:bold;">Panel div</dt> <dd>The <tt><div></tt> where the "sidepanel" should be displayed.</dd> <dt style="font-weight:bold;">Metapanel div</dt> <dd>It appears Gmaps uses this to display error and other messages</dd> <dt style="font-weight:bold;">Permalink div</dt> <dd>It appears Gmaps uses this to display a permanent URL. (Now appears to be required.)</dd> <dt style="font-weight:bold;">Toggle div</dt> <dd>The <tt><div></tt> where the map specification toggle should be displayed. The toggle switches between different map specifications, e.g. Map view and Satellite view. </dd> <dt style="font-weight:bold;">Printheader div</dt> <dd>Presumably displayed at the head of a printed map.</dd> </dl> </p> <p style="font-size:x-small;">-- follower at rancidbacon.com <br /> (Original page: <a href="http://stuff.rancidbacon.com/google-maps-embed-how-to/demo2.html">http://stuff.rancidbacon.com/google-maps-embed-how-to/demo2.html</a>)</p> <p style="font-size:x-small;">26 May 2005<!--25 May 2005--></p> </div> <div style="position:absolute;left:50%;top:5px;width:50%;"> <div id="toggle" style="position:absolute;top:0px:left:10px;font-family:sans-serif;font-size:smaller;"> </div> <div style="position:absolute;top:30px;left:5px;"> <div id="panel" style="height:90%;width:100%;"> </div> <div id="metapanel"></div> <div id="permalink"></div> <div id="printheader"></div> </div> </div> </div> </div> <!-- </body> </html> --- NEW FILE: db_gmap.php~ --- <html> <head> <title>Richmond Field Station Experiment</title> <script src="http://google.com/maps?file=js&hl=en" type="text/javascript"> </script> <script type="text/javascript"> _mSiteName = 'Richmond Field Station'; _mUsePrintLink=""; function initMap() { // // frb // myMapApp = new _MapsApplication(document.getElementById("container_frb"), document.getElementById("panel"), document.getElementById("metapanel"), document.getElementById("permalink"), document.getElementById("toggle"), document.getElementById("printheader")); myMapApp.loadMap(); /* Note: All XML & XSL files must be on same domain. */ _loadXmlFileFromURL("gmaps.xml", myMapApp); } t.dump = function(a) {alert(a);} //debugging function _loadXmlFileFromURL(url, mapApp) { // // Loads the specified external XML file into the map view. // // frb // // NOTE: URL must be on same domain as page. var _getter = _XMLHttp.create(); _getter.open("GET", url); _getter.onreadystatechange=function() { if (_getter.readyState==4) { mapApp.loadXML(_getter.responseText); } } _getter.send(null); // Whoops, IE *needs* this to be last, Moz is lenient. } </script> <style type="text/css"> #panel table { border:solid 1px grey; width:50%; margin-bottom: 5px; } #panel table td:first-child { width: 24px; } .label { font-size:smaller; font-family:sans-serif; }; </style> </head> <body onload="initMap()"> <!----> <?php include("db_xml_create.php"); ?> <!-- Note: Map height always maximum? --> <div style="position:absolute;left:5px;top:10px;right:5px;border:solid thin grey;"> <div id="container_frb" style="float:right;width:35%;" > </div> <div style="float:left;position:relative;left:10px;width:60%"> <div style="position:absolute;left:0px;top:0px;width:50%;overflow:auto;"> <h1 style="font-family:sans-serif;font-size:medium;">Richmond Field Station Demo</h1> <p><dl> Sensor data last updated: </dl> </p> </div> <div style="position:absolute;left:50%;top:5px;width:50%;"> <div id="toggle" style="position:absolute;top:0px:left:10px;font-family:sans-serif;font-size:smaller;"> </div> <div style="position:absolute;top:30px;left:5px;"> <div id="panel" style="height:90%;width:100%;"> </div> <div id="metapanel">metapanel</div> <div id="permalink">permalink</div> <div id="printheader">header</div> </div> </div> </div> </div> <!-- </body> </html> --- NEW FILE: hello.php --- <?php print("hello world\n"); ?> |