Mercurial > dive4elements > river
view artifacts/doc/conf/mapserver/river-mapfile.vm @ 5890:6ea004d51203
Datacage: Introduced <dc:group epxr="xpath" type="type"> ... </dc:group> and XPath function dc:group-key().
This splits the current result set into groups formed by expr. The type defaults to string.
Afterwards all these groups are iterated by there natural order.
The dc:group-key() gives access to the result of the grouping expression that forms a group.
Say, you have a result set like this:
name | description
-----+------------
a | foo
a | bar
b | baz
b | bla
c | blub
you can use:
<dc:group expr="$name">
<group name="{dc:group-key()}">
<dc:for-each>
<description value="{$description}"/>
</dc:for-each>
</group>
</dc:group>
to create:
<group name="a">
<description name="foo"/>
<description name="bar"/>
</group>
<group name="b">
<description name="baz"/>
<description name="bla"/>
</group>
<group name="c">
<description name="blub"/>
</group>
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 02 May 2013 20:52:18 +0200 |
parents | 5aa05a7a34b7 |
children | af29a0bc254a |
line wrap: on
line source
MAP NAME "Rivers" STATUS ON SIZE 600 400 MAXSIZE 4000 #EXTENT 3233232.55407617 5303455.37850183 3421524.44644752 5585825.50888523 UNITS DD SHAPEPATH "$SHAPEFILEPATH" FONTSET "$CONFIGDIR/mapserver/fontset.txt" SYMBOLSET "$CONFIGDIR/mapserver/symbols.sym" IMAGECOLOR 255 255 255 PROJECTION "init=epsg:31467" END DEBUG 3 CONFIG "MS_ERRORFILE" "/tmp/flys-rivers-wms.log" WEB METADATA "wms_title" "FLYS Rivers Web Map Service" #"wms_onlineresource" "http://localhost:7777/river-wms" # "$MAPSERVERURL" "wms_accessconstraints" "none" "wms_fees" "none" "wms_addresstype" "postal" "wms_address" "Any Street" "wms_city" "Any City" "wms_stateorprovince" "Any state" "wms_postcode" "My Postalcode" "wms_country" "Any Country" "wms_contactperson" "Any Person" "wms_contactorganization" "Any Orga" "wms_contactelectronicmailaddress" "any-email@example.com" "wms_contactvoicetelephone" "Any's telephone number" "wms_srs" "EPSG:4326 EPSG:31466 EPSG:31467" "wms_feature_info_mime_type" "text/html" "ows_enable_request" "*" END END LEGEND KEYSIZE 20 20 STATUS ON TRANSPARENT ON LABEL COLOR 150 150 150 OUTLINECOLOR 255 255 255 TYPE truetype FONT "FreeSans" SIZE 12 POSITION AUTO END END ## Don't change the following lines. #foreach ($LAYER in $LAYERS) include "$LAYER" #end END