code: public void addNearestEdgeSnappingRule(String snapLayer, double distance) {
  		SnapSourceProvider snapSourceProvider = new VectorLayerSourceProvider(editor.getMapWidget().getMapModel()
  				.getVectorLayer(snapLayer));
  		delegate.addSnappingRule(new SnappingRule(new NearestEdgeSnapAlgorithm(), snapSourceProvider, distance));
  	}
docs: Add a new snapping rules to the list. Each new rule provides information on how snapping should occur.
  The added rule will use algorithm {@link NearestVertexSnapAlgorithm}.
  
  @param snapLayer
  The layer id that will provide the target geometries where to snap.
  @param distance
  The maximum distance to bridge during snapping. unit=meters.