You are here

openlayers-map-array-controls.html in Openlayers 6

File

help/openlayers-map-array-controls.html
View source
Controls available in map arrays.  Example:

<pre>
'controls' => array(
  'LayerSwitcher' => TRUE,
  'Navigation' => TRUE,
  'PanZoomBar' => TRUE,
  'MousePosition' => TRUE,
),
</pre>

<ul>
  <li><strong>Attribution</strong>
    <dl>
      <dt>Values:</dt>
        <dd>boolean</dd>
      <dt>Description:</dt>
        <dd>Allows layers to provide attribution to the map if it exists.</dd>
      <dt>Example:</dt>
        <dd>TRUE</dd>
    </dl>
  </li>
  
  <li><strong>KeyboardDefaults</strong>
    <dl>
      <dt>Values:</dt>
        <dd>boolean</dd>
      <dt>Description:</dt>
        <dd>Provides a the ability to use the keyboard to pan and zoom map.</dd>
      <dt>Example:</dt>
        <dd>TRUE</dd>
    </dl>
  </li>
  
  <li><strong>LayerSwitcher</strong>
    <dl>
      <dt>Values:</dt>
        <dd>boolean</dd>
      <dt>Description:</dt>
        <dd>Gives user ability to switch Layers in the map interface.</dd>
      <dt>Example:</dt>
        <dd>TRUE</dd>
    </dl>
  </li>
  
  <li><strong>MousePosition</strong>
    <dl>
      <dt>Values:</dt>
        <dd>boolean</dd>
      <dt>Description:</dt>
        <dd>Gives a visual indication of the mouse position to the user.</dd>
      <dt>Example:</dt>
        <dd>TRUE</dd>
    </dl>
  </li>
  
  <li><strong>Navigation</strong>
    <dl>
      <dt>Values:</dt>
        <dd>boolean</dd>
      <dt>Description:</dt>
        <dd>Gives the user the ability to navigate the map interface. This needs to be enabled in order for ZoomBox to function.</dd>
      <dt>Example:</dt>
        <dd>TRUE</dd>
    </dl>
  </li>
  
  <li><strong>PanZoomBar</strong>
    <dl>
      <dt>Values:</dt>
        <dd>boolean</dd>
      <dt>Description:</dt>
        <dd>Gives user ability to pan and zoom in the map interface.</dd>
      <dt>Example:</dt>
        <dd>TRUE</dd>
    </dl>
  </li>
  
  <li><strong>Permalink</strong>
    <dl>
      <dt>Values:</dt>
        <dd>boolean</dd>
      <dt>Description:</dt>
        <dd>Provides a URL that will link to a specific map position.</dd>
      <dt>Example:</dt>
        <dd>TRUE</dd>
    </dl>
  </li>
  
  <li><strong>ScaleLine</strong>
    <dl>
      <dt>Values:</dt>
        <dd>boolean</dd>
      <dt>Description:</dt>
        <dd>Provides the user with a line of scale in the map interface.</dd>
      <dt>Example:</dt>
        <dd>TRUE</dd>
    </dl>
  </li>
  
  <li><strong>ZoomBox</strong>
    <dl>
      <dt>Values:</dt>
        <dd>boolean</dd>
      <dt>Description:</dt>
        <dd>Allows user to draw a box on screen to zoom with Shift + Click. The Navigation control needs to be enabled for this to function.</dd>
      <dt>Example:</dt>
        <dd>TRUE</dd>
    </dl>
  </li>
  
  <li><strong>ZoomToMaxExtent</strong>
    <dl>
      <dt>Values:</dt>
        <dd>boolean</dd>
      <dt>Description:</dt>
        <dd>Provides button to zoom to the maximum extent of the map.</dd>
      <dt>Example:</dt>
        <dd>TRUE</dd>
    </dl>
  </li>
</ul>