1
0
Fork 0
forked from 0x2620/oxjs

remove unneeded constants

This commit is contained in:
rolux 2012-06-04 11:49:27 +02:00
commit 8581a3da3a
3 changed files with 47 additions and 43 deletions

View file

@ -277,7 +277,8 @@ Ox.Map = function(options, self) {
500, 200, 100,
50, 20, 10
];
self.shiftKey = false;
self.shiftKey = false,
self.tileSize = 256;
if (self.options.showToolbar) {
self.$toolbar = Ox.Bar({
@ -736,7 +737,7 @@ Ox.Map = function(options, self) {
function getMetersPerPixel() {
// m/px = m/deg * deg/px
var degreesPerPixel = 360 / (Ox.MAP_TILE_SIZE * Math.pow(2, self.map.getZoom()));
var degreesPerPixel = 360 / (self.tileSize * Math.pow(2, self.map.getZoom()));
return Ox.getMetersPerDegree(self.map.getCenter().lat()) * degreesPerPixel;
}
@ -748,7 +749,7 @@ Ox.Map = function(options, self) {
// fixme: there must be a function for this...
/*
return Math.ceil(
Ox.log(self.mapHeight / Ox.MAP_TILE_SIZE, 2)
Ox.log(self.mapHeight / self.tileSize, 2)
);
*/
}
@ -1321,7 +1322,7 @@ Ox.Map = function(options, self) {
function spansGlobe() {
// fixme: or self.options.width ??
return self.$map.width() > Ox.MAP_TILE_SIZE * Math.pow(2, self.map.getZoom());
return self.$map.width() > self.tileSize * Math.pow(2, self.map.getZoom());
};
function submitFind(data) {