Mapfish Appserver

Platform for building web mapping applications

View project onGitHub

Mapfile conventions

File format

  • UTF-8 encoding (without BOM)
  • WEB METADATA “wms_encoding” “UTF-8”
  • Indentation with two spaces (no tabs)

Basic structure

Mapfiles have to deliver a correct WMS service. See

Topic and layer information are extracted from regular mapfile objects and additional METADATA entries.

Used Mapfile entries:

  • MAP NAME: Name of topic (without umlauts and special characters except ‘-‘)
  • LAYER NAME: Name of layer (without umlauts and special characters except ‘-‘)

Queriable layers

"wms_include_items"  "oid"
"gml_include_items"  "oid"
"gml_lk_text_alias"  "oid"

TEMPLATE                "blank.html"

Layer properties

To set the search radius for info queries, add a METADATA entry “gb_searchdistance”. Example:

"gb_searchdistance" "5"

Display order in layer tree:

"gb_toc_sort" "0" <!--
falls Reihenfolge nicht analog Layerreihenfolge in Mapfile sein soll -->

Selection style:

Default styling can be overwritten with a METADATA entry “gb_selection_style”. Examples:

"gb_selection_style" "<PolygonSymbolizer><Fill><CssParameter name='fill'>#ff0090</CssParameter></Fill></PolygonSymbolizer>"
"gb_selection_style" "<LineSymbolizer><Stroke><CssParameter name='stroke'>#ff0090</CssParameter><CssParameter name='stroke-width'>10.00</CssParameter></Stroke></LineSymbolizer>"
"gb_selection_style" "<PointSymbolizer><Graphic><Mark><WellKnownName>circle</WellKnownName><Fill><CssParameter name='fill'>#ff0090</CssParameter></Fill></Mark><Size>45.0</Size></Graphic></PointSymbolizer>"

Import topic from Mapfile

Import the mapfile into a new topic:

rake mapfile:import_topic MAPFILE=mapconfig/