I've posted my attempt at creating a static map here. Where am I going wrong? In Internet Explore I get an error saying GMap2 is undefined....
http://sites.google.com/site/mapsapiproject/static-map Thank you, Taylor On Oct 3, 11:51 am, Taylor <[EMAIL PROTECTED]> wrote: > Great! Thank you. It is working now and I have updated my code > onhttp://sites.google.com/site/mapsapiproject/Home. Unfortunately I > ran into another problem. I need the map to be posted as an image. > From what I have read this means it needs to be a static map, but I > can't seem to get it to work. Is this even possible with the GeoXml > function? The code I have posted is not for a static map. I am > guessing I need to change the line: > > <script src="http://maps.google.com/maps? > file=api&v=2&key=ABQIAAAAoVq8d0aZElfu2eUGkhFdzhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQSOns9BCCyQuULtRV8q3B3Rh_j3A" > > to something like > <script src="http://maps.google.com/ > staticmap?..........key=ABQIAAAAoVq8d0aZElfu2eUGkhFdzhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQSOns9BCCyQuULtRV8q3B3Rh_j3A" > > I just can't seem to get it to work. Can anyone help me get the map > to post as a static .PNG image? > > Than you, > > Taylor > > On Oct 2, 7:35 pm, Lance Dyas <[EMAIL PROTECTED]> wrote: > > > Lance Dyas wrote: > > > 1) make the variable for GeoXml global.. its needed for both EGeoXml and > > > GeoXml > > > 2) in GeoXml currently the options parameter isnt not optional.. if you > > > dont want to set anything pass {} > > > and I will be updating so options are themselves optional shortly. > > > > Taylor wrote: > > > >> Thanks for the quick reply and sorry for the confusion! I have > > >> created a google site with the code that replaces the "http:// > > >> mapgadgets.googlepages.com/cta.kml" path with "http://localhost/ > > >> doc.kml". I have also attached the doc.kml file to this site. > > > >> I see my map, and my map is centered where it should be, I just don't > > >> see the kml file. Is there an addOverlay() type command that I am > > >> missing while using the GeoXml function? > > > >> Code and file: > > >>http://sites.google.com/site/mapsapiproject/Home > > > >> Thanks! > > > >> -Taylor > > > >> On Oct 1, 4:51 pm, Lance Dyas <[EMAIL PROTECTED]> wrote: > > > >>> Your path is to an external webserver.. not localhost > > >>> to get something like that to work you need a proxy > > >>> script of some sort. > > > >>> var path = ["http://mapgadgets.googlepages.com/cta.kml"]; > > > >>> in other words you just posted something other than what you described. > > > >>> Taylor wrote: > > > >>>> Help! I am new to the Maps API world and am trying to figure out how > > >>>> to visualize a .kml file in my Google Map. The catch is that I can > > >>>> only work from my local machine, so from what I have read the GGeoXml > > >>>> functionality won't work since the reference to my .kml file will be > > >>>>http://localhost/...kmlandnota public URL that google has access > > >>>> to. > > > >>>> I came across the GeoXML functionality > > >>>> fromhttp://www.dyasdesigns.com/geoxml/. > > > >>>> Am I right in that you can use this geoxmlfull.js script instead of > > >>>> the GGeoXml function? > > > >>>> I am having trouble getting anything to work from this geoxmlfull.js > > >>>> script. I have downloaded the script and placed it in > > >>>> myhttp://localhost > > >>>> folder. Below is the code I am using to try and visualize someone > > >>>> else's .kml file. I have also tried this code to visualize my own kml > > >>>> file which also resides in thehttp://localhostfolder. Can anyone > > >>>> help? My goal is to be able to see the .kml file in > > >>>> thehttp://localhost > > >>>> folder. The key I got from google was for thehttp://localhostURL. > > > >>>> I am sorry about the code post, but I don't know how to share any more > > >>>> efficiently. > > > >>>> Thank you!!!! > > > >>>> <!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> > > >>>> <script src="http://maps.google.com/maps? > > >>>> file=api&v=2&key=ABQIAAAAoVq8d0aZElfu2eUGkhFdzhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQXOns9BCCyQuULtRV8q3B3RH_j3A" > > >>>> type="text/javascript"></script> > > > >>>> <script src="geoxmlfull.js" type="text/javascript"></script> > > >>>> </head> > > > >>>> <body onunload="GUnload()"> > > >>>> <div id="map_canvas" style="width: 500px; height: 300px"></div> > > > >>>> <script type="text/javascript"> > > > >>>> if (GBrowserIsCompatible()) { > > >>>> //<![CDATA[ > > >>>> map = new GMap2(document.getElementById("map_canvas"), > > >>>> {draggableCursor: 'crosshair', draggingCursor: 'move', > > >>>> iconFromDescription:true}); > > > >>>> map.addControl(new GLargeMapControl()); > > >>>> map.setCenter(new GLatLng(41.897332, -87.749474), 10); > > >>>> map.addControl(new GLargeMapControl()); > > >>>> map.enableScrollWheelZoom(); > > >>>> map.enableDoubleClickZoom(); > > > >>>> var path = ["http://mapgadgets.googlepages.com/cta.kml"]; > > >>>> var exml = new GeoXml("exml", map, path); > > >>>> exml.parse(); > > >>>> //]]> > > > >>>> } > > >>>> </script> > > >>>> </body> > > >>>> </html> > > > >> . > > > > . --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
