CanvasRenderer#removeLayer( id ) -> this
CanvasRenderer#removeLayer( layer ) -> this
- id (String): The id for the layer
- layer (Layer): The layer

Remove a layer.
322821
function( idOrLayer ){

            var id = idOrLayer.id ? idOrLayer.id : idOrLayer
                ,el = this._layers[ id ].el
                ;

            if ( el !== this.el ){
                el.parentNode.removeChild( el );
            }
            delete this._layers[ id ];
            return this;
        }
1268846
function (layer) {
		if (this.hasLayer(layer)) {
			return this;
		}

		layer.addEventParent(this);

		var id = L.stamp(layer);

		this._layers[id] = layer;

		if (this._map) {
			// Use the original map addLayer.
			this._map._originalAddLayer(layer);
		}

		return this.fire('layeradd', {layer: layer});
	}
311754
function _updateLayerName($canvas, data, layer, props) {
	var nameMap = data.layer.names;

	// If layer name is being added, not changed
	if (!props) {

		props = layer;

	} else {

		// Remove old layer name entry because layer name has changed
		if (props.name !== undefined && isString(layer.name) && layer.name !== props.name) {
			delete nameMap[layer.name];
		}

	}

	// Add new entry to layer name map with new name
	if (isString(props.name)) {
		nameMap[props.name] = layer;
	}
}
170063
def remove(self, ids, **kwargs):
        
        url = build_uri_with_ids('api/v3/interface/%s/', ids)

        return super(ApiInterfaceRequest, self).delete(self.prepare_url(url, kwargs))
45511
private void deselectLayer(Layer<?> layer) {
		if (layer != null) {
			layer.setSelected(false);
			handlerManager.fireEvent(new LayerDeselectedEvent(layer));
		}
	}
1329829
def unindex_layer(self, layer_id, use_cache=False):
    

    from hypermap.aggregator.models import Layer
    layer = Layer.objects.get(id=layer_id)

    if use_cache:
        LOGGER.debug('Caching layer with id %s for being removed from search engine' % layer.id)
        deleted_layers = cache.get('deleted_layers')
        if deleted_layers is None:
            deleted_layers = set([layer.id])
        else:
            deleted_layers.add(layer.id)
        cache.set('deleted_layers', deleted_layers)
        return

    if SEARCH_TYPE == 'solr':
        from hypermap.aggregator.solr import SolrHypermap
        LOGGER.debug('Removing layer %s from solr' % layer.id)
        try:
            solrobject = SolrHypermap()
            solrobject.remove_layer(layer.uuid)
        except Exception:
            LOGGER.error('Layer NOT correctly removed from Solr')
    elif SEARCH_TYPE == 'elasticsearch':
        # TODO implement me
        pass
903850
function() {
        var deactivated = OpenLayers.Control.prototype.deactivate.call(this);
        if(deactivated) {
            for (var i=0, len=this.layers.length; i<len; i++) {
                var layer = this.layers[i];
                if (layer && this.clearOnDeactivate === true) {
                    var layerCache = this.layerCache;
                    var selectionLayer = layerCache[layer.id];
                    if (selectionLayer) {
                        layer.events.un({
                            "visibilitychanged": this.coupleLayerVisiblity,
                            scope: selectionLayer});
                        selectionLayer.destroy();
                        delete layerCache[layer.id];
                    }
                }
            }
        }
        return deactivated;
    }
298701
def remove_visualization(self, visualization_id):
        
        for i, panel in enumerate(self.panels):
            if panel['id'] == visualization_id:
                del self.panels[i]
672205
public void setHtmlElementId(String id) {
		htmlElementId = id;
		mapWidget.setHtmlElement(DOM.getElementById(id));
		mapWidget.draw();
	}
961072
protected boolean addLayer(Layer layer) {
		int index = getLayerIndex(layer);
		if (index < 0) {
			view.add(new LayerControlPanel(mapPresenter, layer, disableToggleOutOfRange));

			return true;
		}
		return false;
	}
1098251
public void selectLayer(Layer<?> layer) {
		if (layer == null) {
			deselectLayer(this.getSelectedLayer());
		} else {
			Layer<?> selLayer = this.getSelectedLayer();
			if (selLayer != null && !layer.getId().equals(selLayer.getId())) {
				deselectLayer(selLayer);
			}
			layer.setSelected(true);
			handlerManager.fireEvent(new LayerSelectedEvent(layer));
		}
	}
1313115
def delete(self, id):
        """"""
        # url('LayerTemplates', id=ID)
        lt = meta.Session.query(LayerTemplate).get(id)
        # use following query for getting a layertemplate owned by current user
        #lt = self._get_lt_from_user_by_id(c.user, id)
        if lt is None:
            abort(404)
        meta.Session.delete(lt)
        meta.Session.commit()
285385
@Override
	public void registerLayerRenderer(Layer layer, LayerRenderer layerRenderer) {
		if (layerRenderers.containsKey(layer)) {
			layerRenderers.remove(layer);
		}
		layerRenderers.put(layer, layerRenderer);
	}
1365396
protected void fireLayerRemovedEvent(MapLayer layer, int oldChildIndex) {
		fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(
				this, layer, Type.REMOVE_CHILD, oldChildIndex, layer.isTemporaryLayer()));
	}
125196
function removeHandles(layer) {
	var $canvas = $(layer.canvas), handle, h;
	if (layer._handles) {
		// Remove handles from layer
		for (h = 0; h < layer._handles.length; h += 1) {
			handle = layer._handles[h];
			$canvas.removeLayer(handle);
		}
		layer._handles.length = 0;
	}
}
1080905
function() {
        this.layer  = null;
        this.bounds = null;
        this.size = null;
        this.position = null;
        
        if (this.eventListeners) {
            this.events.un(this.eventListeners);
        }
        this.events.destroy();
        this.eventListeners = null;
        this.events = null;
    }
1163369
@Override
    public final Scene remove(final Layer layer)
    {
        if ((null != layer) && (LienzoCore.IS_CANVAS_SUPPORTED))
        {
            if (getChildNodes().contains(layer))
            {
                getElement().removeChild(layer.getElement());
            }
            super.remove(layer);
        }
        return this;
    }