-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Out of bounds interaction telemetry events on Android #4444
Comments
I've been able to reproduce the issue for Longitude. It seems centered around the International Date Line. I'll continue looking to see if I can find it elsewhere. 03-24 15:08:28.594 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 503.0, y = 765.52454; tapLatLng = LatLng [longitude=-170.73755048183057, latitude=20.631945963786507, altitude=0.0]
03-24 15:08:28.624 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 510.02267, y = 764.4962; tapLatLng = LatLng [longitude=-170.54494119212745, latitude=20.65833841256945, altitude=0.0]
03-24 15:08:28.634 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 513.0, y = 764.0; tapLatLng = LatLng [longitude=-170.46328199459674, latitude=20.67107244593123, altitude=0.0]
03-24 15:08:28.634 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 513.0, y = 764.0; tapLatLng = LatLng [longitude=-170.46328199459674, latitude=20.67107244593123, altitude=0.0]
03-24 15:08:34.514 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 531.0, y = 794.0; tapLatLng = LatLng [longitude=-175.15328030718524, latitude=20.438555684695217, altitude=0.0]
03-24 15:08:39.494 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 376.0, y = 844.0; tapLatLng = LatLng [longitude=-180.48651391197888, latitude=19.76890837502343, altitude=0.0]
03-24 15:08:47.634 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 293.0, y = 860.0; tapLatLng = LatLng [longitude=176.30453970395126, latitude=19.48032017375806, altitude=0.0]
03-24 15:08:49.574 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 409.0, y = 849.0; tapLatLng = LatLng [longitude=177.8952992525888, latitude=19.622469995904936, altitude=0.0]
03-24 15:08:50.944 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 460.0, y = 838.0; tapLatLng = LatLng [longitude=178.59468496221257, latitude=19.764494192798992, altitude=0.0]
03-24 15:08:52.424 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 543.0, y = 809.0; tapLatLng = LatLng [longitude=179.7329011302631, latitude=20.138315647099105, altitude=0.0]
03-24 15:08:54.024 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 610.0, y = 819.0; tapLatLng = LatLng [longitude=180.65170175522468, latitude=20.009511668446294, altitude=0.0]
03-24 15:08:56.314 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 662.0, y = 803.0; tapLatLng = LatLng [longitude=181.3648013286366, latitude=20.215546908862876, altitude=0.0]
03-24 15:08:59.514 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 662.0, y = 791.0; tapLatLng = LatLng [longitude=181.3648013286366, latitude=20.36989436476091, altitude=0.0]
03-24 15:09:04.884 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 646.0, y = 801.0; tapLatLng = LatLng [longitude=-177.07237023360594, latitude=20.13831525485371, altitude=0.0]
03-24 15:09:11.384 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 509.5, y = 840.0; tapLatLng = LatLng [longitude=-178.94425551524685, latitude=19.635386525623275, altitude=0.0]
03-24 15:09:11.404 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 509.5, y = 840.0; tapLatLng = LatLng [longitude=-178.94425551524685, latitude=19.635386525623275, altitude=0.0]
03-24 15:09:11.414 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 885.0, y = 810.0; tapLatLng = LatLng [longitude=-173.7948566008229, latitude=20.02239678589983, altitude=0.0]
03-24 15:09:11.424 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 508.0, y = 839.0; tapLatLng = LatLng [longitude=-178.96482568317697, latitude=19.64830240999642, altitude=0.0]
03-24 15:09:11.424 14948-14948/com.mapbox.mapboxsdk.testapp I/ScaleGestureDetector: TwScaleGestureDetector
03-24 15:09:12.384 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 886.0, y = 810.0; tapLatLng = LatLng [longitude=-164.81730106297266, latitude=21.333094041341667, altitude=0.0]
03-24 15:09:12.844 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 544.0, y = 858.5; tapLatLng = LatLng [longitude=-177.9143768488237, latitude=19.732811237540616, altitude=0.0]
03-24 15:09:12.854 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 544.0, y = 858.5; tapLatLng = LatLng [longitude=-177.9143768488237, latitude=19.732811237540616, altitude=0.0]
03-24 15:09:12.864 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 869.0, y = 849.0; tapLatLng = LatLng [longitude=-164.59684496399072, latitude=20.09880967753537, altitude=0.0]
03-24 15:09:12.864 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 543.1528, y = 858.5; tapLatLng = LatLng [longitude=-177.9490937712945, latitude=19.732811237540616, altitude=0.0]
03-24 15:09:12.874 14948-14948/com.mapbox.mapboxsdk.testapp I/ScaleGestureDetector: TwScaleGestureDetector |
Was also able to verify this when zoomed out to Zoom 0 and trying to tap the North and South Poles for Latitude range testing around the International Date Line. 03-24 15:14:11.424 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 351.0, y = 1314.0; tapLatLng = LatLng [longitude=131.04411122034674, latitude=-70.88488827714265, altitude=0.0]
03-24 15:14:12.844 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 627.0, y = 64.0; tapLatLng = LatLng [longitude=188.78114551104846, latitude=83.71261182839297, altitude=0.0]
03-24 15:14:14.984 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 644.0, y = 125.0; tapLatLng = LatLng [longitude=197.15329713231466, latitude=82.10275364917152, altitude=0.0]
03-24 15:14:15.874 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 614.0, y = 28.0; tapLatLng = LatLng [longitude=191.23104134769966, latitude=84.50465429121468, altitude=0.0]
03-24 15:14:28.154 14948-14948/com.mapbox.mapboxsdk.testapp I/MapView: x = 627.0, y = 1607.0; tapLatLng = LatLng [longitude=194.0217541963687, latitude=-83.5699672169096, altitude=0.0] |
This regression is due to cutting the release branch after #4275 landed but before #4285 landed. If #4285 remains too risky, we can wrap the coordinates at the SDK/JNI level for each platform as a stopgap. /cc @jfirebaugh |
Also noting that this is going to be an issue on the iOS side too. /cc @boundsj |
#4464 mitigates the issue on iOS. |
…solve problem and mirror Android Google Maps API
After consulting with @1ec5 @jfirebaugh @brunoabinader and reviewing Google's Android LatLng API I decided that it was safe to wrap at the JNI level for all use cases of For future archeological digs though, at this time the only place that uses |
Merged into |
I just used the TestApp pointed against Production to send in a bunch of 03-24 17:22:53.314 11848-14870/com.mapbox.mapboxsdk.testapp I/MapboxEventManager: response code = 204 for events 72 |
To clarify, #4464 and #4465 prevent a change in behavior as compared to the previous releases. If you ever remove the wrapping, as @jfirebaugh has proposed, we’ll need another semver bump. |
Seeing some Android interaction events (
map.click
) come in that have out of bounds values forlng
-- in api-events we strictly enforcelat
to between -90 and 90, andlng
to -180 to 180 so these events are getting filtered out.e.g.
lat: 39.130515262056804, lng: -187.88018805382615
lat: -64.25024633537475, lng: 191.59464321880097
cc @bleege
The text was updated successfully, but these errors were encountered: