Frequently asked question

What parameters can be passed to an HTML Viewer's URL?

Last Published: April 25, 2020

Answer

The ArcIMS HTML Viewer's URL can accept the following argument/value pairs to override initial display values:

· Host = Hostmachine
Name of Host, if not default.

· Service = MapService
Replaces the MapService defined in the site's ArcIMSparam.js file.

· OVMap = OVMapService
Replaces the Overview MapService defined in the site's ArcIMSparam.js file.

· Box = MinX:MinY:MaxX:MaxY
The initial extent.

· Layers = 0101101
Visible layers, starting from topmost where 0 is not visible and 1 is visible.

· ActiveLayer = layerIndex
Index of layer to be active, if not default.

Note:
This is not the same as the layer ID in the map service. The index value corresponds with the order of layers as they appear in the viewer's Table of Contents, assuming all layers were listed. The top layer has index value zero.

· Query = queryExpression
Query expression to be sent on load. Expression must be escaped in URL.

· QueryZoom = Yes
Zoom to above query.

· MaxRext = minX:minY:maxX:maxY
Limit of extent viewer.

· Extent = Auto
Forces the viewer to obtain start and limit extents from the server. Overrides the extents set in the ArcIMSparam.js file.

SAMPLE URLs

This URL will override the initial extent variables set in ArcIMSParam.js:

Code:
http://gauchos/website/world?Box=-123:32:-111:41

This URL will set the active layer, query that layer for NAME = 'Los Angeles', and zoom to the selected feature:

Code:
http://gauchos/website/world?ActiveLayer=0&Query=NAME%3D%27Los%20Angeles%27&QueryZoom=Yes


Note:
When building a query expression, it may be necessary to replace reserved characters with escape sequences. In the example above, the following reserved characters are replaced with the following escape character sequences:

[space] ... %20
= ... %3D
" ... %22
' ... %27

Note:
ArcMap Server accepts queried string values enclosed in apostrophes only.


Other common reserved character / escape sequences are:

> ... %3E
< ... %3C
% ... %25
} ... %7D
{ ... %7B
\ ... %5C
/ ... %2F
~ ... %7E
] ... %5D
[ ... %5B
; ... %3B
? ... %3F
@ ... %40
& ... %26
# ... %23
| ... %7C
: ... %3A
$ ... %24
^ ... %5E

Article ID:000004498

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic