forked from 0x2620/oxjs
cleanup, again
This commit is contained in:
parent
2809a5d06d
commit
094b1a59ec
34 changed files with 93 additions and 101 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue