Map Engine ArcGIS (SOAP)

The ArcGIS Server Web Service map engine component provides a means for the Weave server to generate maps using ArcGIS Server via its web service API. This has the advantage over the direct ArcGIS Server map engine because it does not require any additional components to be installed on the server while still providing the same level of functionality (hence the direct connect component being made obsolete).

For information about using ArcGIS Server map caches with Weave see the page ArcGIS Server map caches.

Namespace

urn:com.cohga.server.map.arcgis.ws#1.0

Tags

mapengine

Properties

Name

Type

Required

Default

Description

id

string

yes


Unique identifier for this map engine, will be used by other items to refer to this map engine

url

string

yes


The URL used to connect to the ArcGIS server, e.g. http://vmbreakout:8399/arcgis/services/Topo250/MapServer

map

string

no

the first map

The name of the map within the map service to connect to if there is more than one. This is not the map service name, which is included the URL, but the name of a map within the .mxd file itself. Generally this does not need to be set at all.

mapcache

boolean

no

false

Should a tile cache be used (if it's available). If this is false or not set then any tile cache generated for the map service WON'T be used

crs

string

no


Override the coordinate reference system supplied by ArcGIS

username

string

no


A username to connect to the server as

password

string

no


A password to connect to the server as, should be encrypted using 'encrypt' at the OSGi prompt

usename

boolean

no

false

Use the layer name to refer to individual layers, especially useful when building a ToC model since the names don't change as often as the id. You should ensure that the layer name is unique if you set this to true. If not set or set to false then the layer identifiers for each layer (which are used in ToC models, amongst other things) will be taken from the order that the layer appears within the .mxd file, which can change if layers are added/removed from the .mxd file. If set to true then the label that appears in the .mxd file will be used as the identifier instead

transparent

boolean

no

false

If true then ArcGIS is asked to generate an image that is transparent where no map data is drawn

directbooleannofalseIf true then Weave will send the URL's returned from ArcGIS directly to the client rather than proxying them on behalf of ArcGIS. This will help performance if ArcGIS is accessed internally and the clients can access the URL's the ArcGIS returns.
refererstringno

Referer header value when sending HTTP requests to ArcGIS server (since com.cohga.server.map.arcgis.ws bundle version 2.38.48)

This is useful if ArcGIS server filters all requests by header value by comparing the referer domain against a list of white-listed domains.

cachetilesbooleannofalseShould Weave cache the tiles it retrieves from ArcGIS. This only applies to ArcGIS map engines using a map cache and can be enabled if the back-end service is slow to return the tiles, for example, if it's not hosted internally.
cacheexpiryintegerno-1How many minutes should Weave keep the cached ArcGIS tiles for before they're considered stale and should be re-fetched? This only applies to ArcGIS map engines using a map cache and only if cachetiles is set to true. -1 means the tiles are kept forever.
ignoregroupsbooleannotrue

Should Weave ignore the groups when working with ArcGIS map documents.

When Weave works with map layers it only deals with the layers themselves, groups don't come into play until you start creating a ToC model, and even then the grouping in ToC models is not used when referring to map layers (they're only used internally on the client to turn on/off a collection of individual layers). Normally this works fine for ArcGIS as Weave will ensure that if a layer is "visible", then all of its parent groups (on the ArcGIS side) will also be turned on. This ensures that the layer is actually visible (as a layer won't be displayed if it's visible but one or more of its parents aren't). This way you can setup your AGS map document however you want (with or without groups) and have the Weave ToC model be the single source of group related information for the ToC panel, and then Weave will ensure that the map layers that need to be drawn are drawn.

However, sometimes it's desirable to have Weave recognize the groups (that's the ArcGIS map document groups, not ToC model groups) and have them treated as layers. By setting ignoregroups to false Weave will include entries in the map engine description for the groups as well as for the layers. In this case the ToC model and the ArcGIS map document groups will, in combination, be responsible for determining whether a layer is visible or not.

timeoutintegerno
The timeout, in milliseconds, to wait for a connection to ArcGIS. If not set the ArcGIS default is used.

Sub-tags

Name

Type

Cardinality

pool

urn:com.cohga.server.pool#1.0:pool

0..1

layers

urn:layers

0..1

legend

urn:legend

0..1

Content

None

layers

Properties

None

Sub-tags

Name

Type

Cardinality

remove

urn:remove

0..1

layer

urn:layer

0..n

Content

None

remove

Properties

None

Sub-tags

Name

Type

Cardinality

layer

urn:layer

0..n

Content

None

layer

Properties

Name

Type

Required

Description

id

number

no

The id of the layer to match

name

string

no

The name of the layer to match

Sub-tags

None

Content

The id or name, depending upon the usename property, of the layer to match

Notes

  • The layer tag support two formats, one using the id and/or name attributes and the other using the tags content
  • Either one or both of the id and/or name attributes must be set OR tag content must be provided
  • If the content of the layer tag is used then the value of the usename property determines if the content should match the layer id or the layer name
  • Both the id and name attributes can be set, but they must match both values for the layer that you're trying to filter or they won't match the layer
  • The pool tag when used with ArcGIS Server also support a maxAgeMillis property which specifies how long the connection to ArcGIS Server should be kept for, this should be less that the value set for "The maximum time a client can use a service" in ArcGIS, note however that this check only occurs during connection validation, so testOnBorrowtestOnReturn and/or testWhileIdle must be set for the pool. ArcGIS Server Settings - Pooling and Processes

legend

Alter the display of the legend

Properties

None

Sub-tags

Name

Type

Cardinality

alias

urn:aliases

0..1

Content

None

aliases

List the new labels to be displayed for a layer

Properties

None

Sub-tags

Name

Type

Cardinality

alias

urn:alias

0..n

Content

None

alias

A single label change for a layer

Properties

Name

Type

Required

Description

id

string

yes

The id of the layer to change

label

string

yes

The label to display

Sub-tags

None

Content

None

Examples

Simple ArcGIS definition

<arcgisws:mapengine id="arcgis.topo">
	<url>http://vmbreakout:8399/arcgis/services/Topo250/MapServer</url>
</arcgisws:mapengine>

ArcGIS definition overriding CRS returned, asking for a transparent image and using the layer names, rather than order, as the unique identifier for a layer

<arcgisws:mapengine id="arcgis.roads">
	<url>http://vmbreakout:8399/arcgis/services/Roads/MapServer</url>
	<crs>EPSG:20255</crs>
	<transparent>true</transparent>
	<usename>true</usename>
</arcgisws:mapengine>

ArcGIS definition using a tile cache and connection pooling

<arcgisws:mapengine id="arcgis.base">
	<url>http://vmbreakout:8399/arcgis/services/Base/MapServer</url>
	<map>Layers</map>
	<crs>EPSG:20255</crs>
	<transparent>true</transparent>
	<usename>true</usename>
	<mapcache>true</mapcache>
	<pool:pool>
		<maxActive>16</maxActive>
		<minIdle>2</minIdle> <!-- always keep at least 2 connection open -->
		<maxIdle>8</maxIdle>
		<testOnBorrow>true</testOnBorrow>
		<testWhileIdle>true</testWhileIdle> <!-- enable background tests so that "old" (i.e. maxAgeMillis) connections can be cleaned up in the background -->
		<timeBetweenEvictionRunsMillis>30000</timeBetweenEvictionRunsMillis>
		<numTestsPerEvictionRun>16</numTestsPerEvictionRun> <!-- test all the connection on each run -->
		<minEvictableIdleTimeMillis>300000</minEvictableIdleTimeMillis> <!-- close a connection that's been idle for five minutes -->
		<whenExhaustedAction>block</whenExhaustedAction> <!-- ensure we don't create more than maxActive connections -->
		<maxAgeMillis>565000</maxAgeMillis> <!-- close anything that's been open for a the max allowed time from AGS (assuming 600 seconds here) minus a little more than the timeBetweenEvictionRunsMillis value to ensure it's removed before the AGS setting-->
	</pool:pool>
</arcgisws:mapengine>

ArcGIS definition providing only a single specific layer based on the layer id

<arcgisws:mapengine id="arcgis.roads">
	<url>http://vmbreakout:8399/arcgis/services/Base/MapServer</url>
	<layers>
		<layer id="0"/>
	</layers>
</arcgisws:mapengine>

ArcGIS definition providing only a single specific layer based on the layer name

<arcgisws:mapengine id="arcgis.roads">
	<url>http://vmbreakout:8399/arcgis/services/Base/MapServer</url>
	<layers>
		<layer name="Aerial Photo"/>
	</layers>
</arcgisws:mapengine>

ArcGIS definition providing only a single specific layer based on the layer id, using an alternate format

<arcgisws:mapengine id="arcgis.roads">
	<url>http://vmbreakout:8399/arcgis/services/Base/MapServer</url>
	<layers>
		<layer>0</layer>
	</layers>
</arcgisws:mapengine>

ArcGIS definition providing only a single specific layer based on the layer name, using an alternate format

<arcgisws:mapengine id="arcgis.roads">
	<url>http://vmbreakout:8399/arcgis/services/Base/MapServer</url>
	<usename>true</usename>
	<layers>
		<layer>Aerial Photo</layer>
	</layers>
</arcgisws:mapengine>

ArcGIS definition removing a specific layers based on the layer id

<arcgisws:mapengine id="arcgis.roads">
	<url>http://vmbreakout:8399/arcgis/services/Base/MapServer</url>
	<layers>
		<remove>
			<layer id="12"/>
			<layer id="13"/>
		</remove>
	</layers>
</arcgisws:mapengine>

ArcGIS definition removing a specific layers based on the layer name, using an alternate format

<arcgisws:mapengine id="arcgis.roads">
	<url>http://vmbreakout:8399/arcgis/services/Base/MapServer</url>
	<usename>true</usename>
	<layers>
		<remove>
			<layer>Property (Pending)</layer>
			<layer>Property (Historical)</layer>
		</remove>
	</layers>
</arcgisws:mapengine>

Changing labels for legend

<arcgis:mapengine id="mapengine.vector.ags">
	<url>http://vmbreakout:8399/arcgis/services/Base/MapServer</url>
	<legend>
		<aliases>
			<alias id="Boundary_Suburbs" label="Suburbs"/>
			<alias id="Property_BodyCorporate" label="Body Corporate"/>
		</aliases>
	</legend>
</arcgis:mapengine>