Hi, I am using a locally stored KML file. I have created this using Google Maps' Create Map finctionality. I just wanted to load this file using 'google.maps.KmlLayer' in Google Maps API V3, like,
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
var ctaLayer = new google.maps.KmlLayer('C:/Documents and Settings/shrshi1/Desktop/GoogleMaps/KMLs/Chicago1.kml', {preserveViewport : true});
ctaLayer.setMap(map);
This loads the map, but does not show any of the placemarks/markes in the related KML file. Any help regarding this? Following is my KML file:
<?xml version="1.0" encoding="UTF-8"?>
<Document>
<name>Chicago</name>
<description><![CDATA[Chicago Sample Map]]</description>
<Style id="style2">
<IconStyle>
<Icon>
</Icon>
</IconStyle>
</Style>
<Style id="style1">
<IconStyle>
<Icon>
</Icon>
</IconStyle>
</Style>
<Placemark id="ID1">
<name>Chicago Placemark</name>
<description><![CDATA[Chicago1]]</description>
<styleUrl>#style2</styleUrl>
<Point>
<coordinates>-87.626953,41.883877,0.000000</coordinates>
</Point>
</Placemark>
<Placemark id="ID2">
<name>West Chicago</name>
<description><![CDATA[West Chicago1]]</description>
<styleUrl>#style1</styleUrl>
<Point>
<coordinates>-88.218842,41.910454,0.000000</coordinates>
</Point>
</Placemark>
</Document>
</kml>