1
0
Fork 0
forked from 0x2620/oxjs

cleanup, again

This commit is contained in:
rolux 2011-11-03 16:42:41 +01:00
commit 094b1a59ec
34 changed files with 93 additions and 101 deletions

View file

@ -654,7 +654,7 @@ Ox.Map = function(options, self) {
}
function getMetersPerPixel() {
// m/px = m/deg * deg/px
// m/px = m/deg * deg/px
var degreesPerPixel = 360 / (Ox.MAP_TILE_SIZE * Math.pow(2, self.map.getZoom()));
return Ox.getMetersPerDegree(self.map.getCenter().lat()) * degreesPerPixel;
}
@ -883,10 +883,10 @@ Ox.Map = function(options, self) {
if (!self.isAsync) {
self.places.sort(function(a, b) {
var sort = {
a: a.selected ? Infinity :
bounds.contains(a.center) ? a.area : -Infinity,
b: b.selected ? Infinity :
bounds.contains(b.center) ? b.area : -Infinity,
a: a.selected ? Infinity
: bounds.contains(a.center) ? a.area : -Infinity,
b: b.selected ? Infinity
: bounds.contains(b.center) ? b.area : -Infinity,
};
return sort.b - sort.a;
}).forEach(function(place, i) {
@ -1434,7 +1434,7 @@ Ox.Map = function(options, self) {
that.removePlace = function() {
// fixme: removePlaceFromPlaces() ?
removePlace();
return that;
return that;
};
that.resizeMap = function() {