From 57191f5fd2744cdc15c2286309361b89d5c91188 Mon Sep 17 00:00:00 2001 From: bartvde Date: Mon, 7 Mar 2011 01:14:55 +0000 Subject: [PATCH] only write out LegendURL in OWSContext format if present, p=hbruch, r=me (closes #3045) git-svn-id: http://svn.openlayers.org/trunk/openlayers@11629 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Format/OWSContext/v0_3_1.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Format/OWSContext/v0_3_1.js b/lib/OpenLayers/Format/OWSContext/v0_3_1.js index f1c3de4fff..4a795f86ed 100644 --- a/lib/OpenLayers/Format/OWSContext/v0_3_1.js +++ b/lib/OpenLayers/Format/OWSContext/v0_3_1.js @@ -440,7 +440,9 @@ OpenLayers.Format.OWSContext.v0_3_1 = OpenLayers.Class(OpenLayers.Format.XML, { var node = this.createElementNSPlus("Style"); this.writeNode("Name", style, node); this.writeNode("Title", style, node); - this.writeNode("LegendURL", style, node); + if (style.legend) { + this.writeNode("LegendURL", style, node); + } return node; }, "Name": function(obj) {