read-only TileCache

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

read-only TileCache

Tim Schaub-2
Hey-

There was some talk some time ago about read-only support in TileCache.
  If you have a web accessible cache and want to accomplish this in
OpenLayers, you can use a TileCache layer as demonstrated here:

http://dev.openlayers.org/sandbox/tschaub/tc/examples/tilecache.html

It seems to me like this should provide the fastest access to your
tiles.  It also can be used to view tiles cached by TileCache with a
browser only (no server side dependencies).

Note that this example uses an array of URLs for the cache.  A single
URL string is also an option.  Also, the example shows how you might
return an alternate image (one that looks like water perhaps) where you
don't have an image cached.

Tim
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: read-only TileCache

Ehud Shabtai
On 4/4/07, Tim Schaub <[hidden email]> wrote:

...
> Also, the example shows how you might
> return an alternate image (one that looks like water perhaps) where you
> don't have an image cached.

Is it possible to use the error handler to request the tile again but
this time from the tilecache server? This would allow fast access to
existing tiles, without requiring the whole cache to be available.

If I remember correctly that's how Ka-Map works if you have a web
accessible cache.

--
Ehud Shabtai
http://www.freemap.co.il/map/
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: read-only TileCache

Tim Schaub-2
Ehud Shabtai wrote:
> Is it possible to use the error handler to request the tile again but
> this time from the tilecache server? This would allow fast access to
> existing tiles, without requiring the whole cache to be available.
>
> If I remember correctly that's how Ka-Map works if you have a web
> accessible cache.
>

Well, both TileCache (meaning tilecache.cgi) and ka-Map (meaning
tile.php) check to see if a tile exists in the cache first.  If the tile
exists, it is returned - if not, one is created.

If you are interested in having users create your cache for you, then it
is best to use TileCache directly (through tilecache.cgi).  The
OpenLayers.Layer.TileCache option is really only for cases where a
disk-based cache is already created and you want to give users fast
access to the tiles.

That said, if you wanted to create a client-side image error handler
that redirected users to tilecache.cgi, it is certainly possible.

Tim

Also - you can configure ka-Map with the "tile_source" "cache" option.
This makes the client side function like the OpenLayers.Layer.TileCache
layer - requesting the images directly.  Last time I checked, there
wasn't anything built in to switch to tile.php if this request failed.
Could be though.
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev