MOOSE - Mapbook Description

# Moose

## Mapping Interface

##### The Mapbook XML Format

###### The Mapbook is one of two important configuration files for Moose. The Mapbook contains the listing of available Maps (Layers), Views (Pre-defined "Zoom-to"s), and Services (external programs). The Mapbook XML Format has four Children Types:

- <group/>
  Description: Groups perform grouping. They allow you to create folders and sub-folders to sort services, maps, and views.
  Attributes:
  - title - Title of the Group
- Attributes Common to map, view, and service:
  - default - Default states whether the tool,map,view will be loaded by default. Defaults to False.
  - locked - Locked states whether, once added, the tool/layer/view can be removed from the interface. (No "close" button.) Defaults to False.
  - title - Title is the displayable name of the element. If multiple instances of the same element are put into the interface, it will automatically append an unique instance identifier to the end. (IE "Street Map" if added to the interface again will become "Street Map 2") No Default.
  - [Unimplemented] visibility - When visibility is set to "False" will make the element invisible in the "Add Layers/Tools" dialog. Defaults to True.
  - icon - When icon is set makes a URL reference to an image to use as the "custom" icon for that map/layer/view.
- <map/>
  Description: These are individual layers.
  Children:
  - file - The value of file specifys the mapbook MapServer should open.
  Attributes:
  - zindex - If zindex > 0 then the layer is placed "on top of all other layers" else if zindex < 0 then the layer is placed "on the bottom of all other layers" This is particularly useful for placing background images or Images that are meant to be pure "overlays."
  - opacity - A number 0-100 that will specify the amount of transparency applied to the layer by default.
- <view/>
  Description:View only has the common attributes, however, it's "default=true" behavior is slightly different. When the interface is loaded the first view with the default attribute set to true will be used to seed coordinates for the client.
  Values for View:
  The value inside of the view tag is the coordinate, which can be specified in two ways:
  1. A Bounding Box - a comma separated list of four numbers. "Minx,Miny,Maxx,Maxy"
  2. Center Point Scale. "Centerx,Centery,MapScale"
- <service/>
  Description:
  Children:
  - url - Specifies the URL to call when the service is executed.
    Specified as any url:
    1. Absolute. `<url>http://someserver/somescript.php3</url>`
    2. Relative. `<url>/myscript.pl</url>`
  - <input/> - These should be familiar looking as they are defined in a very similar way to HTML input tags. With a few special attributes required for rendering and "spatial" capabilities.
    Attributes for Input:
    1. name - Required. Just like in HTML/Forms, it specifies the CGI Parameter name for the input.
    2. value - Required. Again, just like HTML/Forms, specifies the default value for the input.
    3. title - Required. Specifies the label to be rendered next to the input box.
    4. shape -Required for Area/Shape type inputs.
    5. type - Describes what type of input exists.
       - user - This is a user editable field.
       - hidden - This is a preset-field that is not-rendered. Useful for providing defaults.
       - select - Works in a *VERY* similar way to the HTML/Forms <select/> element. Select uses HTML/Forms style "option" children to specify the options. And when rendered will render in the same manner as an HTML <select/> element.
       - area - The first Spatial-esque input type. Area-type inputs will send the ID's of the objects inside of a specified drawing "object" in a comma separated list.
       - shape - This is much more Spatial. A Shape-type object will send the coordinates (comma separated list) of the selected object.
       Additional notes on "area" and "shape" type inputs:
       They will be presented as Drop-down boxes (similar to a "Select") with a list of objects that match the type specified in the shape attribute.
  Attributes:
  There are actually three different types of services implemented in Moose, and they are specified via the "type" attribute. Which is the only additional attribue.
  1. type = '' or type='default' - These types of services are pretty normal. They take the list of inputs, parses them, and sends them to the url specified in the <url/> element.
  2. type = "internal" - These types take an additional attribute "command." The "command" attribute specifies JavaScript to execute.
  3. type = "search" - This is the type of service that stays "inside" of the Viewer window. These are not significantly more complicated. Moose will call the script via AJAX, and then render the results from the XML return into a table.

(C) 2006 City of Saint Paul, All Rights Reserved.
Updated: Nov 2, 2006
Note: This page is optimized for Mozilla Firefox 1.5+