Skip to content

Instantly share code, notes, and snippets.

Avatar

Conrad Ljungström Coinhunter

View GitHub Profile
View M2HClient.java
package se.springworks.api.client;
import com.squareup.okhttp.OkHttpClient;
import java.util.List;
import retrofit.Callback;
import retrofit.RequestInterceptor;
import retrofit.RestAdapter;
import retrofit.client.OkClient;
View gist:9533345
int mZoomLevel = mapView.getZoomLevel();
final double maxZoomLatitudeSpan = mZoomLevel == guide.getMap().getMaxZoom() ?
mapView.getBoundingBox().getLatitudeSpanE6() :
mapView.getBoundingBox().getLatitudeSpanE6() / Math.pow(2, guide.getMap().getMaxZoom() - mZoomLevel);
final double requiredLatitudeZoom =
guide.getMap().getMaxZoom() -
Math.ceil(Math.log(box.getLatitudeSpanE6() / maxZoomLatitudeSpan) / Math.log(2));
final double maxZoomLongitudeSpan = mZoomLevel == guide.getMap().getMaxZoom() ?