[MapServer-users] classgroup and group for styles

Jörg Thomsen (WhereGroup) joerg.thomsen at wheregroup.com
Tue Jul 2 08:28:09 PDT 2024


Hello,

I've found an undocumented behavior of MapServer configuring different 
layer-styles. My questions are:

- Am I not able to find the documentation?
- Is it a wanted or an unwanted behavior?
- Am I wrong?

1st:
naming the classgroup and the group-item within the classes "default" 
the style does not appear in the capabilities. I think, if there are 
more than one style, both/all styles have to be provided in the 
capabilities.

2nd:
You need to name the classes, otherwise the style-names are not provided.

Jörg

# only style 'red' is provided:

https://schulung.foss.academy/cgi-bin/mapserv?map=styletest&SERVICE=WMS&REQUEST=GetCapabilities



# style default:

https://schulung.foss.academy/cgi-bin/mapserv?map=styletest&STYLES=default&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=32.82367387033398387%2C65.81237721021611264%2C40%2C76.31237721021611264&CRS=EPSG%3A4326&WIDTH=1018&HEIGHT=697&LAYERS=inline_stops&FORMAT=image%2Fpng&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi%3A96&TRANSPARENT=TRUE



# style 'secret' (not in capabilities)

https://schulung.foss.academy/cgi-bin/mapserv?map=styletest&STYLES=secret&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=32.82367387033398387%2C65.81237721021611264%2C40%2C76.31237721021611264&CRS=EPSG%3A4326&WIDTH=1018&HEIGHT=697&LAYERS=inline_stops&FORMAT=image%2Fpng&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi%3A96&TRANSPARENT=TRUE



MAP

     NAME "wms_freiburg_different_styles"

     EXTENT 60 30 80 40

     PROJECTION

         "init=epsg:4326"

     END



	WEB	

		METADATA

			WMS_TITLE    "test"

			WMS_ENABLE_REQUEST "*"

			WMS_SRS   "EPSG:4326"

		END

	END



     Symbol

       NAME "square"

       Type ellipse

         Points 1 1 END

         Filled TRUE

     END



	LAYER

	  NAME "inline_stops"

	  TYPE POINT

	  		METADATA

			WMS_TITLE    "test"

		END

	  FEATURE

		POINTS

		  69 35 71 37 72 38

		END

	  END

	

	  CLASSGROUP 'default'

	

	  CLASS

	    GROUP 'default'

		STYLE

		  COLOR 0 0 250

		  SYMBOL 'square'

		  SIZE 6

		END

	  END



	  CLASS

	    NAME 'red'

	    GROUP 'red'

		STYLE

		  COLOR 255 0 0

		  SYMBOL 'square'

		  SIZE 6

		END

	  END



	  CLASS

	    #NAME 'none'

	    GROUP 'secret'

		STYLE

		  COLOR 100 100 100

		  SYMBOL 'square'

		  SIZE 6

		END

	  END

	

	END

END






-- 
Viele Grüße,
Jörg Thomsen

***********************************************************
FOSS Academy Sommerschule: Kompaktkurs zum Aufbau einer GDI
02.-06. September 2024, Präsenzveranstaltung in Bonn
https://www.foss-academy.com/kompaktkurse
***********************************************************


Jörg Thomsen
WhereGroup GmbH
Bundesallee 23
10717 Berlin
Germany

Tel: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 5130 278 11	

joerg.thomsen at wheregroup.com
www.wheregroup.com

Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885



More information about the MapServer-users mailing list