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

Commit

Permalink
[android] - re-add projectedMeters
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Aug 15, 2017
1 parent 5d62028 commit 4099301
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
import com.mapbox.mapboxsdk.geometry.ProjectedMeters;
import com.mapbox.mapboxsdk.geometry.VisibleRegion;

/**
Expand Down Expand Up @@ -44,6 +45,20 @@ public void invalidateContentPadding(int[] userLocationViewPadding) {
setContentPadding(contentPadding, userLocationViewPadding);
}

/**
* 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.
Expand Down

0 comments on commit 4099301

Please sign in to comment.