dist/assets/js/plugins/storeLocator/jquery.storelocator.js
function() {
			this.writeDebug('htmlGeocode',arguments);
			var _this = this;

			if (_this.settings.sessionStorage === true && window.sessionStorage && window.sessionStorage.getItem('myGeo')){
				_this.writeDebug('Using Session Saved Values for GEO');
				_this.autoGeocodeQuery(JSON.parse(window.sessionStorage.getItem('myGeo')));
				return false;
			}
			else if (navigator.geolocation) {
				navigator.geolocation.getCurrentPosition(function(position){
					_this.writeDebug('Current Position Result');
					// To not break autoGeocodeQuery then we create the obj to match the geolocation format
					var pos = {
						coords: {
							latitude : position.coords.latitude,
							longitude: position.coords.longitude,
							accuracy : position.coords.accuracy
						}
					};

					// Have to do this to get around scope issues
					if (_this.settings.sessionStorage === true && window.sessionStorage) {
						window.sessionStorage.setItem('myGeo',JSON.stringify(pos));
					}

					// Callback
					if (_this.settings.callbackAutoGeoSuccess) {
						_this.settings.callbackAutoGeoSuccess.call(this, pos);
					}

					_this.autoGeocodeQuery(pos);
				}, function(error){
					_this._autoGeocodeError(error);
				});
			}
		}
function() {
			this.writeDebug('htmlGeocode',arguments);
			var _this = this;

			if (_this.settings.sessionStorage === true && window.sessionStorage && window.sessionStorage.getItem('myGeo')){
				_this.writeDebug('Using Session Saved Values for GEO');
				_this.autoGeocodeQuery(JSON.parse(window.sessionStorage.getItem('myGeo')));
				return false;
			}
			else if (navigator.geolocation) {
				navigator.geolocation.getCurrentPosition(function(position){
					_this.writeDebug('Current Position Result');
					// To not break autoGeocodeQuery then we create the obj to match the geolocation format
					var pos = {
						coords: {
							latitude : position.coords.latitude,
							longitude: position.coords.longitude,
							accuracy : position.coords.accuracy
						}
					};

					// Have to do this to get around scope issues
					if (_this.settings.sessionStorage === true && window.sessionStorage) {
						window.sessionStorage.setItem('myGeo',JSON.stringify(pos));
					}

					// Callback
					if (_this.settings.callbackAutoGeoSuccess) {
						_this.settings.callbackAutoGeoSuccess.call(this, pos);
					}

					_this.autoGeocodeQuery(pos);
				}, function(error){
					_this._autoGeocodeError(error);
				});
			}
		}
function ( ) { this . writeDebug ( 'htmlGeocode' , arguments ) ; var _this = this ; if ( _this . settings . sessionStorage === true && window . sessionStorage && window . sessionStorage . getItem ( 'myGeo' ) ) { _this . writeDebug ( 'Using Session Saved Values for GEO' ) ; _this . autoGeocodeQuery ( JSON . parse ( window . sessionStorage . getItem ( 'myGeo' ) ) ) ; return false ; } else if ( navigator . geolocation ) { navigator . geolocation . getCurrentPosition ( function ( position ) { _this . writeDebug ( 'Current Position Result' ) ; // To not break autoGeocodeQuery then we create the obj to match the geolocation format var pos = { coords : { latitude : position . coords . latitude , longitude : position . coords . longitude , accuracy : position . coords . accuracy } } ; // Have to do this to get around scope issues if ( _this . settings . sessionStorage === true && window . sessionStorage ) { window . sessionStorage . setItem ( 'myGeo' , JSON . stringify ( pos ) ) ; } // Callback if ( _this . settings . callbackAutoGeoSuccess ) { _this . settings . callbackAutoGeoSuccess . call ( this , pos ) ; } _this . autoGeocodeQuery ( pos ) ; } , function ( error ) { _this . _autoGeocodeError ( error ) ; } ) ; } }
Geocode function used for auto geocode setting and geocodeID button
Geocode function used for auto geocode setting and geocodeID button