implementing zoom level based map movement

This commit is contained in:
Michael Straßburger 2016-11-03 05:54:38 +01:00
parent ae9507d4e3
commit 61be4181fd

View File

@ -156,10 +156,10 @@ module.exports = class Termap
when "k" then @rotation += 15 when "k" then @rotation += 15
when "l" then @rotation -= 15 when "l" then @rotation -= 15
when "left" then @center.lon -= 1 when "left" then @center.lon -= 8/Math.pow(2, @zoom)
when "right" then @center.lon += 1 when "right" then @center.lon += 8/Math.pow(2, @zoom)
when "up" then @center.lat += 1 when "up" then @center.lat += 6/Math.pow(2, @zoom)
when "down" then @center.lat -= 1 when "down" then @center.lat -= 6/Math.pow(2, @zoom)
else else
null null