[mapserver-users] Mapcache with mapfile as layer

Stephen Woodbridge woodbri at swoodbridge.com
Thu Sep 19 15:53:46 PDT 2013


If you modify the mapfile then it invalidates the whole cache for the 
tileset and you have other maintenance to do on it anyway. I would write 
a script that does the maintenance of checking the for mapfile changes, 
deleting the invalid tiles maybe updating the mapcache.xml, etc.

-Steve W

On 9/19/2013 3:45 PM, Pablo Cecconi wrote:
> The problem with that approach is that is the mapfile changes (a layer
> is added or the default status of a layer changes) then I also have to
> update mapcache config file. What i wonder is if there is a way to just
> modify the map and have Mapcache reflecting that change.
>
> Pablo
>
>
> On Thu, Sep 19, 2013 at 4:40 PM, Stephen Woodbridge
> <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>> wrote:
>
>     On 9/19/2013 3:02 PM, Pablo Cecconi wrote:
>
>         Hello,
>
>         I've been a Mapserver user for many years now but I'm new to
>         Mapcache
>         and I'm not sure whether it's possible to replicate a particular
>         TileCache setup using Mapcache.
>         What we have today is a number of mapfiles (with Mapserver 5.4)
>         set up
>         as WMS-C layers served with TileCache. We're migrating to Mapserver
>         6.2.1 and as it's incompatible with TileCache we expect to be
>         able to
>         replace it using Mapcache.
>         In our current setup if I have a mapfile where a particular
>         layer has
>         STATUS OFF then TileCache will honor that status and not render
>         the layer.
>         I'd like to know whether it's possible to have MapCache work
>         that way,
>         that is, passing the map name as the LAYERS parameter of the WMS
>         service
>         and make it honor whatever STATUS a particular layer would have
>         in the
>         mapfile.
>
>
>     I think the mapcache paradigm for this in mapcache works like this:
>
>     tileset
>        name=foo
>        source=foo-source
>
>     source
>        name=foo-source
>        map=/path/to/mapfile
>        layers=layer1,layer2,layers3,.__..
>
>     So you can configure which layers a tileset returns. I'm not sure
>     how it deals with the status off, but it will work if you define the
>     list explicitly. This also allow you to do this in the same mapcache.xml
>
>     tileset
>        name=foo2
>        source=foo-source2
>
>     source
>        name=foo-source2
>        map=/path/to/mapfile
>        layers=streets,...
>        transparent=true
>
>     I do this a lot when I have a subset of data like streets that I
>     want to render as an overly on a raster image
>
>     -Steve W
>     _________________________________________________
>     mapserver-users mailing list
>     mapserver-users at lists.osgeo.__org
>     <mailto:mapserver-users at lists.osgeo.org>
>     http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
>     <http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>
>



More information about the mapserver-users mailing list