My Google maps are configured to display blue location markers.
My maps use the following .kml file (just xml data describing places to show blue location markers via the Google Maps API), which I load with a plain old XMLHttpRequest object.
My issue is this, when I load the .kml file from an external source such as "http://xyz.com/kumedplaces.kml", it works, but when I store it and try to load it from the local server that my sitecore website runs, the Google Map Object doesn't load/show the blue location markers on the map.
Below is what I do in my .js file after loading the addresses from the .kml file:
<div id="map" style="width: 400px; height: 300px"></div>
var kmlUrl = "http://xyz.com/kumedplaces.kml"; works
var kmlUrl = "/js/heart/kumedplaces.kml"; doesn't work
var geoXml = new GGeoXml(kmlUrl);
map.addOverlay(geoXml);
and by the way I did double check on my local to make sure my local .kml file is loading correctly
Sample of my .kml file:
<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<name>University of Kansas Hospital Locations</name>
<description>The various buildings around the city that comprise the University of Kansas Hospital</description>
<Style id="randomColorIcon">
<IconStyle>
<color>ff00ff00</color>
<colorMode>random</colorMode>
<scale>1.1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pal3/icon21.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark id="kumed">
<name>The University of Kansas Hospital</name>
<description>
Part of the Kansas University Medical Center complex.
3901 Rainbow Blvd, Kansas City, KS 66160
</description>
<address>3901 Rainbow Blvd, Kansas City, KS 66160</address>
<phonenumber>xxxxxxx</phonenumber>
<ExtendedData></ExtendedData>
<!--<styleUrl>#randomColorIcon</styleUrl>-->
<Point>
<coordinates>-94.608800,39.0558241</coordinates>
</Point>
</Placemark>
</Document>
</kml>