anchor.diff:          )
       })
   
  -  addSearch: =>
  +  addSearchControl: (opts = {}) =>
       formatJSON = (rawjson) ->
         json = {}
         featureName = (props) ->
           "#{props.name} (#{props.near})"
   
         for feature in rawjson.features
  -        geoJson = L.geoJson(type: "FeatureCollection", features: [feature])
  -        latlng = geoJson.getBounds().getCenter()
  -        latlng.layer = geoJson.getLayers()[0] # add the layer (for getting zoom later)
  +        nesw = feature.properties.bbox.split(",").reverse()
  +        latlng = L.latLng(feature.geometry.coordinates.reverse())
  +        latlng.bounds = L.latLngBounds(nesw.slice(2), nesw.slice(0,2)) # add the bounds (for getting zoom later) in format S,W,N,E
           json[featureName(feature.properties)] = latlng
         json
   
  
positive.code:       params = [
          {name: 'q', value: text}
          {name: 'key', value: @constructor.CyclestreetsKey}
          {name: 'bbox', value: bbox},
          {name: 'geometries', value: 1}
        ]
        jsonpTransportRequired = ->
          navigator.appVersion.indexOf('MSIE') != -1 &&
  
negative.code:         success: callback
        )
  
      defaultOpts = {
        autoCollapse: true
        sourceData: search
        formatData: formatJSON
        moveToLocation: (latlng, _title, map) ->
          map.fitBounds(latlng.bounds)
        autoType: false
        filterData: (_, records) -> records
        minLength: 2
      }
      searchControl = new (L.Control.Search)($.extend(defaultOpts, opts))
      @map.addControl(searchControl)
      searchControl
  
    drawCircle: (lat, lng) =>
      @drawRemoveFeature(@circle) if @circle
  