I-X Map Tool |
|
Based on I-X Technology
AIAI, University of Edinburgh |
|
|
 |
The I-X Map Tool is an optional State Viewer and can be installed by
setting the -state-viewer-class=StateViewMap (rather than the
default StateViewTable class). The Map Tool can be displayed using
the I-P2 Tools menu.
The I-X Map Tool is based on the Open Source BBN OpenMap system. An OpenMap
"properties" file must be present when the Map Tool is used. This
must be specified via a -map-properties=<props-file>
parameter. If this file is not present an error message is given and
the Process Panel and Map Tool will exit.
Other optional parameters are:
- -map-object-icons=<directory - URL syntax> - to
specify icons to be used for specific object names.
- -map-type-icons=<directory - URL syntax> - to
specify icons to be used for object types (if no object specific
icon is available).
- -map-default-icon=<image-file> - to specify the
default icon to use if no more specific object or type icon is
available. A built in default icon is used otherwise.
According to these pahts, the relation object/icon follows the algorithm below:
IF there is an icon in the directory specified in “map-object-icons” parameter with the same name of the object (without the extension .gif), this icon will be used.
ELSE IF the object has a type pattern (e.g. Buckingham.type=palace) AND there is an icon in the directory specified in “map-object-icons” parameter with the same name of the type value (in the example, palace), this icon will be used.
ELSE IF the “map-default-icon” parameter was specified, the related icon will be used.
ELSE the system will use its default icon.
<props-file> Composition
This file is used to configure the map tool and its layers. The parameters that can be used to configure the map are:
- map.Latitude=<numeric value between -90 and 90> - latitude of the map's center;
- map.Longitude=<numeric value between -180 and 180> - longitude of the map's center;
- map.Scale=<numeric value> - initial scale of the map (1:scale);
- map.Width=<positive integer value> - width of the map tool's window;
- map.Height=<positive integer value> - height of the map tool's window;
- map.Projection=<pre-defined string> - projection type of the map. The available options are: mercator(default), cadrg, gnomonic and orthographic;
- map.BackgroundColor=<hexa value AARRGGBB where AA-transparency, RR-red, GG-green, BB- blue> - background color of the map area when all the layers are off;
- map.layers=<list of strings> - prefix of the layers that will be loaded by the map tool;
- map.startUpLayers=<list of strings> - prefix of the layers that will be initially visible. If this parameter is not specified, all the layers will be initially visible.
Each kind of layer has a particular set of parameter/value in the format <layer prefix>.<parameter>=<value>. The default map property file of the map tool shows a example of layer configuration.
map.layers=world
map.Latitude=0.0
map.Longitude=0.0
map.Scale=128000000.0
world.class=com.bbn.openmap.layer.shape.ShapeLayer
world.prettyName=World Map
world.shapeFile=resources/map-default/map.shp
world.spatialIndex=resources/map-default/map.ssx
world.lineColor=ff000000
world.fillColor=ff009900
Details about configuration of others kinds of layser can be found in the OpenMap API in BBN OpenMap.
Principal Functions
- Menu File/Refresh - reloads all the current icons;
- Menu View/Projection - changes the projection;
- Mouse click on the map area - returns the lat/lon position in the bottom bar;
- Mouse click (left button) on an empty area - opens a window to create a new object on the mouse position;
- Mouse press (left button) on a object - lists the set of attribute/value of this object. If the mouse is released on a attribute/value, a window is opened so that the value can be edited ;
- Mouse click (centre button or Ctrl right button) on the map area - centralises the map in the new position.
Clauirton Siebra, CISA/AIAI, University of Edinburgh