Hi, Layers cannot have a same name in WMS. Use different names for layers and put them under the same GROUP. Use GROUP in WMS requests. Layers could look like
LAYER GROUP "group" NAME "close" STATUS ON DATA "close.shp" TYPE POLYGON MAXSCALEDENOM 60000 METADATA "wms_title" "close" END END LAYER GROUP "group" NAME "far" STATUS ON DATA "far.shp" TYPE POINT MINSCALEDENOM 60000 METADATA "wms_title" "far" END END -Jukka Rahkonen- Gracia Fernández López wrote: > > Hello, > > I want to replace the polygon representations in a layer by markers > when the zoom is out of a scale level. > > To do that, I have defined two layers in Mapserver to represent the > same objects: one of them is a Polygon, and the other one is a Point > (centroid), and I want to swap one for the other depending on the > scale. > > With the Mapserver queries, I had defined the same name for both > layers and it worked well. Now I need to do the same with WMS queries, > but neither I can assign the same name to the layers (if I do that > they are changed automatically), nor use the GROUP option (I obtain a > warning with GetCapabilities). I also tried using the parameter > wms_group_layer, but it puts a common title but not a common name, so > I can not query the group in the LAYERS param. > > Do anyone knows how to solve this issue in Mapserver? Or do I have to > do that in the viewer side? > > Thanks in advance for any help. > > -- > Regards > Gracia > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users