       item = leafletEvent.leafletEvent.popup.options.item
 
       newScope = $scope.$new()
-      newScope.item = item
+      newScope.selected = item
 
       $compile(leafletEvent.leafletEvent.popup._contentNode)(newScope)
 

              'icon': item.properties['marker-symbol']
              'color': item.properties['marker-color']

          # Bind to clicks
          marker.on 'click', ->
            $scope.selected = @
          , item # To be executed with the context of item

          pu = '<div map-item-detail/>'
          marker.bindPopup pu,
            item: item

        group = L.featureGroup items.map((i) -> i.marker)
        group.addTo map
        map.fitBounds group.getBounds()
