Thank you for the generous reply Joshua. I am sorry about the delay in
reply, as I am away from my project on the weekends and yesterday was not
feeling so well. I see that you said that it's probably best to just go
with regular WMS layers that have labels instead of cached ones.
Interesting you say this, my next approach was going to be to make a cached
layer for each SLD and then just switch between the cached layers. I guess
this would not be a good idea and your suggesting that I use one WMS
layer/fewer WMS layers and just switch the SLD as you showed me previously?
Maybe I should start a new topic for this, but I was also wondering what
would be slower/cause more overhead...A WMS layer that is constructed from
many views of the PostGIS database and then switching different SLDs or
several different WMS layers that rely on different, smaller views (not
consisting of as many joins etc) and switching SLDs (same amount of SLDs as
the first case).
If you think I should open a new topic for this question, I will. I just
don't want to fill the forum up with topic of my curious mind :p
Thank you so much for all your help and happy mapping!
elshae
On Fri, Jan 21, 2011 at 5:37 PM, Joshua M. Thompson <
[email protected]> wrote:
> On Fri, Jan 21, 2011 at 4:32 PM, IT Intern <[email protected]> wrote:
> > "GWC *can* be set up to cache multiple versions
> > of a layer based on the values in the STYLES= (or any other) wms
> > parameter, but that won't work if you are using truly dynamic styles;
> > for example if you let the user choose arbitrarily style parameters on
> > the client side and build an SLD from that."
> >
> > How come? What I mean to ask is that even if the user does pick the SLD
> and
> > it is built on the fly, wouldn't that SLD still have to be set-up in the
> > same format as that read from the file?
>
> It's because GWC only knows how to do this caching by the actual WMS
> parameters. In this case the parameter is 'SLD' and its value is the
> URL to an SLD file. GWC won't actually retrieve and interpret the
> contents of that file though.
>
> If you can make your dynamic SLD always have a unique filename based
> on the file contents (perhaps using a SHA or MD5 hash of the contents
> as the filename) you could possibly make it work like you want. You
> would think this through carefully though because if you have a lot of
> varying styles being used you could start to fill your cache with
> stuff that is never used again, and if you have cache expiration set
> up it's possible that you might start pushing out things you WANT to
> save.
>
> I've generally found that caching is best for things like base maps
> that never change. Also, due to complications making labels work well
> with tiles it's usually best to not cache layers that have labels in
> them, unless you carefully place your labels. When I wrote LL-MAP we
> ended up caching the actual base maps, but the overlays with country
> borders & labels are done as a regular WMS layer. We also don't cache
> or tile user-generated maps for similar reasons (plus, those maps
> usually are usually very simple, and not worth the effort of making
> them work with the cache.)
>
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users