[Tilecache] Question about Tilecache and SLD [SOLVED]
David Alda Fernandez de Lezea
dalda at ikt.es
Fri Jan 22 05:27:36 EST 2010
Ok, I got it!!
Thanks Guillaume!!
What I've done is:
Tilecache.cfg
Add to my WMS server's url the parameter SLD pointing to the SLD file
[myTileCacheLayer]
type=WMSLayer
layers='myWMSLayerName'
srs=EPSG:23030
maxResolution=292.96875
bbox=460000, 4710000, 610000, 4820000
url=http://localhost/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wms.map&SLD=http://localhost/ol_visor/sld/usoSP.xml
extent_type=loose
And in the sld file NamedLayer must point to the wmsLayerName (i.e. 'myWMSLayerName')
<NamedLayer>
<Name>myWMSLayerName</Name>
-----Mensaje original-----
De: Guillaume Sueur [mailto:no-reply at neogeo-online.net]
Enviado el: viernes, 22 de enero de 2010 10:25
Para: David Alda Fernandez de Lezea
CC: tilecache at openlayers.org
Asunto: Re: [Tilecache] Question about Tilecache and SLD
not sure, but I don't think so. Try to put it in the url.
Guillaume
Le vendredi 22 janvier 2010 à 10:21 +0100, David Alda Fernandez de Lezea a écrit :
> Thanks for your response. Does tilecache have a parameter in which I set the sld, or I have to specify it in may WMS server url??
>
> Thanks.
>
> -----Mensaje original-----
> De: Guillaume Sueur [mailto:no-reply at neogeo-online.net]
> Enviado el: viernes, 22 de enero de 2010 10:18
> Para: David Alda Fernandez de Lezea
> CC: tilecache at openlayers.org
> Asunto: Re: [Tilecache] Question about Tilecache and SLD
>
> Hi,
>
> Actually, I would include the sld parameter into tilecache layer configuration (tilecache.cfg), and not on the client side. TileCache is intended to store tiles, you can't change them on the fly.
>
> Regards,
>
> Guillaume
>
> Le vendredi 22 janvier 2010 à 10:12 +0100, David Alda Fernandez de Lezea a écrit :
> > Is it possible to apply a SLD to a tilecache layer?
> >
> > For example:
> >
> > var layer = new OpenLayers.Layer.WMS( "My Layer",
> > "http://localhost/cgi-bin/tilecache-2.10/tilecache.py?",
> > { transparent: 'true', layers: 'recintosSigpacUSOSP', SLD:
> > "http://localhost/ol_visor/sld/usoSP.xml"},{isBaseLayer: false,
> > reproject: false, visibility: false, units: 'm', maxExtent: new
> > OpenLayers.Bounds(460000, 4710000, 610000, 4820000), maxResolution:
> > 292.96875} );
> >
> > I've try to do it, but it doesn't seem to colour my layer.
> >
> > Any idea?
> >
> > Thanks.
> >
> >
> >
> > Un saludo,
> >
> > ····································································
> > ··
> > ············
> >
> > David Alda Fernández de Lezea
> > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y
> > Biodiversidad
> >
> > IKT
> > Granja Modelo s/n · 01192 · Arkaute (Araba)
> >
> > ··················································································
> > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90
> > ··················································································
> > email: dalda at ikt.es web: www.ikt.es
> > ····································································
> > ·· ············ _______________________________________________
> > Tilecache mailing list
> > Tilecache at openlayers.org
> > http://openlayers.org/mailman/listinfo/tilecache
> >
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
>
More information about the Tilecache
mailing list