[mapserver-users] passing variables to includes

Jörg Thomsen (WhereGroup) joerg.thomsen at wheregroup.com
Fri Oct 13 00:43:28 PDT 2017


Hi,

I had a MapServer Training this week and one of the participations asks
a nice question:

Is it possible to pass variables to includes? I think this is a very
good idea, it could save a lot of includefiles. In know it's very close
to mapscript, but has anyone done this without?

sth like

 include layer.inc.map(soil, blah.shp, clay, 255 0 0)

and in layer.inc.map

Layer
  NAME '%0%'
  data '%1%'
  METADATA
    wms_title '%0%'
    ...
  END
  CLASS
    NAME '%2%'
    STYLE
       SYMBOL 'hatch'
       COLOR %3%'
       OUTLINECOLOR  0 0 0
       SIZE 5
       WIDTH 15
       ANGLE 45
    END
...




Viele Grüße,
Jörg

-- 

-----------------------------------------
Aufwind durch Wissen!
Qualifizierte Open-Source-GIS-Schulungen
bei der www.foss-academy.com
-----------------------------------------

Jörg Thomsen
WhereGroup GmbH & Co. KG
Gillweg 3
14193 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 89 09 53 21

joerg.thomsen at wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com


More information about the mapserver-users mailing list