This is the code of org.andnav.osm.views.util.Mercator
public static double tile2lon(final int x, final int aZoom) {
return x / (1 << aZoom) * 360.0 - 180;
}
x should be cast to a double, ie
return (double)x / (1 << aZoom) * 360.0 - 180;
otherwise it always returns -180 because a relatively small number divided
by a much bigger number is always zero when rounded to an int.
Original issue reported on code.google.com by neilboyd on 4 Feb 2010 at 3:59
Original issue reported on code.google.com by
neilboyd
on 4 Feb 2010 at 3:59