[mapserver-users] use SLD to dynamic label switching

Yewondwossen Assefa yassefa at dmsolutions.ca
Thu Mar 5 17:49:31 EST 2009


  I think what you need to do is have your 2 symbolizers inside the same 
Rule. This should display your polygons with labels.  Something like this:


Best Regards,

Balázs Bámer wrote:
> Hi All,
> I have a WMS service
> http://att-it.homelinux.net:22080/cgi-bin/spatial?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=szerkesztheto,csakolv,pont&STYLES=&SRS=epsg:23700&BBOX=420000,40000,950000,370000&WIDTH=938&HEIGHT=591&FORMAT=image/png&SLD=http://att-it.homelinux.net:22080/sld/spatialszerkeszthetoproba.xml
> Mapfile is here, the layer in question is "szerkesztheto"
> http://att-it.homelinux.net:22080/spatial.map
> which works without the SLD request part and does what I want. I want
> to use the SLD to alter rendering colors and add labels, because I
> beleive that this would be more efficient than having a geometry layer
> and a separate annotation one. Moreover, I want to try SLD.
> So with SLD the layer in question disappears. Inspecting the
> transformed layer (written in /tmp)
> http://att-it.homelinux.net:22080/spatialsld3.map
> the layer "szerkesztheto" is turned into annotation type which I
> didn't want. But even being this type, no labels are shown.
> Can this SLD trick be done, and if yes, where am I wrong?
> Thank you in advance!
> best regards: Balázs
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925

More information about the mapserver-users mailing list