MapServer LAYER>METADATA Object

This keyword allows for arbitrary data to be stored as name value pairs. This is used with OGC WMS to define things such as layer title. It can also allow more flexibility in creating templates, as anything you put in here will be accessible via template tags.

For full details of the MapServer LAYER Object please see the MapServer MAP Documentation.

Enabling Searching on a Layer

In order to be able to use the Search function on a Layer in iShare it must include the following METADATA section.

LAYER Object
    LAYER
        CONNECTION "Overlays\Schools\Secondary.tab"
        CONNECTIONTYPE OGR
        METADATA
            "qstring_validation_pattern"  "."
        END
        NAME "SchoolsSecond"
        STATUS OFF
        TYPE POINT
        UNITS METERS
        CLASS
            STYLE
                SYMBOL "Secondary"
                SIZE 20
            END
        END
    END

Defining WMS Details

For WMS Layers you need to pass information to the WMS in order to retrieve the required information. The following is an example of retrieving aerial photography using a WMS. The wms_proxy_... settings are only required if you are requesting the information via a proxy.

LAYER Object
LAYER
	NAME "Aerial"
	STATUS DEFAULT
	TYPE RASTER
	CONNECTION "http://t0.ads.astuntechnology.com/open/surreyopen/service?"
	CONNECTIONTYPE WMS
	METADATA
		"wms_srs"				"EPSG:27700"
		"wms_name"				"aerial2006"
		"wms_server_version"	"1.1.1"
		"wms_format"			"image/png"

		"wms_proxy_auth_type"	"any"
		"wms_proxy_host"		"x.x.x.x"
		"wms_proxy_port"		"xxxx"
		"wms_proxy_type"		"http"
		"wms_proxy_username"	"<DOMAIN>\<AstunTasksUser>"
		"wms_proxy_password"	"<password>"
	END
END 

Element

Description

Example Value

wms_srs

The projection which will always be the same as iShare only deals with British National Grid.

 

"EPSG:27700"

wms_name

The name of the layer you are requesting. This would normally be just one layer but you may request more by providing a comma separated list of layer names inside the double quotes.

"aerial2006"
wms_server_versionThe version of the software. This would not normally require changing.
"1.1.1"
wms_formatThe format that you wish the image to be returned. This would not normally require changing.
"image/png"
 
wms_proxy_auth_typeThis will always be "any"
"any"

wms_proxy_host

The IP address for the proxy host.
"10.0.0.1"

wms_proxy_port

The Port number for the proxy host
"25"

wms_proxy_type

The proxy type. This would not normally require changing.
"http"

wms_proxy_username

The Domain User that has permission to make use of the proxy. This is often the AstunTasksUser.
"<DOMAIN>\<AstunTasksUser>"

wms_proxy_password

The password for the Domain user.
"<password>"