1

I display a feature-marker with ol.syle.icon. But when I put a rotation value, the icon rotate heavy in chaos order?

I thought the rotation value 0-360 is clockwise, is not it?

So e.g. a value of 180 should flip the icon horizontaly, but it does not?

0

1 Answer 1

3

According to http://openlayers.org/en/latest/apidoc/module-ol_style_Icon.html#~Options the rotation value is in radians, which means it ranges from 0 to 2*Pi instead of 0 to 360°.

1
  • Just a small extension to explicit @Mesa answer. Instead of 180° flip @Bytechanger your feature-marker performed the rotation of 233°, because of 180 Rad ≈ 10313°, and 10313° - 10080° = 233°, where 10080° is 28 times 360°.
    – Taras
    Commented Sep 12, 2018 at 7:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.