jieter / Leaflet-semicircle

Extend Leaflet's circle class to display semicircles.
http://jieter.github.io/Leaflet-semicircle/examples/semicircle.html
MIT License
121 stars 52 forks source link

Fixed radius regardless of zoom level? #27

Open BARNZ opened 6 years ago

BARNZ commented 6 years ago

Is there a way to make it so that zooming the map doesn't affect the radius of the semicircle when it is drawn?

i.e Zooming in real close on the demo map makes the semicircles extremely large, and I am after a way to keep their size fixed regardless of zoom level. e.g always have a radius of say 100px

My first attempt was a simple linear transform of the radius parameter based on current zoom level of the map which doesn't quite work, it looks as though the way things are projected isn't linear or I'm misunderstanding something.

jieter commented 6 years ago

That would mean a second class, someting like SemicircleMarker, analogous to L.CircleMarker. You are welcome to open a PR.

Snaptags commented 5 years ago

There already is a SemiCircleMarker in the code. Has this been fully implemented already?