[ka-Map-users] can 2 map files share a cache for a specific data group

Steve Walker walker at mfgis.com
Sat Jan 27 14:12:57 EST 2007


In response to the OP's question I have one idea along the lines of
Lorenzo's code below - (sorry I don't know how to keep the thread all
together after time has elapsed between postings)

Original Question Was:

=== SNIP ===

is it possible to have two map file choices in ka-map, each with different
groups of layers, where one group is in common to both map files and the
kacache for that group is shared by both maps?

=== SNIP ===

It is pointed out below that the parent cache directory for each map is
set using the $szMapCacheDir variable.   It turns out that $szMapCacheDir
is itself set in config.php using the map name ($szMap) variable:
  $szMapCacheDir = $szBaseCacheDir.$szMap;

Changing this line of code, to something like






==== SNIP ====

if I remember right, in tile.php you have:

$szCacheDir = $szMapCacheDir."/".$scale."/".$szGroupDir."/".
$szLayerDir."/".$szMetaTileId;

just force $szMapCacheDir as a string of the same value, es:

$szCacheDir = "MyCommonMapDir/".$scale."/".$szGroupDir."/".
$szLayerDir."/".$szMetaTileId;

naturally all other params have to coincide.

This is pretty useful to reduce the total amount of cached layers,   more
then ever with raster layers.

ciao
Lorenzo






More information about the ka-Map-users mailing list