Trying to do the simple but something is throwing it off it seems. Just want to load a KML file from a web page.
So I've made a very simple KML file in Google Earth with one placemark on it, saved it and uploaded it to our orienteering club web site (hosted on GoDaddy if that makes any difference). I then copied the html code from the KML Layers web page and loaded it on my web site and changed the key code- worked fine.
All I did next was change the lat/long location values and then listed my own kml file, full URL, .. and it pulls up a map, centered, but with no placemark. ACK!
I've read around and am wondering if there is something server side I need to do to get the KML to be read? Since it's a GoDaddy host, I have no control over it if this is the issue.
The KML only lists one Placemark and I've read through the Google Maps schema and it all seems legit. Here it is anyway.
<?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" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Test1</name>
<Style id="s_ylw-pushpin">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
</Style>
<Placemark>
<name>testmark</name>
<styleUrl>#s_ylw-pushpin</styleUrl>
<Point>
<gx:drawOrder>1</gx:drawOrder>
<coordinates>-73.20975393157571,44.46282408596932,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
As noted I'm just using the exact same text from the KML Layers web page and have changed the location to my lat/long (working) but the kml file is never found. "... var ctaLayer = new google.maps.KmlLayer({ url: "http://www.gmoclub.org/kml/8gove3.kml", map: map ..."
Have tried in several browsers as well. IE blocked it with a message bar that wouldn't clear about Active X controls, Chrome and Firefox displayed a blank map.
When I've tried several of the jsfiddle options, it alwasy fails when I add the KML link.
What am I doing wrong with the full link?!! Any notions? Sorry to be such a nube but ... it happens.