Hi:
In your code:
var atlantaKML = new google.maps.KmlLayer('Streets.kml');
var fultonKML = new google.maps.KmlLayer('fulton.kml');
directions to the KML must be absolute and a server that is public.
Does not work with local KML files.
I hope it will help you
On 27 mayo, 17:36, 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.