PDA

View Full Version : Google Map, XML Databse



junior84
04-16-2007, 08:20 AM
Hello all,

I am trying to make a google map that people can add markers onto using javascript..

[QUOTE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example</title>
<style>
body{

}
</style>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAKZN2f39mS8F9l-OzO425vhRLgga0mqfna7adwDMxfUPMYaV0aBQD-D4Ms1doRYnxPi5GtOZMAxRs2g"
type="text/javascript"></script>

<script type="text/javascript"> //<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(document.myForm.longitude.value, document.myForm.latitude.value), 8);

}
}
//]]>
</script>
</head>
<body>
<div id="map" style="width: 500px; height: 300px"></div>
<form name="myForm">
Longitude<textarea wrap rows="1" cols="30" name="longitude"></textarea><br>
Latitude<textarea wrap rows="1" cols="30" name="latitude"></textarea>
zoom level<textarea wrap rows="1" cols="30" name="zoom"></textarea>
marker longitude <textarea wrap rows="1" cols="30"name="markerlong"></textarea>
marker langitude<textarea wrap rows="1" cols="30" name="markerlang"></textarea>
<input type="button" value="Erase Form" onclick="load()">
</form>
</body>

</html>

what i want to do is use the form to input data into an xml file that can be read by the google map..

can xml files be updated by a form? i want the javascript to read the markers for the google map from the xml file, thats why i need it to be updatable..

i want people to be able to edit my google map using the form, and using javascript to do it.

cheers for any advice