You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Location mark (not drawn) disappears when view crosses international date line. #3995
Given the view crosses the international date line (180 degrees E)
Given the center of the screen is right/east of the dateline
When the user location is east of the dateline
Then the user location should be drawn (but is not drawn)
See below screenshots where the location is: 16.85 S , 179.89 W
@tobrun yes, dealing with the dateline is always fun. I'm wondering if you're willing to escalate this issue as it is a blocker for me. I have a large audience in New Zealand who use my app (MX Mariner) on the water, near the dateline. I'm currently using the previously deprecated Mapbox SDK and this is the remaining issue before making the switch to Mapbox GL. Thank you,
Will
@manimaul I would recommend looking at the following known issues for Android before switching over to new SDK. Your application will stop working on certain devices (where it previously worked including older Google Galaxy Nexus).
@manimaul I added this issue to the higher priority list of bugs to solve. Sorry for not being able to give you a concrete ETA. It is not the only issue on that list. For now I'm doing some small tests around this issue to identify the source and determine the amount of work needed to get a fix in.
@manimaul could you give me some more information how you are setting this test up?
All the mock GPS apps I have tested, don't work with this dateline issue.
Example of this here, where you can see it's going the opposite direction.
@manimaul
thank you for adding that information. I was tackling this issue from the perspective of having a route/gps trace. Looking into manually setting the location reveals the following:
if you pan the map a bit to the right, the UserLocationView disappears:
The source of that issue will be the solution to what is mentioned above.
I was able to pinpoint this to toScreenLocation method returning the wrong values when crossing the dateline. This toScreenLocation is used in the following method:
publicPointFgetMarkerScreenPoint() {
if (mMyLocationTrackingMode == MyLocationTracking.TRACKING_NONE) {
mMarkerScreenPoint = mProjection.toScreenLocation(mMarkerCoordinate);
} else {
// tracking the user
}
returnmMarkerScreenPoint;
}
This method is being called on every update call, to get the correct x,y coordinates for the UserLocationView. Currently not the correct values are returned.
Activity
tobrun commentedon Feb 18, 2016
@manimaul thank you for reporting this edge-case, this is great information to have.
friedbunny commentedon Feb 18, 2016
There's no edge like the dateline edge. 🤔
manimaul commentedon Feb 20, 2016
@tobrun yes, dealing with the dateline is always fun. I'm wondering if you're willing to escalate this issue as it is a blocker for me. I have a large audience in New Zealand who use my app (MX Mariner) on the water, near the dateline. I'm currently using the previously deprecated Mapbox SDK and this is the remaining issue before making the switch to Mapbox GL. Thank you,
Will
mb12 commentedon Feb 21, 2016
@manimaul I would recommend looking at the following known issues for Android before switching over to new SDK. Your application will stop working on certain devices (where it previously worked including older Google Galaxy Nexus).
#2980
#4037
#3693
#1702
manimaul commentedon Feb 22, 2016
@mb12 thanks, I'll definitely keep an eye on those issues before making the leap.
tobrun commentedon Feb 25, 2016
@manimaul I added this issue to the higher priority list of bugs to solve. Sorry for not being able to give you a concrete ETA. It is not the only issue on that list. For now I'm doing some small tests around this issue to identify the source and determine the amount of work needed to get a fix in.
tobrun commentedon Feb 25, 2016
@manimaul could you give me some more information how you are setting this test up?
All the mock GPS apps I have tested, don't work with this dateline issue.
Example of this here, where you can see it's going the opposite direction.
manimaul commentedon Feb 26, 2016
@tobrun I'm using the Genymotion Android emulator which makes it easy to set the device's location.
other options:
tobrun commentedon Mar 1, 2016
@manimaul
thank you for adding that information. I was tackling this issue from the perspective of having a route/gps trace. Looking into manually setting the location reveals the following:
if you pan the map a bit to the right, the UserLocationView disappears:
The source of that issue will be the solution to what is mentioned above.
tobrun commentedon Mar 1, 2016
I was able to pinpoint this to
toScreenLocationmethod returning the wrong values when crossing the dateline. ThistoScreenLocationis used in the following method:This method is being called on every update call, to get the correct x,y coordinates for the UserLocationView. Currently not the correct values are returned.
For example:
before crossing the dateline:
after
tobrun commentedon Mar 1, 2016
Been trying to locate this problem in C++.
It is going through
map.cpp,transform.cppandtransform_state.cpp.In
transform_state.cppit is using the following method:which on his turn calls
coordinateToPointandlatLngToCoordinate:tobrun commentedon Mar 1, 2016
I made a follow up issue #4155, since this problem is found in
mbglinstead ofAndroid SDK.tobrun commentedon Mar 6, 2016
I'm closing this issue in favour of #4155