Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[Android 4.1.0-beta.2] Mapbox LatLngBounds longitude and 'contains' algorithm error #5402

Closed
ghost opened this issue Jun 18, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Jun 18, 2016

  1. When 'west' longitude is positive, 'east' longitude is negative, LatLngBounds will invert west and east values.
  2. This error make MarkerView (may only visiable in LatLngBounds by default) not show.
  3. After fix this bug, the 'contains' method of LatLngBounds also needs to be changed:
  • The current algorithm:
    2016-06-18_233237
  • The right way (longitude part):
    2016-06-18_234426
  1. sample:
  • log: [N:77.02707134184479; E:177.68434665041946; S:-53.55760179239366; W:33.0421182655507]

2016-06-19_005652

  • log: [N:77.40489180472454; E:41.58002794488527; S:-52.53107115100817; W:-173.77774367024602]

(should be: [N:77.40489180472454; E:-173.77774367024602; S:-52.53107115100817; W:41.58002794488527])

2016-06-19_015903

@ghost ghost changed the title [Android 4.1.0-beta.2] Mapbox LatLngBounds 'contains' longitude algorithm error [Android 4.1.0-beta.2] Mapbox LatLngBounds error Jun 18, 2016
@ghost ghost changed the title [Android 4.1.0-beta.2] Mapbox LatLngBounds error [Android 4.1.0-beta.2] Mapbox LatLngBounds longitude error Jun 18, 2016
@ghost ghost changed the title [Android 4.1.0-beta.2] Mapbox LatLngBounds longitude error [Android 4.1.0-beta.2] Mapbox LatLngBounds longitude and 'contains' algorithm error Jun 18, 2016
@tobrun
Copy link
Member

tobrun commented Jun 20, 2016

This is due calling nativeGetAnnotationsInBounds on the dateline, this is something that should be resolved with #4522.

@zugaldia zugaldia added this to the android-v4.1.0 milestone Jun 20, 2016
@zugaldia
Copy link
Member

zugaldia commented Jun 20, 2016

#4522 requires a semver change, removing from this milestone for now.

@zugaldia zugaldia removed this from the android-v4.1.0 milestone Jun 20, 2016
@ghost
Copy link
Author

ghost commented Jun 21, 2016

if "We can't change the wrapping semantics again until the next major version: 5.0", is it possible to make MarkerView visiable out of LatLngBounds? @tobrun Thank you!

@tobrun
Copy link
Member

tobrun commented Jun 26, 2016

Issue:
ezgif com-video-to-gif 11

Solution:
ezgif com-video-to-gif 13

@CBiao thank you for reaching out and help resolving the bug.

@zugaldia
Copy link
Member

Fixed via #5484.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants