Ticket #3045 (closed bug: fixed)
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
Note: See
TracTickets for help on using
tickets.
