-
Notifications
You must be signed in to change notification settings - Fork 52
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
strange behaviour of semicircle, arc on wrong site #22
Comments
@it4workflow I tested with this example page: http://jieter.github.io/Leaflet-semicircle/examples/semicircle.html, which still looks good to me, but I released the latest version in a bit of a hurry, so I might have missed something. You could try to use 0.1.2 (note the different syntax). |
Okay, i've played a little bit, what's about this one. The view of this viewpoint is from 270° to 22° (to NNW 337°) , the lines are correct, but the arc is wrong |
i figured out a little bit, the problem only occurs with usage of start-/stopangle and startAngle>stopAngle. I'ved rewrite my code, manually determine the direction and size and call your setDirection-method. |
I suspected something like that, but we could try to do better on rendering in those cases... Reopened. If someone has time to make a fix, please open a PR. |
Just yesterday i read the discussion about direction for viewpoint in the OpenStreetMap wiki. And there's an interessting point: the stopAngle always has to be bigger than the startAngle - especially if the calculation is done by modulo 360. In the playground example above, i've used startAngle=270 and stopAngle=22 (because this are the values stored in database) to get a view from west via north to northnorthwest. But you fix and correct this with the if conditions in start-/stopAngle methods ... and now i think this is right and ok. So i think, if you mention that circumstance in your documentation it should be fine. |
i use semicircle to display the direction tag of openstreetmap. have a look at viewpoint-direction. there you can see some semicircles, which were incorrectly drawn:
So what have i missed?
The text was updated successfully, but these errors were encountered: