Ongoing cleanup and refactoring of maps.

This commit is contained in:
2019-11-25 18:04:11 +01:00
parent 88048f14ec
commit 5305561619
16 changed files with 462 additions and 158 deletions
+13 -5
View File
@@ -117,8 +117,8 @@ export default class Robinson extends Projection {
_adjustLng(lng, inv = false) {
let moved = inv ? lng + this.lng0 : lng - this.lng0
if (moved < -180) moved += 360
if (moved > 180) moved -= 360
// if (moved < -180) moved += 360
// if (moved > 180) moved -= 360
return moved
}
@@ -139,10 +139,18 @@ export default class Robinson extends Projection {
return { low: minIndex, high: maxIndex, ratio, sign }
}
toString() {
return
}
get name() {
return 'Robinson Projection'
}
get maxViewport() {
let min = new PIXI.Point(-90, -180)
let max = new PIXI.Point(90, 180)
max.x += this.lng0
min.x += this.lng0
console.log({ min, max })
return { min, max }
}
}