dist/assets/js/plugins/storeLocator/jquery.storelocator.js
function() {
			this.writeDebug('defaultLocation');
			var _this = this,
				distance = null,
				$distanceInput = $('#' + this.settings.maxDistanceID),
				originAddress;

			// Query string parameters
			if (this.settings.querystringParams === true) {
				// Check for distance query string parameters
				if (this.getQueryString(this.settings.maxDistanceID)){
					distance = this.getQueryString(this.settings.maxDistanceID);

					if ($distanceInput.val() !== '') {
						distance = $distanceInput.val();
					}
				}
				else {
					// Get the distance if set
					if (this.settings.maxDistance === true) {
						distance = $distanceInput.val() || '';
					}
				}
			}
			else {
				// Get the distance if set
				if (this.settings.maxDistance === true) {
					distance = $distanceInput.val() || '';
				}
			}

			// The address needs to be determined for the directions link
			var r = new this.reverseGoogleGeocode(this);
			var latlng = new google.maps.LatLng(this.settings.defaultLat, this.settings.defaultLng);
			r.geocode({'latLng': latlng}, function (data) {
				if (data !== null) {
					originAddress = addressInput = data.address;
					olat = mappingObj.lat = _this.settings.defaultLat;
					olng = mappingObj.lng = _this.settings.defaultLng;
					mappingObj.distance = distance;
					mappingObj.origin = originAddress;
					_this.mapping(mappingObj);
				} else {
					// Unable to geocode
					_this.notify(_this.settings.addressErrorAlert);
				}
			});
		}
function() {
			this.writeDebug('defaultLocation');
			var _this = this,
				distance = null,
				$distanceInput = $('#' + this.settings.maxDistanceID),
				originAddress;

			// Query string parameters
			if (this.settings.querystringParams === true) {
				// Check for distance query string parameters
				if (this.getQueryString(this.settings.maxDistanceID)){
					distance = this.getQueryString(this.settings.maxDistanceID);

					if ($distanceInput.val() !== '') {
						distance = $distanceInput.val();
					}
				}
				else {
					// Get the distance if set
					if (this.settings.maxDistance === true) {
						distance = $distanceInput.val() || '';
					}
				}
			}
			else {
				// Get the distance if set
				if (this.settings.maxDistance === true) {
					distance = $distanceInput.val() || '';
				}
			}

			// The address needs to be determined for the directions link
			var r = new this.reverseGoogleGeocode(this);
			var latlng = new google.maps.LatLng(this.settings.defaultLat, this.settings.defaultLng);
			r.geocode({'latLng': latlng}, function (data) {
				if (data !== null) {
					originAddress = addressInput = data.address;
					olat = mappingObj.lat = _this.settings.defaultLat;
					olng = mappingObj.lng = _this.settings.defaultLng;
					mappingObj.distance = distance;
					mappingObj.origin = originAddress;
					_this.mapping(mappingObj);
				} else {
					// Unable to geocode
					_this.notify(_this.settings.addressErrorAlert);
				}
			});
		}
function ( ) { this . writeDebug ( 'defaultLocation' ) ; var _this = this , distance = null , $distanceInput = $ ( '#' + this . settings . maxDistanceID ) , originAddress ; // Query string parameters if ( this . settings . querystringParams === true ) { // Check for distance query string parameters if ( this . getQueryString ( this . settings . maxDistanceID ) ) { distance = this . getQueryString ( this . settings . maxDistanceID ) ; if ( $distanceInput . val ( ) !== '' ) { distance = $distanceInput . val ( ) ; } } else { // Get the distance if set if ( this . settings . maxDistance === true ) { distance = $distanceInput . val ( ) || '' ; } } } else { // Get the distance if set if ( this . settings . maxDistance === true ) { distance = $distanceInput . val ( ) || '' ; } } // The address needs to be determined for the directions link var r = new this . reverseGoogleGeocode ( this ) ; var latlng = new google . maps . LatLng ( this . settings . defaultLat , this . settings . defaultLng ) ; r . geocode ( { 'latLng' : latlng } , function ( data ) { if ( data !== null ) { originAddress = addressInput = data . address ; olat = mappingObj . lat = _this . settings . defaultLat ; olng = mappingObj . lng = _this . settings . defaultLng ; mappingObj . distance = distance ; mappingObj . origin = originAddress ; _this . mapping ( mappingObj ) ; } else { // Unable to geocode _this . notify ( _this . settings . addressErrorAlert ) ; } } ) ; }
Default location method
Default location method