OpenLayers OpenLayers

Ticket #543 (closed feature: fixed)

Opened 2 years ago

Last modified 1 year ago

Vector layers should permit default styling

Reported by: sderle Assigned to:
Priority: major Milestone: 2.4 Release
Component: Layer Version:
Keywords: Cc:
State:

Description

apparently this was an oversight or miscommunication on our parts...

see http://www.nabble.com/GML-Layers-is-no-more-visible-in-vector-sandbox-revision-2823-tf3432889.html for an example

Attachments

vector.styling.patch (1.6 kB) - added by crschmidt on 03/29/07 07:13:20.
vector.layer.patch (2.1 kB) - added by crschmidt on 03/31/07 07:56:47.

Change History

03/29/07 07:13:20 changed by crschmidt

  • attachment vector.styling.patch added.

03/29/07 07:14:48 changed by crschmidt

  • keywords set to review.

The patch above adds support for this. It also adds support for a preFeatureInsert function, which will allow users to modify the style based on attributes *before* it's drawn, rather than adjusting the style and then redrawing as is currently neccessary. I can break this out into a seperate patch if desired, but this will need to be committed first in that case.

03/29/07 12:06:59 changed by sderle

  • keywords deleted.

this is not quite what we had in mind. cr5 and I have discussed and I will update the patch.

03/31/07 07:56:47 changed by crschmidt

  • attachment vector.layer.patch added.

03/31/07 07:58:51 changed by crschmidt

  • keywords set to review.

This change:

  • Removes default styling from the Feature.Vector class.
  • Adds a 'style' property to the layer.
  • When a feature is added to a layer, either uses the style on the layer, or uses the default feature style.
  • Adds a preFeatureInsert hook to change a feature's style *before* drawing it.

04/01/07 00:59:48 changed by sderle

  • keywords changed from review to commit.

looks good. please commit.

04/01/07 08:08:36 changed by crschmidt

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

r2949, with example and tests update.

07/05/07 16:55:58 changed by euzuro

  • keywords deleted.