mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-26 02:27:55 +01:00
Flipped flat map so North is up
This commit is contained in:
parent
d53b3bc340
commit
553a956949
@ -117,7 +117,7 @@ public class FlatMap extends MapType {
|
|||||||
pixel[2] += (255-pixel[2]) * scale;
|
pixel[2] += (255-pixel[2]) * scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
raster.setPixel(x, y, pixel);
|
raster.setPixel(t.size-y-1, x, pixel);
|
||||||
rendered = true;
|
rendered = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ public class FlatMap extends MapType {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFilename() {
|
public String getFilename() {
|
||||||
return map.prefix + "_" + size + "_" + x + "_" + y + ".png";
|
return map.prefix + "_" + size + "_" + -(y+1) + "_" + x + ".png";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ FlatProjection.prototype = {
|
|||||||
return new google.maps.LatLng(point.x/128.0, point.y/128.0);
|
return new google.maps.LatLng(point.x/128.0, point.y/128.0);
|
||||||
},
|
},
|
||||||
fromWorldToLatLng: function(x, y, z) {
|
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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user