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

Added options 'innerRadius' and 'ringWidth' to draw rings instead of circles #44

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Severino
Copy link

@Severino Severino commented Nov 3, 2022

I needed the possibility to draw hollow ring-like semi-circles:

  • Prevent stacked semicircles from overlapping (e.g. when using semi-transparent color)
  • Creating gaps between the overlapping circles.

This is accomplished by simply using the two option parameters innerRadius or ringWidth alongside the
startAngle and stopAngle options.

  • innerRadius: set's the inner radius from the center of the semicircle
  • ringWidth: is an alternative Parameter that allows for setting the ringWidth directly: innerRadius = outerRadius - ringWidth

Preview can be seen here:
https://severino.github.io/Leaflet-semiring/examples/semirings.html

@jayli3n
Copy link

jayli3n commented Sep 22, 2023

Very cool feature, hope owner will merge this in

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.

2 participants