OpenLayers. Layer. KaMapCache

This class is designed to talk directly to a web-accessible ka-Map cache generated by the precache2.php script.

To create a a new KaMapCache layer, you must indicate also the “i” parameter (that will be used to calculate the file extension), and another special parameter, object names “metaTileSize”, with “h” (height) and “w” (width) properties.

// Create a new kaMapCache layer. var kamap_base = new OpenLayers.Layer.KaMapCache( “Satellite”, “http://www.example.org/web/acessible/cache”, {g: “satellite”, map: “world”, i: ‘png24’, metaTileSize: {w: 5, h: 5} } );

// Create an kaMapCache overlay layer (using “isBaseLayer: false”).  // Forces the output to be a “gif”, using the “i” parameter. var kamap_overlay = new OpenLayers.Layer.KaMapCache( “Streets”, “http://www.example.org/web/acessible/cache”, {g: “streets”, map: “world”, i: “gif”, metaTileSize: {w: 5, h: 5} }, {isBaseLayer: false} );

The cache URLs must look like

var/cache/World/50000/Group_Name/def/t-440320/l20480

This means that the cache generated via tile.php will not work with this class, and should instead use the KaMap layer.

More information is available in Ticket #1518.

Inherits from

Summary
OpenLayers. Layer. KaMapCacheThis class is designed to talk directly to a web-accessible ka-Map cache generated by the precache2.php script.
Constants
IMAGE_EXTENSIONS{Object} Simple hash map to convert format to extension.
DEFAULT_FORMAT{Object} Simple hash map to convert format to extension.
Constructor
OpenLayers. Layer. KaMapCache

Constants

IMAGE_EXTENSIONS

{Object} Simple hash map to convert format to extension.

DEFAULT_FORMAT

{Object} Simple hash map to convert format to extension.

Constructor

OpenLayers. Layer. KaMapCache

Parameters

name{String}
url{String}
params{Object} Parameters to be sent to the HTTP server in the query string for the tile.  The format can be set via the ‘i’ parameter (defaults to jpg) , and the map should be set via the ‘map’ parameter.  It has been reported that ka-Map may behave inconsistently if your format parameter does not match the format parameter configured in your config.php.  (See ticket #327 for more information.)
options{Object} Additional options for the layer.  Any of the APIProperties listed on this layer, and any layer types it extends, can be overridden through the options parameter.
Base class for layers that use a lattice of tiles.
Close