.. _mapbook: Mapbook Reference Guide ======================= The mapbook document is an XML file that is used as the configuration file for a GeoMOOSE application. It configures things such as map sources, layers, services and tools in the application. For an example of a mapbook, please refer to the GeoMOOSE demo and the mapbook.xml file in the conf folder. This reference guide explains the structure, elements, and attributes of the Mapbook XML tags, and how they effect the user interface. GeoMOOSE version 2.0 looks to extend the capabilities and ease of configuration from GeoMOOSE 1.x series and therefore a new version of the mapbook format was required to support all of those features. --------- All version 2.0 mapbooks should express themselves by using the 'version' tag. GeoMOOSE will check the version attribute at startup and if the minimum version requirement is not met, GeoMOOSE will alert the user with an error. This makes the version attribute required. The tag contains 6 child elements. Each of these child elements can have their own child elements and are described below. * : The tag is used to specify user interface startup settings. * : The tag is used to specify a single or collection of layers in GeoMOOSE. * : The tag is used to link a layer control to a service. As of GM2 the only layer control available are popups. * : The tag is used to define a service such as select, printing and identify. * : The tag is the layers listing found in the information panel. * : The tag is the tools that are displayed on the user interface toolbar. --------------- The configuration tag is used to specify user interface startup settings and other application settings. This is done within the ... section of the mapbook.xml. The configuration tag has children. elements have a simple format, a "name" attribute which specifies the interface setting to change and then CDATA that specifies the values. The following are valid parameters for the configuration children. All configuration parameters are documented in :ref:`configuration`. Here is an example from the GeoMOOSE Demo:: Our Stack: GeoMOOSE.org | MapServer | OpenLayers | Dojo ]]> EPSG:3857 -20037508.342789,-20037508.342789,20037508.342789,20037508.342789 -10384069.859924,5538318.529767,-10356632.423788,5563580.927174 false false false false false true Catalog m 156543.03390625 20 true true ------------ The map-source tag is used to specify a single or collection of layers in GeoMOOSE. These are all in the `` .... `` section and later referenced in the `` .... `` section. All map-sources have two required attributes: * ``name`` – The name that GeoMOOSE will use to reference this mapsource. * ``type`` – The type of layer. This attribute determines what other children are required (or available) and tells GeoMOOSE what type of mapping service with which to communicate. Valid types include: Mapserver, WMS, WFS, and others (described below). * ``map-source``'s also support an optional ``opacity`` attribute that is a number between 0 and 1 specifying how transparent the image will be displayed. For example ``opacity=".5"`` will display the image from the map-source as half-transparent. * ``buffer`` attribute. Boolean, defaults to true, also optional. When set to "false" the image does not "buffer" around the map, it is trimmed to the exact size of the map display. Useful for MapServer scalebars. * ``auto-refresh`` attribute. If set and non-zero, specifies the interval (in milliseconds) at which the layers in this ```` will automatically refresh. This allows layers where the underlying data is regularly changing to be kept current on the map. All map-source types support two children: * – The 'param' child will add or change parameters sent over the URL to a . This can be necessary to change mime-types for WMS services or pass various miscellaneous settings to a mapserver mapfile. All 'param' children have two required attributes: * *name* – This is the name that will be used in the URL. * *value* – This is the value the name will be set to in the URL. * (required) – At least one layer child is required for each map-source. Even if a mapserver-type layer is used where all the layers are set to 'default' in the mapfile, it is necessary to create a layer child representing all of the layers. All Layer children (elements) have one required attribute, name. * *name* – For a WMS map-source, this refers to a layer as specified in the GetCapabilities document. For a Mapserver map-source, this refers to the name of a layer in the Mapfile. If a Mapfile has all of the layers set to default or all of the layers should be on or off as a whole, then the 'name' should be set to 'all.' * *status* - Boolean. Toggles whether the ```` should be on by default. **WARNING!** It is possible for conflicts to arise from setting the status attributes of elements and mixing that improperly with the settings in the catalog. AGS ^^^^^^^^^^^^ ESRI provides access to ArcGIS data through a standard services. For more information about ESRI services go to http://www.esri.com. The basic *additional* parameters referenced to use an ArcGIS service are: * ** – Url for location of service. * ** – This is the name used internally, by GeoMOOSE to refer to the layer. * ** – name=FORMAT. Parameter to identify format of the service. Values for the format used in the example is "png". Example:: http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/export Google ^^^^^^^^^^^^ Google provides a variety of map services and API's that GeoMoose can consume. For more information about specifics and licensing please go to https://developers.google.com/maps/. The basic *additional* parameters referenced to use a Google service are: * ** – This is the name used internally, by GeoMOOSE to refer to the layer. "all" recommended for Google map-source types. * *google-type* – This is the type of Google layer that will be provided. This can include: satellite, physical, streets, and hybrid. Example:: Mapserver ^^^^^^^^^^^^ This type of layer is meant to communicate with the default mapserver as specified in config.js. The basic *additional* parameters reference to use a Mapserver layer are: * ** – The name of layers to be referenced by the map source. This name must referenced in the mapserver file. The layer name could also be "all" and all layers within the mapserver file will be used. * ** – Layers of type 'mapserver' require a value child specifying the location of the mapfile on disk. Mapfiles can be specified with relative paths in tags. Examples:: ./demo/wms/usgs.map ./demo/statedata/basemap.map Vector ^^^^^^^^^^^^ Available 2.6+. Vector layers provide the basis for additional GeoMOOSE functionality. Example:: WFS ^^^^^^^^^^^^ This type of layer is meant to communicate with Web Feature Service servers. The Web Feature Service is a geospatial data manipulate interface based on HTTP protocol provided by OGC. It belongs to Data Service according to OGC web service architecture and it is the development of OGC Web Map Service. Web Feature Service allows a client to retrieve geospatial data encoded in Geography Markup Language (GML) from multiple Web Feature Services. It also supports INSERT, UPDATE, DELETE, QUERY and DISCOVERY operations on geographic features using HTTP as the distributed computing platform. * * /geoserver/GeoMOOSE_Testing/ows geomoose census_cities wkb_geometry WMS ^^^^^^^^^^^^ This type of layer is meant to communicate with Web Mapping Service servers. This is the OGC standard for serving raster images over the web. Many sites deliver WMS services that can be consumed by a GeoMOOSE application. If the type is a WMS data source an optional attribute can also be specified to request the images as tiles. This attribute is tiled=true. * ** – The name of layers to be referenced by the map source. This name must referenced in the mapserver file. The layer name could also be "all" and all layers within the mapserver file will be used. * *name* – This is the name used internally, by GeoMOOSE to refer to the layer. Unlike GeoMOOSE 1.0, the title of the layer displayed in the Catalog is not a one-to-one relationship with the entry in the mapbook. This allows greater flexibility in divorcing the display-order of layers in the map and display order in the catalog. * *queryable* – This is an optional attribute the tells GeoMoose whether a WMS map-source type is queryable. This attribute is only need for WMS map-source types. Valid options are queryable='true/false'. * ** – Layers of type 'wms' require a child specifying the URL of the WMS. * ** – name=FORMAT. The format of the WMS be delivered. The value for this parameter is typically "image/png" or "image/gif". * ** – name=TRANSPARENT. Configure if transparency is used. Example:: http://www.datafinder.org:80/wmsconnector/com.esri.wms.Esrimap/MN_MetroGIS_DataFinder_WMS_Water_Resources http://maps.co.lincoln.or.us/fcgi-bin/mapserv.exe? XYZ ^^^^^^^^^^ Many TMS-like tiles are accessible in this format. Example:: http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png http://otile2.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png http://otile3.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png http://otile4.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png Yahoo ^^^^^^^^^^ Note: As of GeoMoose 2.6.2 the Yahoo MapSource type is no longer available. This is because GeoMoose 2.6.2 updated to OpenLayers 2.12 which has `dropped support `_ for the Yahoo layer types. Do not use the Yahoo layer types, they will no longer work. .. _mapbook_services: --------- There is a lot of service documentation. See also, :ref:`services_understanding`, :ref:`services_protocol`, and :ref:`Standard Services `. The service element is the key to GeoMOOSE's interoperability. All functions are a type of service (identify, select, Birdseye view, etc.). Services have attributes to define some of it's behaviour: * `name` - This is the internal name of the service. * `display` - Sets whether the the service will be displayed while "launching." It is useful to set this to false if there is no text-entry required for the service. * `title` - This title will be displayed automatically in the input tab. * `target` - If set then this attribute will display the results in a different window. * `display-submit` - If set to `false` will not display the "Go!" button. * `clear-highlight` - Boolean. Defaults to `false`. Controls whether the highlight layer should be cleared when closing the service's tab. Service have one `` child. The `` child specifys the URL for of the service for GeoMOOSE to call:: php/idnetify.php Services each have `` children. There are two types of steps: * `type=spatial` - This type of step allows the layer to. Spatial steps have additional inputs that are used to define additional information about the spatial data: * `name` - This attribute specifys the CGI/form variable name in which the representation of the shape will be stored. * `default` - Sets the default tool used for drawing the shape. Valid values: point, line, polygon. * `point` | `line` | `polygon` | `edit-polygon` - Turns on/off the various drawing tools. Valid values: true, false. The default behaviour for these are stored in Configuration. * `format` - This specifys the format of the shape: * `=WKT` - Use well-known text. * `=delim` - Use a text delimited format. * `jump-start` - When true then the service will attempt to start after the shape has been finished. * `reproject` - This can be used to specify a shape projection other than the default map projection. * `show-tools` - If set to false this attribute will not display the list of tools. It is useful when only one drawing tool is defined. * `type=input` - This step only allows for the standard inputs. Steps can have many `` children. `` s are very similar to the ones used in HTML forms. All `` s require a `name` attribute and a `type` attribute. The following documents the various `type` s of inputs: * `type=extent` - Sends the current extent to the service. * `type=hidden` - Hidden inputs are not displayed to the user but the value set in the `value` attribute is sent to the service. * `type=select` - Creates a drop down box. The `title` attribute sets the label for the drop down. These have the same `