[OpenLayers-Users] Tile cache?????

Christopher Schmidt crschmidt at metacarta.com
Wed Aug 29 08:18:36 EDT 2007


On Wed, Aug 29, 2007 at 02:59:20PM +0530, Prasad Choudhary wrote:
> Hello all,
> 
> I have a map tiles directory in my application.
> 
> I want to access the tile cache from OL, how come I work with them?
> 
> Which layers should be used for that?

The best layer to look at is probably Layer.TMS, as a starting point.
you'll want to modify the getURL function to match your particular type
of tile cache: 

http://trac.openlayers.org/wiki/UsingGoogleTileSchema

shows how to override the getURL function without the need to edit any
code.

getURL is passed a bounds, and from that bounds, you must calculate a
tile URL. If you think you can't do that, an example of your cache
layout would be nice.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list