Ticket #1886 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

createSymbolizer never called on 'style' property attached to layer

Reported by: crschmidt Owned by: crschmidt
Priority: minor Milestone: 2.8 Release
Component: Layer.Vector Version: 2.7
Keywords: Cc:
State:

Description

If a layer has a .style property attached to it which is an OpenLayers.Style object, createSymbolizer is never called on the style, meaning that attaching an OpenLayers.Style object to a layer has no effect and a StyleMap must always be used.

Attachments

1886.patch Download (1.7 KB) - added by crschmidt 4 years ago.

Change History

Changed 4 years ago by crschmidt

Changed 4 years ago by crschmidt

  • state set to Review

All tests pass.

Changed 4 years ago by elemoine

tell me if i should RTFM: I thought that the style property of Layer.Vector did not belong to the new styling framework and that one would always set it to a symbolizer and never to a Style instance. When I don't need a style map but just a single style I personally send "styleMap: new OpenLayers.Style()" to my layer.

Changed 4 years ago by crschmidt

  • status changed from new to closed
  • state Review deleted
  • resolution set to invalid

Hm. Looking at the code, that should work, but I know that I have helped 3 different people who thought they could send a style property in as the .style property of the layer.

Sending in something that isn't a styleMap as a stylemap definitely feels weird to me, but I guess that I can just add this to the new feature_styling doc, and point people to it when they get stuck.

Thanks, Eric.

Note: See TracTickets for help on using tickets.