thats not a good way to store data, not only the size of the data
(picture) as long as the usability would be not very good
a kml file is basicly a very simple xml file in which the cordinates
and some extra data will be stored, the maps api understand that file
format an display the data (whatever you did say there, f.e. polylines
or markers or something)
you can do something like this:
function saveme(){
for (var i = 0; i < markers.length; i++) {
cords += markers[i].getPosition());
}
document.getElementById("savefield").value = cords;
}
push that cords variable into a hiddenfield in your page and submit
that page, get the hidden field and save it into a database...(or
parse the kml file right along and save it)
now just read the database and create a kml file (i do it with php and
fwrite) and give that kml to the maps api, once you are in there its
easy
give the api the kml file can look something like that
function initialize() {
var myLatlng = new google.maps.LatLng(LatLgn);
var myOptions = {
zoom: <?php echo($zoomlvl)?>,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new
google.maps.Map(document.getElementById("map_canvas"), myOptions);
var georssLayer = new google.maps.KmlLayer('
http://yourdomain.com/
yourkml.kml');
georssLayer.setMap(map);
}
grez