code: function (data, lat, lng, origin, maxDistance) {
  			this.writeDebug('locationsSetup',arguments);
  			if (typeof origin !== 'undefined') {
  				if (!data.distance) {
  					data.distance = this.geoCodeCalcCalcDistance(lat, lng, data.lat, data.lng, GeoCodeCalc.EarthRadius);
  
  					// Alternative distance length unit
  					if (this.settings.lengthUnit === 'm') {
  						// Miles to kilometers
  						data.altdistance = parseFloat(data.distance)*1.609344;
  					} else if (this.settings.lengthUnit === 'km') {
  						// Kilometers to miles
  						data.altdistance = parseFloat(data.distance)/1.609344;
  					}
  				}
  			}
  
  			// Create the array
  			if (this.settings.maxDistance === true && typeof maxDistance !== 'undefined' && maxDistance !== null) {
  				if (data.distance <= maxDistance) {
  					locationset.push( data );
  				}
  				else {
  					return;
  				}
  			}
  			else if (this.settings.maxDistance === true && this.settings.querystringParams === true && typeof maxDistance !== 'undefined' && maxDistance !== null) {
  				if (data.distance <= maxDistance) {
  					locationset.push( data );
  				}
  				else {
  					return;
  				}
  			}
  			else {
  				locationset.push( data );
  			}
  		}
docs: Checks distance of each location and sets up the locationset array
  
  @param data {Object} location data object
  @param lat {number} origin latitude
  @param lng {number} origin longitude
  @param origin {string} origin address
  @param maxDistance {number} maximum distance if set