diff options
author | Osana Babayan <32496536+osana@users.noreply.github.com> | 2018-01-02 12:43:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-02 12:43:27 -0500 |
commit | 814c87fbab4608662f90084cff64c27cc5b12bc2 (patch) | |
tree | 06c1380128f66eba462f8df72751e448a98e85d9 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java | |
parent | 6ce38ccc6f49d6411e59cdc082ea941fe3e7b9c9 (diff) | |
download | qtlocation-mapboxgl-814c87fbab4608662f90084cff64c27cc5b12bc2.tar.gz |
add max & min latitude and longitude constants to maps sdk
add max & min latitude and longitude constants to maps sdk that are independent of Mercator projection
closes #10780
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java new file mode 100644 index 0000000000..1a7544d33a --- /dev/null +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java @@ -0,0 +1,63 @@ +package com.mapbox.mapboxsdk.constants; + +/** + * Contains constants used throughout the sdk classes. + * + * @since 6.0.0 + */ +public class GeometryConstants { + + /** + * The <a href='http://en.wikipedia.org/wiki/Earth_radius#Equatorial_radius'>equatorial radius</a> + * value in meters + * + * @since 6.0.0 + */ + public static final int RADIUS_EARTH_METERS = 6378137; + + /** + * This constant represents the lowest longitude value available to represent a geolocation. + * + * @since 6.0.0 + */ + public static final double MIN_LONGITUDE = -180; + + /** + * This constant represents the highest longitude value available to represent a geolocation. + * + * @since 6.0.0 + */ + public static final double MAX_LONGITUDE = 180; + + /** + * This constant represents the lowest latitude value available to represent a geolocation. + * + * @since 6.0.0 + */ + public static final double MIN_LATITUDE = -90; + + /** + * This constant represents the highest latitude value available to represent a geolocation. + * + * @since 6.0.0 + */ + public static final double MAX_LATITUDE = 90; + + /** + * Maximum latitude value in Mercator projection. + * + * @since 6.0.0 + */ + public static final double MAX_MERCATOR_LATITUDE = 85.05112877980659; + + /** + * Minimum latitude value in Mercator projection. + * + * @since 6.0.0 + */ + public static final double MIN_MERCATOR_LATITUDE = -85.05112877980659; + + private GeometryConstants() { + // Private constructor to prevent initializing of this class. + } +} |