From 777ef007adeb2ef79eacfb52819294d071a475b4 Mon Sep 17 00:00:00 2001 From: bartvde Date: Tue, 9 Feb 2010 06:38:54 +0000 Subject: [PATCH] Make Format.SLD work against ArcGIS Server, r=tschaub (closes #2166) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10034 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Format/SLD/v1.js | 6 ++++++ 1 file changed, 6 insertions(+) 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);