How To Add Your Own Layers ========================== Adding a new layer in GeoMOOSE 2 is a two step procedure. The first step is to define how GeoMOOSE should communicate with the layer (whether it is MapServer or a WMS source) and the second step defines the layer in the catalog. Step 1: Adding a Layer ---------------------- All requests start with a ```` tag with a ``name`` and ``type`` attribute. The name is the name of the source that will be used with GeoMOOSE. This name does not need to relate to the source that is going to be read. The type attribute determines what type of service will be read. The children of the ```` are determined by the ``type`` attribute. Currently ``mapserver`` and ``wms`` types are the two that are supported. All ```` types have ```` children. ```` children have only one attribute ``name``. The ``name`` attribute for ```` children reflects the name of the layer in the MapServer Mapfile or the name of the layer served by the WMS Service. Some MapServer mapfiles will have all layers set to "default" in which case there should still be one ```` entry in the ```` with the name of "all." A Mapserver Layer ^^^^^^^^^^^^^^^^^ Mapserver Layers need to have the ```` tag filled out specifying the location of the mapfile. This path can be relative to the ``mapfile_root`` configuration setting or an absolute path on the file system. Here is an example of the parcels layer from the default demo:: ./demo/landrecords/parcels.map A WMS Layer ^^^^^^^^^^^ WMS Layers have a ```` child that defines the root URL of the WMS service. This is an example using the LMIC FSA Photography:: http://geoint.lmic.state.mn.us/cgi-bin/wms Step 2: Adding the Layer to the Catalog --------------------------------------- After defining how to talk to the layer we need to define how to display the layer in the interface. Layers are defined in the ```` section of the mapbook. To add the LMIC FSA photography the ```` entry would look like this:: The individual parts: * ``title=`` - Sets the title in the mapbook to be displayed * ``src=`` - This is the layer name, it is a combination of the ``map-source``'s name combined with the ``layer``'s name from the definitions above. * ``status=`` - This determines whether the layer is either on or off by when the map loads. Omitting ``status=`` will leave the layer off.