[OSM-dev] Slippy map way forward -- OpenLayers and/or Mapstraction?

Christopher Schmidt crschmidt at crschmidt.net
Sat Jul 1 14:55:29 BST 2006

On Sat, Jul 01, 2006 at 03:40:20PM +0200, Erik Johansson wrote:
> On 7/1/06, Christopher Schmidt <crschmidt at crschmidt.net> wrote:
> >On Sat, Jul 01, 2006 at 02:54:25PM +0200, Erik Johansson wrote:
> >> You mean as in setting a 48h timeout, that's easy to do in Squid. But
> >> can you check if a BBOX has been updated?
> >
> >No. This is one of the long-term existing problems with OSM tiles
> Ok, it should be very fast to see if something has changed on a OSM
> tile, this should do it. (though you need to move a node to get an
> update)
> select max(timestamp) from nodes where latitude > #{lat2}  and
> latitude < #{lat1} and longitude > #{lon1} and longitude < #{lon2}
> Though how do you convey that information though Mapserver? It's
> completely useless otherwise, and the only way to solve the cache is
> by doing ugly hacks  such as file cache and squid purge.

Presumably, when an update is made, you kill the cached tile that is
affected, the same way you would with squid -- the difference is, I can
tell you how to do it with ka-Map. I've already written code to do it,
and would be willing to do whatever it took to get it to work for OSM's

But all of this comes back to using Mapsever, which comes back to
needing a regularly created static dump of the data, which can't exist
under the current setup. So this is not a near-term future goal.

> These are ugly hacks because there are so many tiling schemes around
> that there is no feasable way to understand each of them when writing
> the script that purges from the cache.

Right. You pick one you understand, and you write code against it. I'm
offering to do that with a ka-Map based renderer cause I know how to do
it -- I don't know how to with Squid, or I'd be offering that instead.

> >  http://trac.openstreetmap.org/ticket/121
> >
> >This is part of the reason why I mentioned that heading towards a
> >file-cache, where the location of tiles is on disk and therefore easily
> >under control
> So does open layers have support for file cache? I know Kamaps allow
> you do precache tiles from the WMS server down to a file cache, but
> that means you have the same problem..

OpenLayers can support any 'regular' tiling scheme, from Google's URL
scheme to WMS to ka-Map caches. If you can calculate a URL location via
a given lat/lon, it can be turned into an OpenLayers Layer. 

Christopher Schmidt
Web Developer

More information about the dev mailing list