Skip to content

OL lineDash pattern translated incorrectly #47

Description

@mki-c2c

Empiric testing showed that lineDash specs are handled differently between OL and MFP:

OL:
each number of the line pattern represents the offset on each side of the center point, e.g half the segment width.
=> for a dotted pattern you need [0.5lineWidth, nlineWidth]

MFP:
each number of the line pattern represents the segment width.
=> for a dotted pattern (squares) you need [1lineWidth, nlineWidth]

so the translation code here would need to be changed:

symbolizer.strokeDashstyle = strokeDashstyle.join(' ');

change to
symbolizer.strokeDashstyle = strokeDashstyle.map(l=>l*2).join(' ');

to be confirmed and tested since the dash specs of OL and MFP are not very precise.

Can you please give me more information on the dash rendering, @gberaudo ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions