mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-25 18:17:37 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
4985c763cc
@ -1,13 +1,13 @@
|
|||||||
function FlatProjection() {}
|
function FlatProjection() {}
|
||||||
FlatProjection.prototype = {
|
FlatProjection.prototype = {
|
||||||
fromLatLngToPoint: function(latLng) {
|
fromLatLngToPoint: function(latLng) {
|
||||||
return new google.maps.Point(latLng.lat()*128.0, latLng.lng()*128.0);
|
return new google.maps.Point(latLng.lat()*config.tileWidth, latLng.lng()*config.tileHeight);
|
||||||
},
|
},
|
||||||
fromPointToLatLng: function(point) {
|
fromPointToLatLng: function(point) {
|
||||||
return new google.maps.LatLng(point.x/128.0, point.y/128.0);
|
return new google.maps.LatLng(point.x/config.tileWidth, point.y/config.tileHeight);
|
||||||
},
|
},
|
||||||
fromWorldToLatLng: function(x, y, z) {
|
fromWorldToLatLng: function(x, y, z) {
|
||||||
return new google.maps.LatLng(-z / 128.0, x / 128.0);
|
return new google.maps.LatLng(-z / config.tileWidth, x / config.tileHeight);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ FlatMapType.prototype = $.extend(new DynMapType(), {
|
|||||||
|
|
||||||
tileName = this.prefix + '_128_' + coord.x + '_' + coord.y + '.png';
|
tileName = this.prefix + '_128_' + coord.x + '_' + coord.y + '.png';
|
||||||
|
|
||||||
imgSize = Math.pow(2, 6+zoom);
|
imgSize = Math.pow(2, 7+zoom);
|
||||||
var tile = $('<div/>')
|
var tile = $('<div/>')
|
||||||
.addClass('tile')
|
.addClass('tile')
|
||||||
.css({
|
.css({
|
||||||
@ -51,7 +51,7 @@ FlatMapType.prototype = $.extend(new DynMapType(), {
|
|||||||
},
|
},
|
||||||
updateTileSize: function(zoom) {
|
updateTileSize: function(zoom) {
|
||||||
var size;
|
var size;
|
||||||
size = Math.pow(2, 6+zoom);
|
size = Math.pow(2, 7+zoom);
|
||||||
this.tileSize = new google.maps.Size(size, size);
|
this.tileSize = new google.maps.Size(size, size);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user