     BoxParam.encode({sw, ne, zoom: map.getZoom()})
 
   do ->
-    debounce = require("lodash.debounce")
 
     writeBoxToUrl = debounce(->
       history.replaceState({}, null, "/?box=#{serializedSelection()}")

    rectangleEditor.setCenter(e.latlng)

  do ->
    # Canvas stuff
    canvas = $('canvas#terrain')[0]
    terrain = new Terrain(canvas)
    terrain.run()
  
    syncTerrainWithSelector = ->
      terrain.show(crs.project(rectangleEditor.getSouthWest()), crs.project(rectangleEditor.getNorthEast()))
  
    rectangleEditor.on 'change', syncTerrainWithSelector
  
    syncTerrainWithSelector()

  serializedSelection = ->
    sw = crs.project(rectangleEditor.getSouthWest())

require("./utils/rectangle_editor")

config = require('../config/app.json')
debounce = require("lodash.debounce")

BoxParam = require("./utils/boxparam.coffee")
resolutions = [
