code: public synchronized boolean remove(Layer layer, boolean redraw) {
          checkIsNull(layer);
          if (this.layersList.remove(layer)) {
              layer.unassign();
              if (redraw) {
                  this.redrawer.redrawLayers();
              }
              return true;
          }
          return false;
      }
docs: Removes a layer.
  
  @param layer  The layer to remove
  @param redraw Whether the map should be redrawn after removing the layer
  @see List#remove(Object)