         ).addTo(map)
     , 100
 
+
+  setupMapEvents: ->
+    @$scope.events =
+      map:
+        enable: ['click']
+      markers:
+        enable: ['click']
+
     @$scope.$on 'leafletDirectiveMap.click', (e, args) =>
       @$scope.editState.addMarker = true
       @$scope.editState.boundingBox =

        bottom: args.leafletEvent.originalEvent.clientY
        left: args.leafletEvent.originalEvent.clientX - 7
        width: 0


  close: (event) ->


  constructor: (@$scope, @$modalInstance, @snippet, @leafletData, @$timeout, @leafletEvents) ->
    @$scope.close = $.proxy(@close, this)
    @$scope.addMarker = $.proxy(@addMarker, this)
    @$scope.center = @snippet.data('center')
    @$scope.markers = @snippet.data('markers')
    @$scope.editState = {}

    @addGeosearch()
    @setupMapEvents()


  addGeosearch: ->
    @$timeout =>
      @leafletData.getMap().then (map) =>
        new L.Control.GeoSearch(
