public void dispose(){
  clearListeners();
  if (attributes != null) {
    attributes.clear();
  }
  removed(null);
}

public void dispose ( ) { clearListeners ( ) ; if ( attributes != null ) { attributes . clear ( ) ; } removed ( null ) ; }
method called when layer detects that it has been removed from maphandler , assumes it ' s being thrown away . use this method to let go of everything and to make any calls necessary to remove from listener lists that might not get picked up via maphandler calls .
