Ticket #3045 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Writing OWSContext fails if style has no legend

Reported by: hbruch Owned by: bartvde
Priority: major Milestone: 2.11 Release
Component: Format.OWSCommon Version: 2.10
Keywords: Cc:
State:

Description

Writing a map via OWSContext for my map result in an "TypeError: options is undefined". Apparently this was caused by a missing legend of the style.

Otherwise, changing the Style-Writer in v0_3_1.js as below would work for me.

"Style": function(style) {

var node = this.createElementNSPlus("Style"); this.writeNode("Name", style, node); this.writeNode("Title", style, node); // only write LegendURL if it's known: if (style.legend) this.writeNode("LegendURL", style, node); return node;

}

Best regards, Holger

Change History

Changed 2 years ago by bartvde

Hi Holger, do we have a CLA from you? See  http://trac.osgeo.org/openlayers/wiki/HowToContribute for details.

Changed 2 years ago by bartvde

  • status changed from new to closed
  • resolution set to fixed

(In [11629]) only write out LegendURL in OWSContext format if present, p=hbruch, r=me (closes #3045)

Note: See TracTickets for help on using tickets.