0

I'm using mapserver and openlayers for my gis server. I have a sqlite database that contain cached tiles and i want to use this cached tiles as base layer.

databse structure :
    Tiles
        id
        x
        y
        z
        Type
        CacheTime
    TilesData
        id
        Tile(blob)

How can i do it?

Can i use my tiles as raster layer in MapServer? or as cache in MapCahce? or directly in OpenLayers?

I found MapCache, TileCache MapProxy and GeoWebCach(for openlayers). But i don't know Which can help me for this purpose.

note : I can export my data to disk or change database tables, if needed.

1 Answer 1

2

We work regularly with tiled layers in our applications and I usually store tiles directly on a dedicated disk which I host as a virtual directory.

You can see the tile directory here:

http://argeomatica2012.cloudapp.net/SOLIDARIDAD_ortho/

I then add the tiles directly as a XYZ layer to my OpenLayers map like so:

layerXYZ = new OpenLayers.Layer.XYZ("XYZ layer", "http://argeomatica2012.cloudapp.net/SOLIDARIDAD_ortho/${z}/${x}/${y}.png", {
format: 'image/png',
transitionEffect: 'resize',
isBaseLayer: false
});
map.addLayer(layerXYZ);

You can see a working JSFiddle here:

http://jsfiddle.net/goldrydigital/09mLp0uk/

1
  • Just as note: for pregenerating the tiles with mapproxy you will need to configure the seed.yaml file. It's pretty easy, and then you emit the command to generate the tiles. Be prepared, depending on your configurations, this WILL TAKE A LONG TIME. Jan 5, 2015 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.