0

Added configurable option for controlling how long a tile will live in the browser's cache before being refetched. Good for configurations where the map will be automatically updated ona regular basis and the web browser's cache would get out of sync. Default is 24 hours.

This commit is contained in:
Gregory Short
2010-09-07 19:56:44 -05:00
parent 1b4a775f72
commit 32c2626b39
2 changed files with 9 additions and 3 deletions

View File

@@ -16,7 +16,8 @@
fileExt: 'png',
tileSize: 384,
defaultZoom: 1,
maxZoom: {maxzoom}
maxZoom: {maxzoom},
cacheMinutes: {cachelife}
};
var MCMapOptions = {
@@ -34,6 +35,8 @@
}
}
url = url + '.' + config.fileExt;
var d = new Date();
url += '?c=' + Math.floor(d.getTime() / (1000 * 60 * config.cacheMinutes));
return(url);
},
tileSize: new google.maps.Size(config.tileSize, config.tileSize),