Ongoing cleanup and refactoring of maps.
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user