I am have the same problem. I have managed to make this entire thing work flawlessly in Google Earth API and I cannot seem to load a simple KML point file with the Google Maps Javascript API 3. I've been searching for answers all week.
My question is; having loaded a simple instance of google maps on my website, how can I simply add a KML layer from my server? I'm dying here! On May 27, 10:36 am, Kris <[email protected]> wrote: > Working off of the example given in the tutorials section I can't seem > to get a kml file that was generated from google earth to load into my > google map. The path is correct to the kml files as they reside in > the same directory as the html, i've also tried absolute paths to no > avail. > > here is my html. > > <html> > <head> > <meta name="viewport" content="initial-scale=1.0, user- > scalable=no" /> > <meta http-equiv="content-type" content="text/html; > charset=UTF-8"/> > <script type="text/javascript" src="http:// > maps.google.com/maps/api/js?sensor=false"></script> > <script type="text/javascript"> > function initialize() { > var atlanta = new google.maps.LatLng(33.761926,-84.363144); > var myOptions = { > zoom: 13, > center: atlanta, > mapTypeId: google.maps.MapTypeId.ROADMAP > } > > var map = new google.maps.Map(document.getElementById("map_canvas"), > myOptions); > > var atlantaKML = new google.maps.KmlLayer('Streets.kml'); > var fultonKML = new google.maps.KmlLayer('fulton.kml'); > atlantaKML.setMap(map); > fultonKML.setMap(map);} > > </script> > </head> > <body style="margin:0px; padding:0px;" onload="initialize()"> > <div id="map_canvas" style="width:100%; height:100%"></div> > </body> > </html> -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
