I am trying to add kml to openlayers and i am getting error in firebug
a is undefined: Line 92 openlayers.js
here is my code :
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>OpenLayers Basic Single WMS Example</title>
<script src="OpenLayers-2.12/lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
function init(){
map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} );
var kml = new OpenLayers.Layer.Vector("KML", {
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "data/carmax.anand.kml",
format: new OpenLayers.Format.KML({
extractStyles: true,
extractAttributes: true
})
})
});
map.addLayer(layer);
map.addLayer(kml);
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<div id="map" class="smallmap" style="height:512px; width:512px"></div>
</body>
</html>
commaafterextractAttributes: true. – Chau Jan 4 at 9:06<script src="OpenLayers-2.12/lib/OpenLayers.js"></script>, this show which is the failing component. – xamamano -jorix- Jan 4 at 9:08node is undefined : Line 625– anand Jan 4 at 9:33