diff --git a/lib/OpenLayers/Format/SLD/v1.js b/lib/OpenLayers/Format/SLD/v1.js index 87a7960e3d..f4fcb40f5f 100644 --- a/lib/OpenLayers/Format/SLD/v1.js +++ b/lib/OpenLayers/Format/SLD/v1.js @@ -437,6 +437,12 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, { "xsi:schemaLocation": this.schemaLocation }} ); + + // For ArcGIS Server it is necessary to define this + // at the root level (see ticket:2166). + root.setAttribute("xmlns:ogc", this.namespaces.ogc); + root.setAttribute("xmlns:gml", this.namespaces.gml); + // add in optional name if(sld.name) { this.writeNode("Name", sld.name, root);