MapStore Training

Table Of Contents

Previous topic

Using the AddLayers plugin

Next topic

Using the GeoLocation Menu

This Page

Using the LayerTree plugin

Using the Layertree is pretty straightforward.
This plugin displays a tree view of the layers loaded into the map and provide some basic functionalities for layers such as:
  • Enabling and Disabling visibility
  • Grouping
  • Ordering

The plugin also provides placeholders for other plugins, in our setup they are:

  • AddLayers
  • RemoveLayer
  • RemoveOverlays
  • AddGroup
  • RemoveGroup
  • GroupProperties
  • LayerProperties
  • ZoomToLayerExtent
  • GeoNetworkSearch

Enabling and Disabling Layers

  1. Open the previously created map training-map

  2. Zoom in magnifier until you can see at least the Boulder streets

    As you can see the streets are over the polygonal landmarks

    ../../_images/layertree1.png

    You can see both the landmarks and the streets.

  3. Disable the Boulder streets checkbox clicking on it

    ../../_images/layertree2.png

    Streets are no longer visible.

Ordering Layers

  1. Zoom in magnifier again until you can see at the Boulder buildings

    ../../_images/layertree3.png

    The green Landmarks are over the grey Buildings.

  2. Change the order of the layers in order to show the buildings over the landmarks
    Click and drag the Boulder buildings layer name over the Boulder polygonal landmarks
    ../../_images/layertree4.png

    A little icon informs you where are you going to drop the layer.

  3. Releasing the layer changes the visibility order, so now you can see the Buildings other the Landmarks

    ../../_images/layertree5.png

    Buildings are now visible other the Landmarks.

Grouping Layers

  1. To create a new layer group:

    • Click on the newgroup Add a new group in the layer tree button

    • Write the group name (in our case is Boulder Group)

    • Click on the Add Add group button

      ../../_images/layertree6.png
      ../../_images/layertree7.png

      An empty group is now visible in the layer tree.

  2. Drag the layers Boulder polygonal landmarks and Boulder buildings over the new group to add them to it

    ../../_images/layertree8.png

    The layers are now grouped.

    When layers are grouped they can be enabled or disabled together

    The group can also be collapsed

Showing Layer Properties

Right-clicking on a layer shows up the contextual menu with available actions.

../../_images/layerprop1.png
The most relevant ones are Layer Properties and View Metadata
The Layer Properties are described below, for the View Metadata option please refer to the Metadata Explorer section
  1. The About tab shows the layer name, the title displayed in the layertree and the description

    ../../_images/layerprop2.png
  2. The Display tab allows you to modify some layer display options, such as opacity and transparency
    The format combobox let you choose the tiles image format the server should provide
    ../../_images/layerprop3.png
  3. The Cache tab specifies if the map should cache the layer tiles or not
    ../../_images/layerprop4.png
  4. The Styles tab allows you to change the layer style, choosing from a list of available styles
    It also shows a little summary of the selected style
    ../../_images/layerprop5.png