# Viewer with Legends

The map client configuration

The ViewContext configuration

## Further notes

This example includes a legend whose components have been defined within the config.xml in the control tag:

    <lc:Legend showBaseLayers="true" div="legend">
      <plugins>
        <llp:LayerVisibility />
        <llp:LayerPositionUp />
        <llp:LayerPositionDown />
        <llp:LayerRemove />
        <llp:LayerZoomToVisibleScale />
        <llp:LayerName />
        <llp:LayerDescription />
      </plugins>
    </lc:Legend>

Legend symbols will be specified for each layer in the viewcontext.xml. Using the layer attribute 'hidden' one can determine whether a layer must be enabled or disabled at the beginning. The legend needs its own 'spaceholder' on the website. This is precisely the same way how the panel on the map was transferred to a <div> tag:

    <olc:Panel div="panel" >

Moreover, a drop down list was added as another control element, which allows you to change the size of the Viewer. It will also be loaded into a <div> tag that is part of the website:

    <lc:SetMapSize div="setMapSize">
      <mapSizes>
        <mapSize lb:name="50%">
          <ol:Size w="354" h="354"/>
        </mapSize>
        <mapSize lb:name="100%">
          <ol:Size w="500" h="500"/>
        </mapSize>
        <mapSize lb:name="150%">
          <ol:Size w="612" h="612"/>
        </mapSize>
      </mapSizes>
    </lc:SetMapSize>

powered by disy Informationssysteme GmbH