Using GET_IMAGE and IMAGE with ArcMap Image Services |
Layers data frame Layer Name | Shapefile Name | Layer ID |
Cities | CITIES | 0 |
Provinces | PROVINCE | 1 |
States | STATES | 2 |
Countries | CNTRY94 | 3 |
Ocean | WORLD30 | 4 |
States data frame Layer Name | Shapefile Name | Layer ID |
Cities | CITIES | 0 |
Roads | ROADS | 1 |
States | STATES | 2 |
Simple GET_IMAGE request: |
<?xml version="1.0" encoding="UTF-8" ?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
IMAGE response: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <IMAGE> <ENVELOPE minx="-180" miny="-144" maxx="180" maxy="144" /> <OUTPUT url="http://mycomputer.domain.com/output/world_MYCOMPUTER2102209.png" file="c:\arcims\output\world_MYCOMPUTER2102209.png" /> </IMAGE> </RESPONSE> </ARCXML> |
GET_IMAGE request with dataframe="States": |
<?xml version="1.0" encoding="UTF-8" ?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE dataframe="States"> <PROPERTIES> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
GET_IMAGE request with autoresize="true": |
<?xml version="1.0" encoding="UTF-8" ?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE autoresize="true"> <PROPERTIES> <IMAGESIZE width="2000" height="1600" /> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
IMAGE response with resized image information: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <IMAGE> <ENVELOPE minx="-220.916666666667" miny="-176.706042824789" maxx="220.916666666667" maxy="176.706042824789" /> <OUTPUT url="http://mycomputer.domain.com/output/world_MYCOMPUTER3633699.jpg width="1619" height="1295" file="c:\arcims\output\world_MYCOMPUTER3633699.jpg" /> </IMAGE> </RESPONSE> </ARCXML> |
IMAGE response when requested map is too large: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <ERROR machine="MYMACHINE" processid="1324" threadid="1904">Requested image is too big and can not be created</ERROR> </RESPONSE> </ARCXML> |
GET_IMAGE request with a change in ENVELOPE: |
<?xml version="1.0" encoding="UTF-8" ?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-13" miny="37" maxx="40" maxy="65" /> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
GET_IMAGE request using IMAGESIZE: |
<?xml version="1.0" encoding="UTF-8" ?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-73.985" miny="40.756" maxx="-73.972" maxy="40.765" /> <IMAGESIZE width="250" height="175"/> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
250x175 pixels: |
<PROPERTIES> <ENVELOPE minx="-73.985" miny="40.756" maxx="-73.972" maxy="40.765" /> <IMAGESIZE width="250" height="175" /> </PROPERTIES> |
350x250 pixels: |
<PROPERTIES> <ENVELOPE minx="-73.985" miny="40.756" maxx="-73.972" maxy="40.765" /> <IMAGESIZE width="350" height="250" /> </PROPERTIES> |
250x175 pixels: |
<PROPERTIES> <ENVELOPE minx="-73.985" miny="40.756" maxx="-73.972" maxy="40.765" /> <IMAGESIZE width="250" height="175" /> </PROPERTIES> |
350x245 pixels: |
<PROPERTIES> <ENVELOPE minx="-73.985" miny="40.756" maxx="-73.972" maxy="40.765" /> <IMAGESIZE width="350" height="245" dpi="134" /> </PROPERTIES> |
Browser | Supported Transparent Image Formats |
---|---|
ArcIMS HTML Viewer in Internet Explorer | PNG8 |
ArcIMS HTML Viewer in Netscape 4.x | None |
ArcIMS HTML Viewer in Netscape 6.x | PNG8 |
ArcExplorer 4 | PNG24, PNG8 |
ArcIMS Java Viewers in Internet Explorer and Netscape | PNG24, PNG8 |
GET_IMAGE request using BACKGROUND: |
<?xml version="1.0" encoding="UTF-8" ?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <IMAGESIZE width="500" height="400" /> <BACKGROUND color="0,153,255" transcolor="0,153,255" /> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
ID | Layer Name |
0 | Cities |
1 | Provinces |
2 | States |
3 | Countries |
4 | Ocean |
GET_IMAGE using LAYERDEF to set layer visibility: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <IMAGESIZE width="500" height="400" /> <LAYERLIST> <LAYERDEF id="4" visible="true" /> <!--Ocean--> <LAYERDEF id="3" visible="true" /> <!--Countries--> <LAYERDEF id="2" visible="false" /> <!--States--> <LAYERDEF id="1" visible="false" /> <!--Provinces--> <LAYERDEF id="0" visible="true" /> <!--Cities--> </LAYERLIST> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
GET_IMAGE using order with LAYERLIST: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <IMAGESIZE width="500" height="400" /> <LAYERLIST order="true"> <LAYERDEF id="4" visible="true" /> <!--Ocean--> <LAYERDEF id="3" visible="true" /> <!--Countries--> <LAYERDEF id="0" visible="true" /> <!--Cities--> </LAYERLIST> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
GET_IMAGE using an attribute query in LAYER: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <IMAGESIZE width="500" height="400" /> <LAYERLIST> <LAYERDEF id="4" visible="true" /> <LAYERDEF id="3" visible="true" /> <LAYERDEF id="2" visible="false" /> <LAYERDEF id="1" visible="false" /> <LAYERDEF id="0" visible="true" /> </LAYERLIST> </PROPERTIES> <LAYER type="featureclass" name="Cities" visible="true" id="10"> <DATASET fromlayer="0" /> <SPATIALQUERY where="POPULATION > 2000000" /> </LAYER> </GET_IMAGE> </REQUEST> </ARCXML> |
GET_IMAGE using an attribute query and spatial filter in LAYER: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <IMAGESIZE width="500" height="400" /> <LAYERLIST> <LAYERDEF id="4" visible="true" /> <LAYERDEF id="3" visible="true" /> <LAYERDEF id="2" visible="false" /> <LAYERDEF id="1" visible="false" /> <LAYERDEF id="0" visible="true" /> </LAYERLIST> </PROPERTIES> <LAYER type="featureclass" name="Cities" visible="true" id="10"> <DATASET fromlayer="0" /> <SPATIALQUERY where="POPULATION > 2000000" > <SPATIALFILTER relation="area_intersection"> <ENVELOPE minx="-14" miny="35" maxx="33" maxy="64" /> </SPATIALFILTER> </SPATIALQUERY> </LAYER> </GET_IMAGE> </REQUEST> </ARCXML> |
Using LAYERDEF to select Brazil: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <LAYERLIST> <LAYERDEF id="4" visible="true" /> <!--Ocean--> <LAYERDEF id="3" visible="true" > <!--Countries--> <SPATIALQUERY where="NAME='Brazil'" /> </LAYERDEF> <LAYERDEF id="2" visible="false" /> <!--States--> <LAYERDEF id="1" visible="false" /> <!--Provinces--> <LAYERDEF id="0" visible="false" /> <!--Cities--> </LAYERLIST> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
Using a spatial filter in LAYERDEF: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <LAYERLIST> <LAYERDEF id="4" visible="true" /> <!--Ocean--> <LAYERDEF id="3" visible="true" > <!--Countries--> <SPATIALQUERY> <SPATIALFILTER relation="area_intersection"> <ENVELOPE minx="-63.6" miny="-26.9" maxx="-50.1" maxy="-8.6" /> </SPATIALFILTER> </SPATIALQUERY> </LAYERDEF> <LAYERDEF id="2" visible="false" /> <!--States--> <LAYERDEF id="1" visible="false" /> <!--Provinces--> <LAYERDEF id="0" visible="false" /> <!--Cities--> </LAYERLIST> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
Using a dynamic LAYER to add an acetate layer: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <IMAGESIZE width="500" height="400" /> <LAYERLIST> <LAYERDEF id="4" visible="true" /> <LAYERDEF id="3" visible="true" /> <LAYERDEF id="2" visible="false" /> <LAYERDEF id="1" visible="false" /> <LAYERDEF id="0" visible="false" /> </LAYERLIST> </PROPERTIES> <LAYER type="acetate" name="acetate" id="acetate"> <OBJECT units="database"> <TEXT coords="50 -45" label="Indian Ocean"> <TEXTMARKERSYMBOL fontstyle="bolditalic" fontsize="12" /> </TEXT> </OBJECT> <OBJECT units="pixel"> <NORTHARROW type="1" size="50" coords="70 150" /> </OBJECT> </LAYER> </GET_IMAGE> </REQUEST> </ARCXML> |
Including acetate layers in the layer list when LAYERLIST order is set to "true": |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <IMAGESIZE width="500" height="400" /> <LAYERLIST order="true" > <LAYERDEF id="4" /> <LAYERDEF id="3" /> <LAYERDEF id="text" /> <LAYERDEF id="northarrow" /> </LAYERLIST> </PROPERTIES> <LAYER type="acetate" name="text" id="text"> <OBJECT units="database"> <TEXT coords="50 -45" label="Indian Ocean"> <TEXTMARKERSYMBOL fontstyle="bolditalic" fontsize="12" /> </TEXT> </OBJECT> </LAYER> <LAYER type="acetate" name="northarrow" id="northarrow"> <OBJECT units="pixel"> <NORTHARROW type="1" size="50" coords="70 150" /> </OBJECT> </LAYER> </GET_IMAGE> </REQUEST> </ARCXML> |
Using FILTERCOORDSYS and FEATURECOORDSYS: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <FILTERCOORDSYS id="4326" /> <FEATURECOORDSYS id="54030" /> <LAYERLIST> <LAYERDEF id="4" visible="true" /> <LAYERDEF id="3" visible="true" /> <LAYERDEF id="2" visible="false" /> <LAYERDEF id="1" visible="false" /> <LAYERDEF id="0" visible="false" /> </LAYERLIST> </PROPERTIES> <LAYER type="acetate" name="acetate" id="acetate"> <OBJECT units="database"> <TEXT coords="50 -45" label="Indian Ocean"> <TEXTMARKERSYMBOL fontstyle="bolditalic" fontsize="12" /> </TEXT> </OBJECT> </LAYER> </GET_IMAGE> </REQUEST> </ARCXML> |
IMAGE response with new ENVELOPE coordinates: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <IMAGE> <ENVELOPE minx="-16986708.7102836" miny="-12740031.5327127" maxx="16986708.7102836" maxy="12740031.5327127" /> <OUTPUT url="http://mycomputer.domain.com/output/world_MYCOMPUTER29852440.png" file="C:\ArcIMS\output\world_MYCOMPUTER29852440.png" /> </IMAGE> </RESPONSE> </ARCXML> |
Including COORDSYS in the acetate layer: |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <FILTERCOORDSYS id="4326" /> <FEATURECOORDSYS id="54030" /> <LAYERLIST> <LAYERDEF id="4" visible="true" /> <LAYERDEF id="3" visible="true" /> <LAYERDEF id="2" visible="false" /> <LAYERDEF id="1" visible="false" /> <LAYERDEF id="0" visible="false" /> </LAYERLIST> </PROPERTIES> <LAYER type="acetate" name="acetate" id="acetate"> <OBJECT units="database"> <COORDSYS id="4326"/> <TEXT coords="50 -45" label="Indian Ocean"> <TEXTMARKERSYMBOL fontstyle="bolditalic" fontsize="12" /> </TEXT> </OBJECT> </LAYER> </GET_IMAGE> </REQUEST> </ARCXML> |
GET_IMAGE request with LEGEND: |
<?xml version="1.0" encoding="UTF-8" ?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <LEGEND autoextend="true" /> <DRAW map="false" /> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
IMAGE response with LEGEND: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <IMAGE> <LEGEND url="http://mycomputer.domain.com/output/world_MYCOMPUTER1248849.png" file="c:\arcims\output\world_MYCOMPUTER1248849.png" /> </IMAGE> </RESPONSE> </ARCXML> |
The returned legend image includes all layers that are currently visible in the map on a white background. |
When using backgroundcolor. The background color can be changed using RGB values. <LEGEND autoextend="true" backgroundcolor="255,255,0" /> |
|
When using title, font, and titlefontsize. A title can be added to the legend. The font and font size can also be included. The font attribute affects only text in the title and is not used with the layers. <LEGEND autoextend="true" title="A Sample Legend" font="Times New Roman" titlefontsize="16" /> |
|
Layers do not include a value map: Layer includes a value map: |
When using valuefontsize. For layers that include a value map, valuefontsize controls the font size of the labels that make up the value map. For layers with no value map, it controls the font size for the layer name. The font style and color cannot be changed. <LEGEND autoextend="true" title="A Sample Legend" font="Times New Roman" titlefontsize="16" valuefontsize="16" /> |
When using layerfontsize. Sets the font size of the subheading for layers that include a value map. The font style and color cannot be changed. In this example, the subheading is "AREA". <LEGEND autoextend="true" title="A Sample Legend" font="Times New Roman" titlefontsize="16" valuefontsize="16" layerfontsize="20" /> |
|
When using swatchheight and swatchwidth. The size of the swatch representing each layer can be increased or decreased using swatchheight and swatchwidth. Measurements are in pixels. <LEGEND autoextend="true" swatchheight="25" swatchwidth="25" /> |
Attribute | Paired Attribute | Filename assignment | Example: http://mycomputer/arcims/... |
---|---|---|---|
path | baseurl | ArcIMS assigns random filename. | world_MYCOMPUTER1248849.png |
name | url | User assigns a filename. | myfilename.png |
legendpath | legendbaseurl | ArcIMS assigns random filename. | world_MYCOMPUTER1248851.png |
legendname | legendurl | User assigns a filename. | myfilename.png |
OUTPUT when ArcIMS Spatial Server defines filename: |
<?xml version="1.0" encoding="UTF-8" ?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <OUTPUT path="c:\arcims" baseurl="http://mycomputer.domain.com/arcims" legendpath="c:\arcims\legend" legendbaseurl="http://mycomputer.domain.com/arcims/legend" /> <LEGEND /> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
IMAGE response: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <IMAGE> <ENVELOPE minx="-180" miny="-144" maxx="180" maxy="144" /> <OUTPUT url="http://mycomputer.domain.com/world_MYCOMPUTER2983738.png" file="c:\arcims\world_MYCOMPUTER2983738.png" /> <LEGEND url="http://mycomputer.domain.com/output/world_MYCOMPUTER2983739.png" file="c:\arcims\legend\world_MYCOMPUTER2983739.png" /> </IMAGE> </RESPONSE> </ARCXML> |
OUTPUT when user defines filename: |
<?xml version="1.0" encoding="UTF-8" ?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> <OUTPUT name="c:\arcims\mapimage.png" url="http://mycomputer.domain.com/arcims/mapimage.png" legendname="c:\arcims\legend\legendimage.png" legendurl="http://mycomputer.domain.com/arcims/legend/legendimage.png" /> <LEGEND /> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
IMAGE response: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <IMAGE> <ENVELOPE minx="-180" miny="-144" maxx="180" maxy="144" /> <OUTPUT url="http://mycomputer.domain.com/mapimage.png" file="c:\arcims\mapimage.png" /> <LEGEND url="http://mycomputer.domain.com/legend/legendimage.png" file="c:\arcims\legend\legendimage.png" /> </IMAGE> </RESPONSE> </ARCXML> |
GET_IMAGE request when OUTPUT is restricted: |
<?xml version="1.0" encoding="UTF-8" ?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <OUTPUT name="c:\arcims\mapimage.png" url="http://mycomputer.domain.com/arcims/mapimage.png" /> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
IMAGE response: |
<?xml version="1.0" encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <IMAGE> <ENVELOPE minx="-180" miny="-144" maxx="180" maxy="144" /> <OUTPUT url="http://mycomputer.domain.com/output/world_MYCOMPUTER2102209.png" /> </IMAGE> </RESPONSE> </ARCXML> |