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

Location picker, and maps in general handle lat/long outiside of a single planet. #4599

Open
LovesTha opened this issue Feb 16, 2025 · 0 comments
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@LovesTha
Copy link

Expected Behavior

Location data should be constrained to +-90 degrees for lat, and +-180 degrees for long (or [0-360) for long)

Current Behavior

Zooming into the wrong alias of Australia can give you locations with positive or negative longitude values. Then when those locations are put onto a map view it will be zoomed out enough to show two Australias, one with the positive long values and one with the negative long values

Possible Solution

Location picker should alias positions onto a single copy of the globes coordinates once the location is picked.

Care may be needed to ensure that a bunch of locations picked each side of the 0 degree line doesn't cause the default map view to be the whole globe. But that unusual corner case may not be worth the time handling well.

Steps to Reproduce (for Bugs)

  1. Create a map page
  2. Add some location markers
  3. Use the map location selector for the location markers location
  4. Zoom out till you see three Australias, zoom into one to pick a location
  5. Repeat for a few location markers but zoom in on different Australias each time
  6. Save the map page
  7. Load the map page, see that the default zoom shows you multiple Australias
  8. Zooming into an australia will only show you the markers on that Australia

This bug wasted a lot of time on me trying to fix the default zoom level, when it was that I had markers in different Melbournes.

Your Environment

OpenHAB 4.3.2

@LovesTha LovesTha added the bug An unexpected problem or unintended behavior of the Core label Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

No branches or pull requests

1 participant