 
       when "Polygon"
         @canvas.polygon toDraw[0], colorCode
-        # points = toDraw[0]
-        # for y in [Math.max(0,Math.floor(data.minY/scale))..Math.min(@height, Math.floor(data.maxY/scale))] by 4
-        #   for x in [Math.max(0, Math.floor(data.minX/scale))..Math.min(@width, Math.floor(data.maxX/scale))] by 2
-        #     if utils.pointInPolygon points, [x, y]
-        #       @canvas.background x, y, colorCode
 
       when "Point"
         text = feature.properties["name_"+@config.language] or

        for points in toDraw
          for point in points
            x = point[0] - text.length
            if @labelBuffer.writeIfPossible text, x, point[1], (@config.layers[layer]?.margin or @config.labelMargin)
              @canvas.text text, x, point[1], colorCode, false

  _scaleAndReduce: (points, scale) ->
    lastX = null

      poi_label:
        minZoom: 3
        margin: 5
        cluster: true

  isDrawing: false
  lastDrawAt: 0
