I'm trying to create a map of Stockholm subway on Google maps. I have created a KML file to the blue line http://tourist-sweden.se/transport/map/sthlm/t-11-bana.kml I call this file with this JavaScript code:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Map of Stockholm's subway: line Nr.T-11 "Akalla - Kungsträdgården"</title>
<link href="https://developers.google.com/maps/documentation/javascript/examples/default.css" rel="stylesheet">
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script>
function initialize() {
var subwayblue = new google.maps.LatLng(18.032405,59.334372);
var mapOptions = {
zoom: 10,
center: subwayblue,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
var ctaLayer = new google.maps.KmlLayer({
url: 'http://tourist-sweden.se/transport/map/sthlm/t-11-bana.kml'
});
ctaLayer.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map-canvas"></div>
</body>
</html>
But not showing the path between the stations. What is my fault?
Your polyline doesn't have a valid color:
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Ftourist-sweden.se%2Ftransport%2Fmap%2Fsthlm%2Ft-11-bana.kml