jieter / Leaflet-semicircle

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

Precision with concentric semi-circle #4

Closed laurentClave closed 8 years ago

laurentClave commented 9 years ago

I have concentric semi-circles with the same radius that do not appear in the same position with different zoom

ZOOM 2 : The circles do not have the same center 1

ZOOM 1 : The circles are concentric 2

jieter commented 9 years ago

Please post an example of the code to produce this error.

laurentClave commented 9 years ago

Hi,

OK, i reproduce the bug : http://jsfiddle.net/fJFWN/123/

In my project the bug is even more visible.

Zoom 3, ok : 1

Zoom 1, bug : 2

Thank

laurentClave commented 9 years ago

If the circles have the same angle, it looks like there is no bug

laurentClave commented 9 years ago

Up ?

laurentClave commented 9 years ago

You don't have a idea of problem ?

jieter commented 9 years ago

I had a quick look into it but could not find a solution. Currently lacking the time to dig in deeper, if you can do that, I'll be more than happy to merge your PR.

jieter commented 8 years ago

It was a matter of removing the rounding, this looks almost perfect now:

http://jieter.github.io/Leaflet-semicircle/examples/concentric.html