 require(["jquery", "styles", "openlayers/OpenLayers", "underscore"], ($, styles) ->
 
+  # globales AntScout-Object erstellen
+  @AntScout = {}
+  destination = null
   directionsLayer = new OpenLayers.Layer.Vector(
     "Directions"
     {

        nodesLayer.addFeatures(features)
        map.zoomToExtent(nodesLayer.getDataExtent())

  retrieveDirections = () ->
    destination = $("#destination").val()
    source = $("#source").val()
    $.get "/directions", {
      destination
      source
      },
      (directions) ->
        displayDirections(directions)

        addWaysToLayer(ways, waysLayer)
        map.zoomToExtent(waysLayer.getDataExtent())

  setNodeAsDestination = () ->
    destination = selectedNodeId()
    retrieveDirections(source, destination) if source? and destination?

  setNodeAsSource = () ->
    source = selectedNodeId()
    retrieveDirections(source, destination) if source? and destination?

  toggleDisabledProperty = (elementId) ->
    if $("##{ elementId }").prop("disabled") is true
