Show TOC

 Displaying Additional Cartographical InformationLocate this document in the navigation structure

Use

You can add additional cartographical information (for example, the display of backgrounds such as relief, rivers or cities, for example) to the Web item Map that you have already integrated into your Web application.

Procedure

Preparing Used Shapefiles and Images

  1. You may need to edit Shapefiles to make them fit properly as map backgrounds. This is described in the How To Paper "Create and Modify Arcview Maps" in the SAP Service Marketplace, under the alias "bw"  → Services & Implementation  → HOW TO…Guides  → Guide List …BW 2.x.
  2. Consider the following when wanting to display images as backgrounds:

    In addition to the Geo-TIFF image format, PNG, GIF, JPG, BMP and TIFF formats are supported. These formats need a world file (with a file ending that is dependent upon the file format: GIFÞGFW, TIFÞTFW,...). In each world file, image information is assigned to geo-coordinates (degrees of latitude and longitude). With the Geo-TIFF image format, this information is found directly in the image file. Create this file with a text editor.

    World File Notes

    0.0666666666666

    0.0000000000000

    0.0000000000000

    -0.0666666666666

    -140.00000000000000

    90.00000000000000

    1. line: Pixel size along X axis

    2. line: Rotation for the row

    3. line: Rotation for the column

    4. line: Pixel size along Y axis

    5. line: Longitude (x coordinate) of upper left-hand corner

    6. line: Latitude (y coordinate) of upper left-hand corner

    Note

    The pixel size can be calculated as follows:

    The resolution of the image in height and width can be found in the properties of the image file. Using the calculation:

    (X coordinate right - X coordinate left) / width

    (Y coordinate below - Y coordinate above) / height

Creating the AXL Files

The additional cartographical information is read from the AXL files and interpreted. In the following section, three sample files are described for different pieces of additional cartographical information.

First Sample File

Create the file usa_img.axl with a text editor (such as Notepad) or an XML editor. This sample file is used to create a relief background.

File: usa_img.axl Notes

<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1">       <CONFIG>        <ENVIRONMENT>               <LOCALE language="de" />         </ENVIRONMENT>      <MAP>            <WORKSPACES>                 <IMAGEWORKSPACE name="img_ws" directory="C:\Program                            Files\SAP\Internet Graphics Server\data\shapefiles" />            </WORKSPACES>           <LAYER type="image" name="namerika" visible="true" id="0">                <DATASET name="namerika.gif" type="image"                                                                        workspace="img_ws" />                     <IMAGEPROPERTIES transparency="1,0" />            </LAYER>      </MAP>    </CONFIG> </ARCXML>

Lines 1-4: The header is always the same

Line 5: By changing the language attribute, you can either enter numbers in German ("de" ',') or in English ("en" '.') format

Lines 9/10: The image workspace describes the directory on the IGS in which the images are stored.

Lines 12-17: Describes a layer of cartographical information. In this case, an image layer is being used (type="image"). Each layer is given its own unique ID.

Lines 13-14: The data is described in the dataset tag. Name contains the complete image file name; the corresponding directory is found using the workspace (see lines 9/10).

Lines 15-16: You can set a transparency and a transparency color in the image properties.

Rows 17-20: The XML tags need to be closed.

Second Sample File

This example looks at a file with two background Shapefiles (rivers represented with lines and lakes with polygons).

File: rivers.axl Notes

<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1">   <CONFIG>     <ENVIRONMENT>              <LOCALE language="en" />     </ENVIRONMENT>     <MAP>          <WORKSPACES>                <SHAPEWORKSPACE name="shp_ws-0"                         directory="C:\Program Files\SAP\Internet Graphics                                           Server\data\shapefiles" />        </WORKSPACES>        <LAYER type="featureclass" name="rivers" visible="true"  id="0" >         <DATASET name="usa_rivers" type="line" workspace="shp_ws-0" />         <GROUPRENDERER>           <SIMPLERENDERER>              <SIMPLELINESYMBOL width="2" color="6,9,148" type="solid"/>           </SIMPLERENDERER>           <SIMPLELABELRENDERER field="NAME">                       <TEXTSYMBOL fontcolor="6,9,148" font="Courier"/>            </SIMPLELABELRENDERER>         </GROUPRENDERER>       </LAYER>      <LAYER type="featureclass" name="lakes" visible="true"  id="1" >          <DATASET name="usa_lakes" type="polygon"                                                               workspace="shp_ws-0" />           <SIMPLERENDERER>                       <SIMPLEPOLYGONSYMBOL filltransparency="1"                                                  fillcolor="94,98,252" boundarywidth="2"                                 boundarytransparency="1" boundarycolor="6,9,148" />           </SIMPLERENDERER>       </LAYER>     </MAP>   </CONFIG> </ARCXML>

Line 1-7: See the corresponding notes for the first sample file.

Line 9-11: A background Shapefile is being used here. For this reason, the SHAPEWORKSPACE tag is required to specify the directory.

Line 13-23: The first level is described (rivers). A Shapefile layer is being used here.

Line 14: In the DATASET tag, the name of the Shapefile (without file ending) can be found in the Name attribute; the Shapefile type is Line. In this case, labels are also displayed alongside the rivers. A group renderer that is made up of several simple renderers is used here.

Line 15-22: GROUPRENDERER

Line 16-18: SIMPLERENDERER for lines

Line 17: The lines are described with SIMPLELINESYMBOL (width in pixels, color and line type).

Line 19-21: SIMPLELABELRENDERER allows you to label the cartographical background; the Field attribute contains the column from the respective .dbf file that is used for the label text.

Lines 24-32: The second layer is described (lakes); this is also a Shapefile level.

Line 25: The Shapefile type is Polygon. The name of the Shapefile appears as the name (without the file ending)

Line 28: Lakes are displayed as non-transparent (fill transparency) blue (fill color) polygons with a blue (boundary color), non-transparent (boundary transparency) boundary, 2 pixels (boundary width) in size.

Third Sample File

This is the most complex sample AXL definition. A total of four cartographical levels are defined. The layers are displayed partially scaling-dependently.

File: usa.axl Notes

<?xml version="1.0" encoding="UTF-8"?>

<ARCXML version="1.1">

<CONFIG>

<ENVIRONMENT>

<LOCALE country="US" language="en" variant="" />

</ENVIRONMENT>

<MAP>

<WORKSPACES>

<SHAPEWORKSPACE name="shp_ws-0"                          directory="C:\Program Files\SAP\Internet Graphics                                                                             Server\data\shapefiles" />

</WORKSPACES>

<LAYER type="featureclass" name="DalSegno" visible="true"  id="0" >

<DATASET name="DalSegno" type="point" workspace="shp_ws-0" />

<SCALEDEPENDENTRENDERER upper="1:20000000">

<SIMPLERENDERER>

<RASTERMARKERSYMBOL image="C:\Program Files\SAP\Internet Graphics Server\data\shapefiles\icon.gif"/>

</SIMPLERENDERER>

</SCALEDEPENDENTRENDERER>

</LAYER>

<LAYER type="featureclass" name="rivers" visible="true"  id="1" >

<DATASET name="usa_rivers" type="line" workspace="shp_ws-0" />

<SIMPLERENDERER>

<SIMPLELINESYMBOL width="2" color="6,9,148" type="solid"/>

</SIMPLERENDERER>

</LAYER>

<LAYER type="featureclass" name="cities" visible="true"  id="2" >

<DATASET name="USA_Cities" type="point" workspace="shp_ws-0" />

<GROUPRENDERER>

<VALUEMAPRENDERER lookupfield="CAPITAL">

<EXACT value="Y">                        <SIMPLEMARKERSYMBOL type="circle" color="0,0,0"                                                                            width="8" outline="0,0,0"/>

</EXACT>

<EXACT value="N">

<SIMPLEMARKERSYMBOL type="triangle" color="0,0,0"                                                                             width="6" outline="0,0,0"/>

</EXACT>

</VALUEMAPRENDERER>

<SCALEDEPENDENTRENDERER upper="1:20000000">

<SIMPLELABELRENDERER field="NAME">

<TEXTSYMBOL fontcolor="0,0,0" font="Courier"/>

 </SIMPLELABELRENDERER>

</SCALEDEPENDENTRENDERER>

</GROUPRENDERER>

</LAYER>

<LAYER type="featureclass" name="lakes" visible="true"  id="3" >

<DATASET name="usa_lakes" type="polygon" workspace="shp_ws-0" />

<SIMPLERENDERER>

<SIMPLEPOLYGONSYMBOL filltransparency="1"                   fillcolor="94,98,252" boundarywidth="2"                   boundarytransparency="1" boundarycolor="6,9,148" />

</SIMPLERENDERER>

</LAYER>

</MAP>

</CONFIG>

</ARCXML>

Lines 1-12: See corresponding line notes in the first two sample files.

Lines 13-21: The company location is displayed using a Shapefile with a single point (company location). This point is displayed as an image (RASTERMARKERSYMBOL). The image is accessed using the Image attribute (complete path on IGS and file name). The tag SCALEDEPENDENTRENDERER is used here so that the image only appears as of a map resolution of 1:20,000,000. The attribute Upper is used to determine the from boundary for the scaling.

Lines 41-46: Layer definition for rivers (Shapefile).

Lines 48-67: Layer definition for the cities (Shapefile). The capital is to be displayed as a larger circle, all other cities as triangles. The tag VALUEMAPRENDERER is used for this purpose. This tag enables you to render the map independently of values from the .dbf attribute file. The field is selected from the -dbf file via the lookupfield attribute. You can use the tag EXACT to select individual values and specify the corresponding RENDERER. In this case, entering CAPITAL Y renders a point of type Circle, and CAPITAL N renders a point of type Triangle. The tag SCALEDEPENDENTRENDERER is used to make sure that the label does not appear until a scaling of 1:20 000 000.

Lines 68-75: Level definition for the lakes

Line 76-78: Open XML tags are closed.

Publishing AXL Files on the IGS

Save the AXL files to the Shapefile directory on the IGS. You can find this under Internet Graphics Server\data\shapefiles.

Note

Note that you also need to save the referenced Shapefiles and images in the directory that you specified using the WORKSPACE entry.

Including AXL Files in the Web Application

  1. Start the Web Application Designer and create a Web template in which you want to drag the Map Web item. Alternatively, load a Web template to which you want to add additional cartographical information.
  2. Enter the name of the AXL file in the properties of the Map Web item for the attribute CART_AXL_NAME (AXL File (Cartography)). This attribute specifies which AXL file is displayed initially.
  3. Select the attribute CART_AXL_VISIBLE (Cartographical Information On/Off) in the properties of the Map Web item. This attribute specifies whether cartographical information is to be displayed.
  4. Set attribute GEO_FUNCTIONS_POS (Geo-Functions) in the properties of the MapWeb item for the scaling-dependent map information.
Result

You have enhanced the map in your Web application with additional cartographical information, such as cities, rivers or lakes.

Note
  • Transparency is always specified as a value between 0 and 1. 1 means no transparency and 0 means 100% transparency. If you want to set a color in a background image (level image or RASTERMARKERSYMBOL) to transparent, set the color to the RGB value 255,0,255.
  • Color values are given as RGB values in the form R,G,B (for example, 128,128,128).
  • The image formats supported by IGS are: Geo-TIFF, PNG, GIF, JPG, BMP, TIFF.