I did decide to make the polyline/ markers in a new map. (just when we are on the move)
Idea is still the same. I want to use a php code to create a xml file like : http://econym.org.uk/gmap/example4.xml The points are quit oké. But how to create the <line> <point ... using the php file. I use following php code. Somehow $node = $dom->createElement("line"); needs to be inserted. Thanks for helping out. Xml: http://www.finnschmidt.nl/gen_xml2.php?regio=aare2 map: http://www.finnschmidt.nl/reis/aare/map/index2.php <?php require("connect.php"); // Get parameters from URL $regio = $_GET["regio"]; // Start XML file, create parent node $dom = new DOMDocument("1.0"); $node = $dom->createElement("markers"); $parnode = $dom->appendChild($node); // Opens a connection to a mySQL server $connection=mysql_connect (localhost, $username, $password); if (!$connection) { die("Not connected : " . mysql_error()); } // Set the active mySQL database $db_selected = mysql_select_db($database, $connection); if (!$db_selected) { die ("Can\'t use db : " . mysql_error()); } // Search the rows in the markers table $query = sprintf("SELECT id, naam, lat, lng, info, url, type FROM markers WHERE `regio` = '$regio' ", mysql_real_escape_string($center_lat), mysql_real_escape_string($center_lng), mysql_real_escape_string($center_lat), mysql_real_escape_string($radius)); $result = mysql_query($query); $result = mysql_query($query); if (!$result) { die("Invalid query: " . mysql_error()); } header("Content-type: text/xml"); // Iterate through the rows, adding XML nodes for each while ($row = @mysql_fetch_assoc($result)){ $node = $dom->createElement("marker"); $newnode = $parnode->appendChild($node); $newnode->setAttribute("naam", $row['naam']); $newnode->setAttribute("id", $row['id']); $newnode->setAttribute("info", $row['info']); $newnode->setAttribute("lat", $row['lat']); $newnode->setAttribute("lng", $row['lng']); } echo $dom->saveXML(); ?> -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
