Hi people,

Please, does anybody know how could I download a static map?

I've creating static map in this way:

    function initialize() {

      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
        gdir = new GDirections(map, document.getElementById
("directions"));
        GEvent.addListener(gdir, "addoverlay", onGDirectionsLoad);
...
function onGDirectionsLoad(){
  gdir.load("from: " + fromAddress + " to: " + toAddress, { "locale":
locale });
  var poly = gdir.getPolyline();
  var baseUrl = "http://maps.google.com/staticmap?";;
  var params = [];
  var markersArray = [];
  markersArray.push(poly.getVertex(0).toUrlValue(5) + ",greena");
  markersArray.push(poly.getVertex(poly.getVertexCount()-1).toUrlValue
(5) + ",greenb");
  params.push("markers=" + markersArray.join("|"));
  baseUrl += params.join("&");
  var extraParams = [];
  extraParams.push("center=" + map.getCenter().lat().toFixed(6) + ","
+       map.getCenter().lng().toFixed(6));
  extraParams.push("zoom=" + 15);
  addImg(baseUrl + "&" + extraParams.join("&"),
"staticMapOverviewIMG");
}
...
<body onload="initialize()" onunload="GUnload()">
...
  <div id="staticMapOverviewIMG"></div>

But, I would like to download the image generated. I couldn't to do
this, because when I select view source in my browser, I can't see the
tags for the image, because it was gotten through the div (which, as I
could understand, only access the content from Google Maps and show it
in the browser). I really don't know how because browser only
interprets HTML tags and Javascript, right? So, how browser can show
it if HTML source code doesn't come into it?

Thanks in advance for any help!

Luiz
--~--~---------~--~----~------------~-------~--~----~
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