[OpenLayers-Users] caching script
Brent Pedersen
bpederse at gmail.com
Thu Oct 19 13:39:15 EDT 2006
hi, i have a python caching script hacked up for openlayers here:
http://128.32.253.248/openlayers/tilecache.txt
and demo here: http://128.32.54.87/openl.html (non-cached tiles are
_sloooow_ )
it splits into directories for caching by the url: &layers=abcd&request=wms
becomes: /layers__abcd/request_wms/
and it splits up the spatial parameters so that there are never > 1000 files
per directory. meaing &x=12345 becomes /x_12/345/ where x is the
tile_number.
if the files are saved in a web dir, once all tiles are known to be cached,
you can potentially circumvent the caching script (and the WMS) by just
creating the url to the cached image directly in javascript... [i have not
implemented this yet, but should be < 15 lines of .js]
right now works for WMS and MapServer after modification of
/OpenLayers/Tile/Image.js (copy and paste from the docstring in the python
code linked above and change the url to point to your version of
tilecache.py ).
It could be better integrated into the openlayers api but then it wouldnt be
a hack.
and i thought before i put more time into it, i thought i'd check to see if
this has already been done for OL. or if anyone has ideas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20061019/3b032d27/attachment.html
More information about the Users
mailing list