You can use GDownloadUrl() to communicate with your server in either
direction, i.e. for uploading as well as downloading.

For example in this example:
   http://econym.org.uk/gmap/example_store.htm
I use the following code:

        var lat = lastmarker.getPoint().lat();
        var lng = lastmarker.getPoint().lng();
        var url = "myserver.php?lat=" +lat+ "&lng=" +lng
                  +"&details="+details;

        GDownloadUrl(url, function(doc) {    });

That sends a message to myserver.php that looks like

   http://econym.org.uk/gmap/myserver.php?lat=12&lng=123&details=foo

In that example, myserver.php appends the data to a flat file, like this

 <?php
  $lat = $_REQUEST["lat"];
  $lng = $_REQUEST["lng"];
  $details = $_REQUEST["details"];
  $file = fopen("details.txt","a");
  $output = $lat . "|" . $lng . "|" . $details . "\n";
  fwrite($file, $output);
 ?>

but if I had SQL on my server the server could write to an SQL file.

Hint: It's generally easier to get your system working if you write lots
of small simple server scripts that do one thing each, rather than try
to write one complex server script that can perform lots of different
functions.

-- 
Mike Williams
-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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.


Reply via email to