Java tutorial
//package com.java2s; //License from project: Open Source License import android.util.Log; public class Main { public static double CbdX; public static double CbdY; public static void MercatorToBD(double mercatorX, double mercatorY) { CbdX = mercatorY / 20037508.34 * 180; CbdX = 180 / Math.PI * (2 * Math.atan(Math.exp(CbdX * Math.PI / 180)) - Math.PI / 2); CbdY = mercatorX / 20037508.34 * 180; Log.d("CustomerActivity", "x" + Double.toString(CbdX)); Log.d("CustomerActivity", "y" + Double.toString(CbdY)); } }