Hey, I am stumped. My google map with KML layer pins are not
appearing. I have the full url, am avoiding caching results during
testing, and am trying with just the simplest kml file imaginable.
Have been at it all day with no luck. Any help is greatly appreciated,
thanks.
API code:
function showAreaGoogleMap(latLng,zoom){
var myOptions = {
zoom: zoom,
center: latLng,
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("main_map"),
myOptions);
randomnumber = randomNumber();
//alert(randomnumber);
var markerLayer = new google.maps.KmlLayer('http://www.example.com/
get_markers.kml?latLng='+ latLng + '&time=' + randomnumber);
markerLayer.setMap(map);
}
kml code:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"
xmlns:gx="http://www.google.com/kml/ext/2.2"><Document>
<name>KML TEsT2</name>
<description>
KML TEST DESC
</description><Placemark>
<Icon>
<href>http://chart.apis.google.com/chart?
chst=d_text_outline&chld=000000|14|h|BDD73C|b|wtf</href>
</Icon>
<Point>
<coordinates>-94.60459857804871, 39.0909978614691,0</
coordinates>
</Point>
</Placemark><Placemark>
<Icon>
<href>http://chart.apis.google.com/chart?
chst=d_text_outline&chld=000000|14|h|BDD73C|b|wtf</href>
</Icon>
<Point>
<coordinates>-94.58793220503233, 39.096728264659575,0</
coordinates>
</Point>
</Placemark><Placemark>
<Icon>
<href>http://chart.apis.google.com/chart?
chst=d_text_outline&chld=000000|14|h|BDD73C|b|wtf</href>
</Icon>
<Point>
<coordinates>-84.497657176474, 38.03713035019729,0</coordinates>
</Point>
</Placemark><Placemark>
<Icon>
<href>http://chart.apis.google.com/chart?
chst=d_text_outline&chld=000000|14|h|BDD73C|b|wtf</href>
</Icon>
<Point>
<coordinates>-74.6902729, 42.126421,0</coordinates>
</Point>
</Placemark><Placemark>
<Icon>
<href>http://chart.apis.google.com/chart?
chst=d_text_outline&chld=000000|14|h|BDD73C|b|wtf</href>
</Icon>
<Point>
<coordinates>-74.6902729, 42.126421,0</coordinates>
</Point>
</Placemark></Document>
</kml>
--
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.