Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable leg length #48

Open
vladutc opened this issue Nov 6, 2019 · 2 comments
Open

Configurable leg length #48

vladutc opened this issue Nov 6, 2019 · 2 comments

Comments

@vladutc
Copy link

vladutc commented Nov 6, 2019

Hello!

Can we include a feature to configure the length of the spiderfy leg? Right now, we only have legWeight and it would help a lot if we would also have that as an option when creating the layer.

Thank you!

@jawj
Copy link
Owner

jawj commented Nov 6, 2019

The parameters you're looking for are these, especially the xxxFootSeparation ones:

p['circleSpiralSwitchover'] = 9    # show spiral instead of circle from this marker count upwards
                                     # 0 -> always spiral; Infinity -> always circle
p['circleFootSeparation'] = 25     # related to circumference of circle
p['circleStartAngle'] = twoPi / 12
p['spiralFootSeparation'] = 28     # related to size of spiral (experiment!)
p['spiralLengthStart'] = 11        # ditto
p['spiralLengthFactor'] = 5        # ditto

@magicmb
Copy link

magicmb commented Jan 30, 2020

Yep that did the trick for me, although I was thinking the same as @vladutc since the docs for OverlappingMarkerSpiderfier-Leaflet only mention legWeight (default: 1.5) unlike the docs for OverlappingMarkerSpiderfier (OMS for Google Maps API v3) which cover all below mentioned options.

circleFootSeparation (default: 23), circleStartAngle (default: pi / 6),
spiralFootSeparation (default: 26), spiralLengthStart (default: 11), spiralLengthFactor (default: 4)

It's a good thing they also work in OverlappingMarkerSpiderfier-Leaflet 👍

PS Really great marker plugin for Leaflet by the way 😊

The parameters you're looking for are these, especially the xxxFootSeparation ones:

p['circleSpiralSwitchover'] = 9    # show spiral instead of circle from this marker count upwards
                                     # 0 -> always spiral; Infinity -> always circle
p['circleFootSeparation'] = 25     # related to circumference of circle
p['circleStartAngle'] = twoPi / 12
p['spiralFootSeparation'] = 28     # related to size of spiral (experiment!)
p['spiralLengthStart'] = 11        # ditto
p['spiralLengthFactor'] = 5        # ditto

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

No branches or pull requests

3 participants