I was mapping KMZ file to google map .
So i had two copies of a single KMZ file .. But the one which is copied is working and the original is not working .BOth the files are same
========== Copied file code ==============
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?key=AIzaSyB-fWo4fKidjcdsWOEeCORH8adp8JMV-RE&sensor=true">
</script>
<script type="text/javascript">
var map = new google.maps.Map(document.getElementById("map_canvas"),mapOptions);
function initialize() {
var mapOptions = {
zoom: 11,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),mapOptions);
var kmlLayer = new google.maps.KmlLayer("http://www.udayan2k12.com/shape/mmn.kmz");
kmlLayer.setMap(map);
}
function loadScript() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://maps.googleapis.com/maps/api/js?sensor=false&' +
'callback=initialize';
document.body.appendChild(script);
}
window.onload = loadScript();
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:43%; height:49%"></div>
</body>
</html>
But if i replace it
var kmlLayer = new google.maps.KmlLayer("http://www.udayan2k12.com/shape/BMC Boundary.kmz");
kmlLayer.setMap(map);
It doesnot work
You need to URLEncode since you have a space in there — try http://www.udayan2k12.com/shape/BMC%20Boundary.kmz