This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
4 changed files
with
103 additions
and
37 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
...id/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters