Add the list of snapping rules as they are configured for a specific layer within the XML configuration.

@param layerId The vector layer to use the configuration from.
961377
public void addLayerSnappingRules(String layerId) {
		Layer<?> layer = mapWidget.getMapModel().getLayer(layerId);
		if (layer != null && layer instanceof VectorLayer) {
			VectorLayer vLayer = (VectorLayer) layer;
			for (SnappingRuleInfo snappingRuleInfo : vLayer.getLayerInfo().getSnappingRules()) {
				SnapRuleUtil.addRule(delegate.getSnappingService(), mapWidget, snappingRuleInfo);
			}
		}
	}
615353
public Layer getLayer(String layerId) {
		org.geomajas.gwt.client.map.layer.Layer<?> layer = mapModel.getLayer(layerId);
		if (layer instanceof org.geomajas.gwt.client.map.layer.VectorLayer) {
			return new VectorLayer((org.geomajas.gwt.client.map.layer.VectorLayer) layer);
		}
		return new LayerImpl(layer);
	}
518893
@Api
	public void onSelectLayer(LayerSelectedEvent event) {
		for (TreeNode node : tree.getAllNodes()) {
			if (node.getName().equals(event.getLayer().getLabel())) {
				selectedLayerTreeNode = (LayerTreeTreeNode) node;
				treeGrid.selectRecord(selectedLayerTreeNode);
				htmlSelectedLayer.setContents(I18nProvider.getLayerTree().activeLayer(
						selectedLayerTreeNode.getLayer().getLabel()));

				Canvas[] toolStripMembers = toolStrip.getMembers();
				updateButtonIconsAndStates(toolStripMembers);
			}
		}
	}
1255279
void update(Object feature) throws LayerException {
		SimpleFeatureSource source = getFeatureSource();
		if (source instanceof SimpleFeatureStore) {
			SimpleFeatureStore store = (SimpleFeatureStore) source;
			String featureId = getFeatureModel().getId(feature);
			Filter filter = filterService.createFidFilter(new String[] { featureId });
			transactionSynchronization.synchTransaction(store);
			List<Name> names = new ArrayList<Name>();
			Map<String, Attribute> attrMap = getFeatureModel().getAttributes(feature);
			List<Object> values = new ArrayList<Object>();
			for (Map.Entry<String, Attribute> entry : attrMap.entrySet()) {
				String name = entry.getKey();
				names.add(store.getSchema().getDescriptor(name).getName());
				values.add(entry.getValue().getValue());
			}

			try {
				store.modifyFeatures(names.toArray(new Name[names.size()]), values.toArray(), filter);
				store.modifyFeatures(store.getSchema().getGeometryDescriptor().getName(), getFeatureModel()
						.getGeometry(feature), filter);
				log.debug("Updated feature {} in {}", featureId, getFeatureSourceName());
			} catch (IOException ioe) {
				featureModelUsable = false;
				throw new LayerException(ioe, ExceptionCode.LAYER_MODEL_IO_EXCEPTION);
			}
		} else {
			log.error("Don't know how to create or update " + getFeatureSourceName() + ", class "
					+ source.getClass().getName() + " does not implement SimpleFeatureStore");
			throw new LayerException(ExceptionCode.CREATE_OR_UPDATE_NOT_IMPLEMENTED, getFeatureSourceName(), source
					.getClass().getName());
		}
	}
970002
public void onClick(MenuItemClickEvent event) {
		if (controller.isSnappingActive()) {
			controller.deactivateSnapping();
		} else if (layer != null) {
			controller.activateSnapping(layer.getLayerInfo().getSnappingRules(), SnapMode.ALL_GEOMETRIES_EQUAL);
		}
	}
1009395
public LienzoPanel add(final Layer layer, final Layer... layers)
    {
        add(layer);

        for (final Layer node : layers)
        {
            add(node);
        }
        return this;
    }
1160173
public void setTileId(int x, int y, int layerIndex, int tileid) {
		Layer layer = (Layer) layers.get(layerIndex);
		layer.setTileID(x, y, tileid);
	}
1185735
@Api
	public VectorLayer getVectorLayer(String layerId) {
		if (layers != null) {
			for (VectorLayer layer : getVectorLayers()) {
				if (layer.getId().equals(layerId)) {
					return layer;
				}
			}
		}
		return null;
	}
5422
public void setConfigurationIds(java.util.Collection<String> configurationIds) {
        if (configurationIds == null) {
            this.configurationIds = null;
            return;
        }

        this.configurationIds = new java.util.ArrayList<String>(configurationIds);
    }
267408
public List<Layer<?>> getLayersByServerId(String serverLayerId) {
		List<Layer<?>> l = new ArrayList<Layer<?>>();
		if (layers != null) {
			for (Layer<?> layer : layers) {
				if (layer.getServerLayerId().equals(serverLayerId)) {
					l.add(layer);
				}
			}
		}
		return l;
	}
1268759
public void addLegacyTagIdMappings(String tagId, String tagName)
    {
        assert (tagId != null) : "The parameter 'tagId' must not be null";
        assert (tagName != null) : "The parameter 'tagName' must not be null";

        if (_idMap == null) {
            _idMap = new HashMap/*<String, String>*/();
        }

        assert (_idMap != null) : "_idMap should not be null";
        _idMap.put(tagId, tagName);
    }
794847
@com.fasterxml.jackson.annotation.JsonProperty("uploadId")
    public void setUploadId(String uploadId) {
        this.uploadId = uploadId;
    }
590995
private void setIdsAndAttribs(
            Element parent, String labelBase, String index, String precedence) {
        NodeList children = parent.getChildNodes();

        for (int i = 0; i < children.getLength(); i++) {
            if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
                Element child = (Element) children.item(i);
                String id = child.getAttribute(Constants.ATT_ID);
                if (!id.equals("")) {
                    String newId = labelBase + id;
                    child.setAttribute(Constants.ATT_ID, newId);
                    child.setIdAttribute(Constants.ATT_ID, true);
                    child.setAttributeNS(Constants.NS_URI, Constants.ATT_FRAGMENT, index);
                    child.setAttributeNS(Constants.NS_URI, Constants.ATT_PRECEDENCE, precedence);
                    setIdsAndAttribs(child, labelBase, index, precedence);
                }
            }
        }
    }
489585
public NodeConfig setId(NodeId id) {
    this.id = id != null ? id : NodeId.anonymous();
    return this;
  }
966853
public void insertRule(final String rule, final int index) throws DOMException {
        final CSSStyleSheetImpl parentStyleSheet = getParentStyleSheet();

        try {
            final CSSOMParser parser = new CSSOMParser();
            parser.setParentStyleSheet(parentStyleSheet);
            parser.setErrorHandler(ThrowCssExceptionErrorHandler.INSTANCE);
            final AbstractCSSRuleImpl r = parser.parseRule(rule);

            // Insert the rule into the list of rules
            getCssRules().insert(r, index);

        }
        catch (final IndexOutOfBoundsException e) {
            throw new DOMExceptionImpl(
                DOMException.INDEX_SIZE_ERR,
                DOMExceptionImpl.INDEX_OUT_OF_BOUNDS,
                e.getMessage());
        }
        catch (final CSSException e) {
            throw new DOMExceptionImpl(
                DOMException.SYNTAX_ERR,
                DOMExceptionImpl.SYNTAX_ERROR,
                e.getMessage());
        }
        catch (final IOException e) {
            throw new DOMExceptionImpl(
                DOMException.SYNTAX_ERR,
                DOMExceptionImpl.SYNTAX_ERROR,
                e.getMessage());
        }
    }
267926
public void update(Object feature) throws LayerException {
		Session session = getSessionFactory().getCurrentSession();
		session.update(feature);
	}
1245590
protected void storeOsmWayID(int edgeId, long osmWayId) {
        if (getOsmWayIdSet().contains(osmWayId)) {
            getEdgeIdToOsmWayIdMap().put(edgeId, osmWayId);
        }
    }