     @x_mapper = this.map_frame.get('x_mappers')['default']
     @y_range = @map_plot.get('y_range')
     @y_mapper = this.map_frame.get('y_mappers')['default']
-    @renderer.plot_view.$el.dblclick(@_on_dblclick)
-
-
+    @renderer.listenTo(@renderer, 'doubletap', @_doubletap)
 
   _map_data: () ->
-    # @sw = @sdist(@renderer.xmapper, [0], [@tile_provider.tile_size], 'edge', [true])[0]
-    # @sh = @sdist(@renderer.ymapper, [0], [@tile_provider.tile_size], 'edge', [true])[0]
     if not @map_initialized?
       @initial_extent = [-20037508.34, -20037508.34, 20037508.34, 20037508.34 ]
       zoom_level = @tile_provider.get_level_by_extent(@initial_extent, @map_frame.get('height'), @map_frame.get('width'))

          @_create_tile(cx, cy, cz, cbounds, true)

  _update: (abridged=false) =>

    if window.stop?
      window.stop()
    else if document.execCommand?
      document.execCommand("Stop", false)

    @tile_provider.update()
    extent = @get_extent()

  get_level_by_extent: (extent, height, width) ->
    x_rs = (extent[2] - extent[0]) / width
    y_rs = (extent[3] - extent[1]) / height
    resolution = Math.max(x_rs, y_rs)
    i = 0
    for r in @resolutions
      if resolution > r
        return 0 if i == 0
        return i - 1 if i > 0
      i += 1

  get_closest_level_by_extent:(extent, height, width) ->
    x_rs = (extent[2] - extent[0]) / width
    y_rs = (extent[3] - extent[1]) / height
    resolution = Math.max(x_rs, y_rs)

    closest = @resolutions.reduce (previous, current) ->
      return current if (Math.abs(current - resolution) < Math.abs(previous - resolution))
      return previous

    return @resolutions.indexOf(closest)

  snap_to_zoom: (extent, height, width, level) ->
    desired_res = @resolutions[level]
