Project AgsPoint (spatial reference 4326 to spatial reference 102100)

below formula converts 4326 latitude to 102100 latitude

+ (double)toWebMercatorY double)latitude
{
double rad = latitude * 0.0174532;
double fsin = sin(rad);

double y = 6378137 / 2.0 * log((1.0 + fsin) / (1.0 - fsin));

return y;
}

below formula converts 4326 longitude to 102100 longitude
+ (double)toWebMercatorX double)longitude
{
double x = longitude * 0.017453292519943 * 6378137;

return x;
}

See my attachment , it contains a utility mercator convertor . You can simply import the class in your project and call the above static methods on it

 

Archive.zip‎

你可能感兴趣的:(reference)