       }
     )
     directionsLayer.addFeatures([sourceFeature, targetFeature])
-    map.zoomToExtent(directionsLayer.getDataExtent())
 
   enable = (elementId) ->
     $("##{ elementId }").prop("disabled", false)

    $.get "ways",
      (ways) ->
        addWaysToLayer(ways, waysLayer)
        map.zoomToExtent(waysLayer.getDataExtent())

  setNode = (input) ->
    id = nodesLayer.selectedFeatures.length > 0 and nodesLayer.selectedFeatures[0].attributes.node.id

    $("#directions").html("<ol><li>" + directions.join("</li><li>") + "</li></ol>")

  drawDirections = (directions) ->
    directionsLayer.removeAllFeatures()
    sourceNode = directions[0].nodes[0]
    sourcePoint = new OpenLayers.Geometry.Point(sourceNode.longitude, sourceNode.latitude)
      .transform(EPSG4326Projection, map.getProjectionObject())
