[ka-Map-dev] New Cache structure
Pablo Martínez Pérez
pablo.martinez at conocimientoytecnologia.org
Thu Jun 21 03:01:24 EDT 2007
Hi,
I need for my kaMaps applications a new cache structure.
This is what I make:
Objetive:
- Make cache available for different kaMap applications.
- New cache directory structure:
[cache_dir]/[layer]/[scales]
example of new cache dir:
/cache/raster_2007/80000/def/...
/cache/rivers/30000/def/...
Implementation:
- Config.php:
//$szMapCacheDir = $szBaseCacheDir.$szMap;
$szMapCacheDir = $szBaseCacheDir;
- Tile.php:
//$szCacheDir = $szMapCacheDir."/".$scale."/".$szGroupDir."/".$szLayerDir."/".$szMetaTileId;
$oMap = ms_newMapObj($szMapFile);
$aLayersIdx = $oMap->getLayersIndexByGroup($groups);
$oLayer = $oMap->getLayer($aLayersIdx[0]);
$szMetaGroupDir = $oLayer->getMetaData('tile_folder');
$szCacheDir = $szMapCacheDir."/".$szMetaGroupDir."/".$scale."/".$szMetaTileId;
...
//$oMap = ms_newMapObj($szMapFile);
- MAP FILE:
METADATA
"tile_folder" "[directory]" -> "tile_folder" "raster_2007"
END
Its all ok?
I need your opinion.
-------------------
Pablo Martínez
More information about the ka-Map-dev
mailing list