Skip to content

OL lineDash pattern translated incorrectly #47

@mki-c2c

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 ?

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