OpenLayers OpenLayers

Ticket #1126 (closed feature: fixed)

Opened 9 months ago

Last modified 6 days ago

Specify the stroke style of the feature

Reported by: fredj Assigned to: tschaub
Priority: major Milestone: 2.7 Release
Component: Format.SLD Version:
Keywords: Cc:
State: Complete

Description

Let the user specify the stroke style of the vector features:

  • solid, dotted, dashed, etc ...

For SVG set the stroke-dasharray property doc and the dashstyle property for VML doc

Attachments

strokeDash.00.patch (2.9 kB) - added by fredj on 11/06/07 10:12:10.
strokeDash.01.patch (7.3 kB) - added by fredj on 11/16/07 03:08:28.
clean the code, modify vector-features.html
1126-r7654-A0.patch (10.1 kB) - added by ahocevar on 07/31/08 22:04:54.
adds sld support and tests
1126-r7667-A0.patch (10.2 kB) - added by ahocevar on 08/01/08 14:31:31.
new patch with the improvements suggested by crschmidt, except for strokeDashStyle. Since the property is called dashstyle (all lowercase) in VML, I would prefer to keep it like it is.

Change History

11/06/07 10:12:10 changed by fredj

  • attachment strokeDash.00.patch added.

11/16/07 03:08:28 changed by fredj

  • attachment strokeDash.01.patch added.

clean the code, modify vector-features.html

12/15/07 16:35:35 changed by crschmidt

  • state changed.
  • milestone changed from Future to 2.6 Release.

12/15/07 20:05:28 changed by crschmidt

  • state set to Review.

I think this is ready for Review -- fred, can you confirm that?

12/17/07 03:40:08 changed by fredj

  • state changed from Review to Needs More Work.

The patch has to be modified to be SLD compatible, to match the stroke-dasharray and stroke-dashoffset css parameters.

This is trivial with SVG but the VML renderer don't allow the user to specify an array but only predefined values (see: http://msdn2.microsoft.com/en-us/library/bb264134.aspx#dashstyle)

12/20/07 02:04:50 changed by fredj

  • owner set to tschaub.
  • component changed from Feature.Vector to Format.SLD.

12/20/07 02:05:40 changed by fredj

  • owner changed from tschaub to fredj.

12/21/07 08:03:35 changed by ahocevar

Mapping of stroke dash styles to VML could either be solved by translating typical patterns to the pre-defined dash styles of VML, or by doing it the hard way: interpolate the line using an y=kx+d equation and draw lines with lengths and gaps defined in the dasharray, starting from the start vertex until the end vertex is reached.

The former approach would basically limit us to dotted, dashed and dash-dotted in various lengths. The latter approach would increase rendering time, especially for polygons where we would have to draw a polygon without border and a border line by hand.

Either way, this is not trivial for VML.

01/09/08 03:50:21 changed by crschmidt

  • milestone changed from 2.6 Release to 2.7 Release.

Unless there's a strong demand for this, until there's an improved patch or statement that someone is working on it, bumping to 2.7. (If you're working on it and want it in 2.6, speak up.)

07/28/08 14:37:59 changed by euzuro

  • owner changed from fredj to ahocevar.
  • priority changed from minor to major.

07/31/08 22:04:54 changed by ahocevar

  • attachment 1126-r7654-A0.patch added.

adds sld support and tests

07/31/08 22:08:25 changed by ahocevar

  • owner changed from ahocevar to tschaub.
  • state changed from Needs More Work to Review.

08/01/08 14:25:53 changed by crschmidt

  • state changed from Review to Needs More Work.

Functional change:

  • VML 'case' statement has a 'return' too early in the list, needs to move down.

Prettiness change:

  • Switch/case statements don't have indent.
  • Name strokeDashstyle seems like it would fall in line more with strokeDashStyle.

08/01/08 14:31:31 changed by ahocevar

  • attachment 1126-r7667-A0.patch added.

new patch with the improvements suggested by crschmidt, except for strokeDashStyle. Since the property is called dashstyle (all lowercase) in VML, I would prefer to keep it like it is.

08/01/08 14:38:38 changed by ahocevar

  • state changed from Needs More Work to Review.

08/01/08 15:35:44 changed by crschmidt

  • state changed from Review to Commit.

Looks good. Please commit.

08/01/08 17:56:17 changed by ahocevar

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [7673]) Stroke style of features can now be specified. Both SVG's stroke-dasharray and VML's dashstyle properties are allowed in the new strokeDashstyle symbolizer property. For VML, which does not support custom dash styles, one of the 5 matching pre-defined dash styles will be guessed. The patch also adds support for the stroke-dasharray property in SLD. r=crschmidt (closes #1126)