Fix map center consistency on map changes
This commit is contained in:
parent
1d0b28c069
commit
64bd846115
5 changed files with 36 additions and 1 deletions
|
|
@ -4,7 +4,13 @@ var FlatProjection = DynmapProjection.extend({
|
|||
-location.z / (1 << this.options.mapzoomout),
|
||||
location.x / (1 << this.options.mapzoomout),
|
||||
true);
|
||||
},
|
||||
fromLatLngToLocation: function(latlon, y) {
|
||||
var z = -latlon.lat * (1 << this.options.mapzoomout);
|
||||
var x = latlon.lng * (1 << this.options.mapzoomout);
|
||||
return { x: x, y: y, z: z };
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var FlatMapType = DynmapTileLayer.extend({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue