Skip to content

Conversation

@rmaceissoft
Copy link

@rmaceissoft rmaceissoft commented Nov 4, 2016

add symbolOffet as a pattern option, for a relative pixel offset to apply to symbols, in case we don't want them overlapping the path.

Exampleof usage (symbolOffset=15)

Code:

var polyline = L.polyline(geometry, styles).addTo(map);
var decorator = L.polylineDecorator(polyline, {
  patterns: [
    {offset: 0, repeat: 200, symbolOffset: 15, symbol: L.Symbol.arrowHead({
      polygon: false,
      headAngle: 40,
      pixelSize: 10,
      pathOptions: {opacity: 1, weight: 2, stroke: true, color:'#2461AA'}
    })}
  ]
});

Screenshot:

screen shot 2016-11-04 at 11 39 33 am

…pply to symbols, in case we don't want them overlapping the path
@rmaceissoft rmaceissoft changed the title add symbolOffet as a pattern option, for a relative pixel offset to a… add symbolOffet as a pattern option, for a relative pixel offset to apply to symbols Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant