// based on google js
// http://maps.gstatic.com/intl/en_us/mapfiles/api-3/2/10/main.js
// search for fromLatLngToPoint and fromPointToLatLng
+ /*
private static Point2D.Double pt(LatLng latlng, int zoom) {
double scale_x = 256/360.0 * Math.pow(2, zoom);
double scale_y = 256/(2.0*Math.PI) * Math.pow(2, zoom);
return pt(latlng, scale_x, scale_y);
}
+ */
private static Point2D.Double pt(LatLng latlng,
double scale_x, double scale_y)
private LatLng latlng(double x, double y) {
return latlng(new Point2D.Double(x,y), scale_x, scale_y);
}
+ /*
private LatLng latlng(Point2D.Double pt) {
return latlng(pt, scale_x, scale_y);
}
+ */
ConcurrentHashMap<Point,AltosSiteMapTile> mapTiles = new ConcurrentHashMap<Point,AltosSiteMapTile>();
Point2D.Double centre;
AltosSiteMap asm = new AltosSiteMap(true);
asm.centre = asm.getBaseLocation(lat, lng);
- Point2D.Double p = new Point2D.Double();
- Point2D.Double p2;
+ //Point2D.Double p = new Point2D.Double();
+ //Point2D.Double p2;
int dx = -w/2, dy = -h/2;
for (int y = dy; y < h+dy; y++) {
for (int x = dx; x < w+dx; x++) {