I am trying to save a layer to KML using the OpenLayers.Format.KML class.  Here 
is my code:

var format = new OpenLayers.Format.KML();
var kml = document.createElementNS('http://earth.google.com/kml/2.0', 'kml');
var kml_folder = format.createFolderXML();
kml.appendChild(kml_folder);

var feature = format.createPlacemarkXML(DrawingLayer.features[0]);
kml_folder.appendChild(feature);

This works under Chrome and FireFox, but fails in IE9 with the following error:

"DOM Exception: HIERARCHY_REQUEST_ERR (3)"

It is the fourth line that is causing the error.  It seems that IE does not 
recognise kml_folder as a DOM Element.  Is there a way around this?

Thanks,

Andrew

_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to