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

[Maps] Icon rotation should use bearing/azimuth semantics #77496

Closed
thomasneirynck opened this issue Sep 15, 2020 · 5 comments
Closed

[Maps] Icon rotation should use bearing/azimuth semantics #77496

thomasneirynck opened this issue Sep 15, 2020 · 5 comments
Labels
bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation

Comments

@thomasneirynck
Copy link
Contributor

thomasneirynck commented Sep 15, 2020

Kibana version:

master and before

Describe the bug:

Dynamic icon rotation rotates the icon based on a field-value.

The rotation center is the 2D-graphics convention, with rotation starting on top of the screen and flipping down clockwise (since Y-axis is oriented downward).

When devices (e.g. GPS/ rfid-sensors...) emit azimuth/bearing, this is usually based on how the object crosses longitude, with the 0-angle parallel with the equator, counting counter-clockwise

Steps to reproduce:

  1. Use field-based dynamic orientation
  2. icon rotates using 2d-graphic API semantics

Expected behavior:

use bearing semantics (which is "geo"-focused)

Screenshots (if relevant):

Existing behavior:

Car oriented using 2D-graphics API semantics (not lined up 😢 )

image

Expected behavior:

Car oriented using bearing semantics (lined up 😄 )

image

Any additional context:

This would be a slight breaking change. Could make this optional.

@thomasneirynck thomasneirynck added bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation labels Sep 15, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@thomasneirynck
Copy link
Contributor Author

Should wait on #77366, as this PR isolates getting the actual-value used by mapbox (e.g. orientation), into the actual style. This would make any updates to this a little more cleanly.

@kmartastic
Copy link
Contributor

This would be a great enhancement for tracking use cases.
What happens if the value is greater than 360? @thomasneirynck

@thomasneirynck
Copy link
Contributor Author

@kmartastic it gets normalized. So e.g. 370 would be considered 10.

@thomasneirynck
Copy link
Contributor Author

I'm going to close this. This is actually wrong. True north azimuth roughly corresponds to orientation in 2D graphics semantics.

The code that was generating this data, was buggy, calculating azimuth the cartesian-way, starting with 0 at the X-axis, counter-clockwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation
Projects
None yet
Development

No branches or pull requests

3 participants