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

[android] add max & min latitude and longitude constants to maps sdk #10729

Closed
osana opened this issue Dec 18, 2017 · 0 comments · Fixed by #10780
Closed

[android] add max & min latitude and longitude constants to maps sdk #10729

osana opened this issue Dec 18, 2017 · 0 comments · Fixed by #10780
Assignees
Labels
Android Mapbox Maps SDK for Android

Comments

@osana
Copy link
Contributor

osana commented Dec 18, 2017

LatLngBounds and LatLng rely on GeoConstants from telemetry api (which are Mercator projection base) in some place and on hard coded values like (-90,90 & -180,180) in some other places

Capturing Slack conversation:
@Guardiola31337:
https://github.com/mapbox/mapbox-java/blob/mas-2.x.x/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/constants/GeoConstants.java
https://github.com/mapbox/mapbox-java/blob/mas-2.x.x/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/utils/MathUtils.java
are not part of the new telemetry library anymore but those are used from the maps sdk, would it make sense to include them within the new geojson library? we could also include them within the maps sdk, any preferences?

@cammace: the GeoJSON spec defines the max lat as 90 degrees

@tobrun: I wasn’t aware it was found outside of the maps SDK. If there is a need to have different values, I would suggest having one in the maps SDK itself to reflect the values set by core

@cammace: I'd suggest keeping them separate

@Guardiola31337: https://github.com/mapbox/mapbox-gl-native/blob/52fb636a3bd0c33816857df7c58305abd35ab921/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraPosition.java
https://github.com/mapbox/mapbox-gl-native/blob/52fb636a3bd0c33816857df7c58305abd35ab921/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/LatLng.java
https://github.com/mapbox/mapbox-gl-native/blob/52fb636a3bd0c33816857df7c58305abd35ab921/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/LatLngBounds.java
https://github.com/mapbox/mapbox-gl-native/blob/52fb636a3bd0c33816857df7c58305abd35ab921/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
those are the classes in which we use telem GeoConstants and MathUtils implementations
I’ve provisionally added them in pg-new-events-lib-integration https://github.com/mapbox/mapbox-gl-native/blob/52fb636a3bd0c33816857df7c58305abd35ab921/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/GeoConstants.java https://github.com/mapbox/mapbox-gl-native/blob/52fb636a3bd0c33816857df7c58305abd35ab921/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/MathUtils.java to start testing new telemetry library integration

@asheemmamoowala: The 85.xxx is for Mercator projections only. Let's make sure to allow the full extent [-90,90] in the APIs where we take LatLng input.

cc @cammace @Guardiola31337 @asheemmamoowala @tobrun

@osana osana self-assigned this Dec 18, 2017
@osana osana added the Android Mapbox Maps SDK for Android label Dec 18, 2017
@osana osana changed the title [android] use GeoConstants instead of hard coded values [android] add max & min latitude and longitude constants to MAS sdk Dec 21, 2017
@osana osana changed the title [android] add max & min latitude and longitude constants to MAS sdk [android] add max & min latitude and longitude constants to maps sdk Dec 21, 2017
@osana osana added this to the android-v6.0.0 milestone Dec 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant