Flipped flat map so North is up

This commit is contained in:
zeeZ 2011-04-08 21:40:16 +02:00
parent d53b3bc340
commit 553a956949
2 changed files with 3 additions and 3 deletions

View File

@ -117,7 +117,7 @@ public class FlatMap extends MapType {
pixel[2] += (255-pixel[2]) * scale;
}
raster.setPixel(x, y, pixel);
raster.setPixel(t.size-y-1, x, pixel);
rendered = true;
}
@ -148,7 +148,7 @@ public class FlatMap extends MapType {
@Override
public String getFilename() {
return map.prefix + "_" + size + "_" + x + "_" + y + ".png";
return map.prefix + "_" + size + "_" + -(y+1) + "_" + x + ".png";
}
}
}

View File

@ -7,7 +7,7 @@ FlatProjection.prototype = {
return new google.maps.LatLng(point.x/128.0, point.y/128.0);
},
fromWorldToLatLng: function(x, y, z) {
return new google.maps.LatLng(x / 128.0, z / 128.0);
return new google.maps.LatLng(-z / 128.0, x / 128.0);
}
};