 
       continue unless @features?[layer]
 
-      scale = ((4096/256)<<4)/Math.pow(2, @zoom+4)
+      scale = (@config.tileSize/@config.projectSize)/Math.pow(2, @zoom)
 
       if @config.layers[layer]?.minZoom and @zoom > @config.layers[layer].minZoom
         continue

    @canvas.translate @view[0], @view[1]
    @_drawLayers()

    @output.write "\x1B[?6h"
    @output.write @canvas.frame()

    @isDrawing = false

  featuresAt: (x, y) ->
    @labelBuffer.featuresAt x, y

  _write: (output) ->
    process.stdout.write output

  _drawLayers: ->
    for layer in @config.drawOrder

    language: 'de'

    labelMargin: 5

    tileSize: 4096
    projectSize: 256

    #"poi_label", "water",
    drawOrder: [
