 
       # Create the map with above options in div
       @map = new google.maps.Map(@gmap_div[0], map_options)
-      google.maps.event.addListener(@map, 'bounds_changed', () =>
-        bds = @map.getBounds()
-        ne = bds.getNorthEast()
-        sw = bds.getSouthWest()
-        @x_range.set({start: sw.lng(), end: ne.lng(), silent:true})
-        @y_range.set({start: sw.lat(), end: ne.lat()})
-      )
+      google.maps.event.addListener(@map, 'bounds_changed', @bounds_change)
     _.defer(build_map)
     @ctx = @canvas[0].getContext('2d')
     if full_render
       @render()
+
+  bounds_change : () =>
+    bds = @map.getBounds()
+    ne = bds.getNorthEast()
+    sw = bds.getSouthWest()
+    @x_range.set({start: sw.lng(), end: ne.lng(), silent:true})
+    @y_range.set({start: sw.lat(), end: ne.lat()})
 
   save_png: () ->
     @render()

      requested_border_left: 0
      requested_border_right: 0
    })

    @xmapper = new LinearMapper({
      source_range: @x_range
      target_range: @view_state.get('inner_range_horizontal')


  initialize: (options) ->
    super(_.defaults(options, @default_options))

    @throttled_render = _.throttle(@render, 100)
    @throttled_render_canvas = _.throttle(@render_canvas, 100)
