summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorTobrun Van Nuland <tobrun.van.nuland@gmail.com>2017-08-14 14:18:51 +0200
committerTobrun <tobrun@mapbox.com>2017-08-19 11:29:38 +0200
commita83c19e9543ae3a84bfe41db9a03a9f4f4957064 (patch)
tree8fa87ce7cea626bebb10c3a83a7a7f29f04ca8b5 /platform/android
parent2802c55bd5e4f104fee991cb944e4d2503cbb18d (diff)
downloadqtlocation-mapboxgl-a83c19e9543ae3a84bfe41db9a03a9f4f4957064.tar.gz
[android] - re-add projectedMeters
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java
index 3841809a65..16c73b1ca5 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java
@@ -6,6 +6,7 @@ import android.support.annotation.NonNull;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
+import com.mapbox.mapboxsdk.geometry.ProjectedMeters;
import com.mapbox.mapboxsdk.geometry.VisibleRegion;
/**
@@ -45,6 +46,20 @@ public class Projection {
}
/**
+ * Returns the spherical Mercator projected meters for a LatLng.
+ */
+ public ProjectedMeters getProjectedMetersForLatLng(LatLng latLng) {
+ return nativeMapView.projectedMetersForLatLng(latLng);
+ }
+
+ /**
+ * Returns the LatLng for a spherical Mercator projected meters.
+ */
+ public LatLng getLatLngForProjectedMeters(ProjectedMeters projectedMeters) {
+ return nativeMapView.latLngForProjectedMeters(projectedMeters);
+ }
+
+ /**
* <p>
* Returns the distance spanned by one pixel at the specified latitude and current zoom level.
* </p>