 
     return @
 
-  onClose: ->
-    
   renderMap: =>
     @map = L.map(
       @$el.find(".map-visualisation")[0],

      'http://{s}.tiles.mapbox.com/v3/onlyjsmith.map-9zy5lnfp/{z}/{x}/{y}.png'
    ).addTo(@map)

    @map.on('moveend', =>
      bounds = @map.getBounds()
      minll = bounds.getSouthWest()
      maxll = bounds.getNorthEast()
      bbox = [
        [minll.lat,minll.lng],
        [maxll.lat, maxll.lng]
      ]

      @visualisation.set('map_bounds', bbox)
    )

    @fitToBounds()
    @renderDataToMap()

  fitToBounds: =>
    if @visualisation.get('map_bounds')?

      geojsonFeature
      style: styleGeojson
    ).addTo(@map)

  onClose: ->
    @map.off('moveend')
