convert Pixel To longitude - Java java.lang

Java examples for java.lang:Math Convert

Description

convert Pixel To longitude

Demo Code


//package com.java2s;

public class Main {
    static private int map_offset = 268435456;
    static private double map_radius = map_offset / Math.PI;

    static public double convertPixelToLng(int px) {
        return (px - map_offset) / map_radius * 180 / Math.PI;
    }//from ww w.  j  ava2  s  . c om
}

Related Tutorials