I have loaded this code (see below) into my Weebly web page and placed my .kml file on another server and added the mime type .kml. But all I get on my web page is the display of the map without the kml stuff on it. It is like the .kml data is not being accessed??
I don't know what to expect... but when I try the url to the kml file direct in a browser I get "the page can not be found."
What next to try? Is my code faulty? Thanks! Bob
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>KML Layers</title>
<style>
#map-canvas { width:500px; height:300px; }
.layer-wizard-search-label { font-family: sans-serif };
</style>
<script src="https://maps.googleapis.com/maps/api/js? v=3.exp&sensor=false"></script>
<script>
function initialize() {
var world = new google.maps.LatLng(24.174513811778894, 6.083308984374969);
var mapOptions = {
zoom: 1,
center: world
}
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
var ctaLayer = new google.maps.KmlLayer({
url: 'http://www.godanddeaf.org/HisHands/kml/HHR- STARTEDtranslationof1742WORDS.kml'
});
ctaLayer.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map-canvas"></div>
</body>
</html>`