 
   # This method swaps the icon for the de-selected icon
   clearSelected: (img) ->
-    @_setSelected img+    @_setSelected img

  # this. I also add the contextMenu itself to the model so the same
  # menu can be added to the tree items for this node
  _contextMenu: (type, menuItems) ->
    @contextMenuOptions = {}
    @contextMenuOptions.class = 'context_menu'
    @contextMenuOptions.id = "context-menu-#{type}-#{@model.id}"
    @contextMenuOptions.menuItems = $a.Util.copy(menuItems)
    #set this id for the select item so we know what event to call
    _.each(@contextMenuOptions.menuItems, (item) => item.id = "#{@model.cid}")

    @contextMenu = new $a.ContextMenuView(@contextMenuOptions)
    google.maps.event.addListener(@marker, 'rightclick', (mouseEvent) => 
      @contextMenu.show mouseEvent.latLng 
    )
    @model.set('contextMenu', @contextMenu)

  # events used to move the marker and update its position
  dragMarker: ->
    @latLng = @marker.getPosition();
    $a.map.panTo(@latLng);

  ################# The following handles the show and hide of node layers
  hideMarker: ->

  showMarker: ->
    @marker.setMap($a.map)

  # Used by subclasses to get name of image in order to swap between selected
  # and not selected
  _getIconName: () ->
    tokens = @marker.get('icon').url.split '/'
