-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
As far as I can tell, the JSON tile files aren't being cached. You have
if ((typeof jsonCache[cellx] !== 'undefined') &&
(typeof jsonCache[cellx][celly] !== 'undefined') &&
(typeof jsonCache[cellx][celly][zoom] !== 'undefined'))
{
// Cache hit
console.log('cache hit');
handleJson (x, y, jsonCache[cellx][celly][zoom], callback);
return;
}
But I don't see this getting set with a successfully loaded json file anywhere in the source. The closes it gets is this:
handleJson (x, y, json[zoom], callback);
if (typeof jsonCache[cellx] === 'undefined') {
jsonCache[cellx] = {};
}
jsonCache[cellx][celly] = json;
This is perhaps where the bug is - maybe it needs to be
handleJson (x, y, json[zoom], callback);
if (typeof jsonCache[cellx] === 'undefined') {
jsonCache[cellx] = {};
}
if (typeof jsonCache[cellx][celly] === 'undefined') {
jsonCache[cellx][celly] = {};
}
jsonCache[cellx][celly][zoom] = json;
I can't tell if this is intentional or not. Would be great if you could review.
Metadata
Metadata
Assignees
Labels
No labels