Pitney Bowes MapXtreme User Manual

Page 359

Advertising
background image

Chapter 19: Web Map Service

Configuring Layer Information for a WMS Server

MapXtreme v7.1

366

Developer Guide

Your job, as developer of a WMS Server, is to decide how to assemble your data into WMS layers.
For example, you may have geographic data broken out into 10 separate .TAB files, such as
boundary files, point files and polyline files. In your WMS configuration file, you can represent these
10 layers as a single WMS layer or you can keep them as individual layers. If your data is offered to
a WMS client as a single layer, the client will get all 10 layers represented in a single WMS image. In
this case, the client cannot separate out the information they do not want.

If, however, you provide the 10 layers as individual layers, the WMS client can choose one, some or
all of those layers to be returned in a single image, or perhaps in multiple images, depending on their
needs. You must decide when configuring your WMS Server how much flexibility you will offer users.

You can also nest your layers so that by requesting the parent layer, the child layers are included in
the map image.

Using a MapXtreme Workspace to Build a WMS Configuration File

To build up the layer information in your WMS configuration file, consider extracting information
about each layer from a previously saved MapXtreme Workspace (.MWS).

The following is an excerpt from an .MWS created with MapXtreme Workspace Manager that
defines a layer called "World Countries". The .MWS layout is an XML file that follows the schema
contained in MXP_Workspace_1_5.xsd.

<FeatureLayer id="id10" name="World Countries" alias="world"
volatile="unknown">
<Visibility visible="true">
<VisibleRange enabled="false">
<ZoomRange uom="mapinfo:length mi" minInclusive="true"
maxInclusive="false">0 0</ZoomRange>
</VisibleRange>
</Visibility>
<DataSourceRef ref="id4" />
</FeatureLayer>

Now, this same layer information is contained in a WMS configuration file. Notice the information is
nearly identical, except that each tag contains "mxp:" to indicate these elements belong to the
MapXtreme workspace schema (MXP_Workspace_1_5.xsd).

<mxp:FeatureLayer id="id10" name="World Countries" alias="world"
volatile="unknown">

<mxp:Visibility visible="true">

<mxp:VisibleRange enabled="false">

<mxp:ZoomRange uom="mapinfo:length mi"

minInclusive="true" maxInclusive="false">0 0</mxp:ZoomRange>

</mxp:VisibleRange>

</mxp:Visibility>
<mxp:DataSourceRef ref="id4" />

</mxp:FeatureLayer>

You can build your layers by designing them in Workspace Manager and copying the information
into your WMS configuration file. See

Chapter 23: Workspace Manager

.

Advertising