Some caching fixes
This commit is contained in:
parent
ff038a70c4
commit
3eeaf7fbb2
@ -11,7 +11,7 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
const CACHE_VERSION = { 'version': '0.0.892' };
|
||||
const CACHE_VERSION = { 'version': '0.0.893' };
|
||||
const PRECACHE = `jubileeData-${CACHE_VERSION.version}`;
|
||||
const RUNTIME = 'runtime';
|
||||
|
||||
|
@ -98,13 +98,7 @@ const LocationModel = Backbone.Model.extend({
|
||||
|
||||
// rawburn house 51.490002, -0.140245
|
||||
// thomas more 51.5084707,-0.068798
|
||||
const distanceFromLast = distance(current.latitude, current.longitude, latitude, longitude);
|
||||
|
||||
if (distanceFromLast < 0.001) {
|
||||
console.log('Insignificant distance, bail');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const geocoder = NodeGeocoder(options);
|
||||
// 55.872407, -3.549003
|
||||
@ -149,7 +143,7 @@ const LocationModel = Backbone.Model.extend({
|
||||
else {
|
||||
newLocation.city = current.city;
|
||||
const currentTime = new Date().getTime();
|
||||
|
||||
const distanceFromLast = distance(current.latitude, current.longitude, latitude, longitude);
|
||||
const lastGeocode = this.get('lastGeocode');
|
||||
const distanceFromLastGeocode = distance(lastGeocode.lat, lastGeocode.lng, latitude, longitude);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user