dist/leaflet-dvf.js
function (properties, featureCollection, mergeKey) {
		var features = featureCollection.features;
		var featureIndex = L.GeometryUtils.indexFeatureCollection(features, mergeKey);
		var property;
		var mergeValue;
		var newFeatureCollection = {
			type: 'FeatureCollection',
			features: []
		};

		for (var key in properties) {
			if (properties.hasOwnProperty(key)) {
				property = properties[key];

				mergeValue = property[mergeKey];

				if (mergeValue) {
					var feature = featureIndex[mergeValue];

					for (var prop in property) {
						feature.properties[prop] = property[prop];
					}

					newFeatureCollection.features.push(feature);
				}
			}
		}

		return newFeatureCollection;
	}
function (properties, featureCollection, mergeKey) {
		var features = featureCollection.features;
		var featureIndex = L.GeometryUtils.indexFeatureCollection(features, mergeKey);
		var property;
		var mergeValue;
		var newFeatureCollection = {
			type: 'FeatureCollection',
			features: []
		};

		for (var key in properties) {
			if (properties.hasOwnProperty(key)) {
				property = properties[key];

				mergeValue = property[mergeKey];

				if (mergeValue) {
					var feature = featureIndex[mergeValue];

					for (var prop in property) {
						feature.properties[prop] = property[prop];
					}

					newFeatureCollection.features.push(feature);
				}
			}
		}

		return newFeatureCollection;
	}
function ( properties , featureCollection , mergeKey ) { var features = featureCollection . features ; var featureIndex = L . GeometryUtils . indexFeatureCollection ( features , mergeKey ) ; var property ; var mergeValue ; var newFeatureCollection = { type : 'FeatureCollection' , features : [ ] } ; for ( var key in properties ) { if ( properties . hasOwnProperty ( key ) ) { property = properties [ key ] ; mergeValue = property [ mergeKey ] ; if ( mergeValue ) { var feature = featureIndex [ mergeValue ] ; for ( var prop in property ) { feature . properties [ prop ] = property [ prop ] ; } newFeatureCollection . features . push ( feature ) ; } } } return newFeatureCollection ; }
Merges a set of properties into the properties of each feature of a GeoJSON FeatureCollection
Merges a set of properties into the properties of each feature of a GeoJSON FeatureCollection