function grabLatLon (i) {
			var d = $.Deferred();
			EXIF.getData(images[i], function () {
				var lat = EXIF.getTag(this, 'GPSLatitude');
				var lon = EXIF.getTag(this, 'GPSLongitude');
				if (lat) {
					var latRef = EXIF.getTag(this, 'GPSLatitudeRef') || 'N';
					lat = (lat[0] + lat[1]/60 + lat[2]/3600) * (latRef === 'N' ? 1 : -1); 
					if (lon) {
						var lonRef = EXIF.getTag(this, 'GPSLongitudeRef') || 'W';
						lon = (lon[0] + lon[1]/60 + lon[2]/3600) * (lonRef === 'W' ? -1 : 1);
						trackPhotos[i].picLatLng = [lat, lon];
					}
				}
				d.resolve();
			});
			return d.promise();
		}
// Set up tasks to grab lat, lon from exif
Set up tasks to grab lat, lon from exif
Set up tasks to grab lat lon from exif
function grabLatLon (i) {
			var d = $.Deferred();
			EXIF.getData(images[i], function () {
				var lat = EXIF.getTag(this, 'GPSLatitude');
				var lon = EXIF.getTag(this, 'GPSLongitude');
				if (lat) {
					var latRef = EXIF.getTag(this, 'GPSLatitudeRef') || 'N';
					lat = (lat[0] + lat[1]/60 + lat[2]/3600) * (latRef === 'N' ? 1 : -1); 
					if (lon) {
						var lonRef = EXIF.getTag(this, 'GPSLongitudeRef') || 'W';
						lon = (lon[0] + lon[1]/60 + lon[2]/3600) * (lonRef === 'W' ? -1 : 1);
						trackPhotos[i].picLatLng = [lat, lon];
					}
				}
				d.resolve();
			});
			return d.promise();
		}
function grabLatLon ( i ) { var d = $ . Deferred ( ) ; EXIF . getData ( images [ i ] , function ( ) { var lat = EXIF . getTag ( this , 'GPSLatitude' ) ; var lon = EXIF . getTag ( this , 'GPSLongitude' ) ; if ( lat ) { var latRef = EXIF . getTag ( this , 'GPSLatitudeRef' ) || 'N' ; lat = ( lat [ 0 ] + lat [ 1 ] / 60 + lat [ 2 ] / 3600 ) * ( latRef === 'N' ? 1 : - 1 ) ; if ( lon ) { var lonRef = EXIF . getTag ( this , 'GPSLongitudeRef' ) || 'W' ; lon = ( lon [ 0 ] + lon [ 1 ] / 60 + lon [ 2 ] / 3600 ) * ( lonRef === 'W' ? - 1 : 1 ) ; trackPhotos [ i ] . picLatLng = [ lat , lon ] ; } } d . resolve ( ) ; } ) ; return d . promise ( ) ; }
Set up tasks to grab lat, lon from exif
Set up tasks to grab lat lon from exif