Overview

Namespaces

  • Mapbender
    • Component
      • HTTP
    • CoreBundle
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
      • DependencyInjection
      • Element
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
    • KmlBundle
      • Element
    • ManagerBundle
      • Controller
      • Form
        • DataTransformer
        • Type
    • MonitoringBundle
      • Command
      • Component
      • Controller
      • DependencyInjection
      • Entity
      • EventListener
      • Form
    • PrintBundle
      • Component
      • Controller
    • WmcBundle
      • Component
        • Exception
      • Element
        • Type
      • Entity
      • Form
        • Type
    • WmsBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Element
        • Type
      • Entity
      • Event
      • Form
        • EventListener
        • Type
    • WmtsBundle
      • Component
        • Exception
      • Controller
      • Entity
      • Form
        • Type
  • None
  • PHP

Classes

  • AboutDialog
  • ActivityIndicator
  • Button
  • CoordinatesDisplay
  • Copyright
  • FeatureInfo
  • GpsPosition
  • Layertree
  • Legend
  • Map
  • Overview
  • PrintClient
  • Ruler
  • ScaleBar
  • ScaleSelector
  • SearchRouter
  • SrsSelector
  • ZoomBar
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
  1: <?php
  2: 
  3: namespace Mapbender\CoreBundle\Element;
  4: 
  5: use Mapbender\CoreBundle\Component\Element;
  6: 
  7: /**
  8:  * Mapbender Zoombar
  9:  *
 10:  * The Zoombar element provides a control to pan and zoom, similar to the
 11:  * OpenLayers PanZoomBar control. This element though is easier to use when
 12:  * custom styling is needed.
 13:  *
 14:  * @author Christian Wygoda
 15:  */
 16: class ZoomBar extends Element
 17: {
 18: 
 19:     /**
 20:      * @inheritdoc
 21:      */
 22:     public static function getClassTitle()
 23:     {
 24:         return "Navigation Toolbar";
 25:     }
 26: 
 27:     /**
 28:      * @inheritdoc
 29:      */
 30:     public static function getClassDescription()
 31:     {
 32:         return "The Navigation Toolbar element provides a floating control to pan and zoom,
 33: similar to the OpenLayers PanZoomBar control. This element though is easier to
 34: use when custom styling is needed.";
 35:     }
 36: 
 37:     /**
 38:      * @inheritdoc
 39:      */
 40:     public static function getClassTags()
 41:     {
 42:         return array('zoom', 'pan', 'control', 'navigation', 'panel');
 43:     }
 44: 
 45:     /**
 46:      * @inheritdoc
 47:      */
 48:     public function getAssets()
 49:     {
 50:         return array('js' => array('mapbender.element.zoombar.js'),'css' => array());
 51:     }
 52: 
 53:     /**
 54:      * @inheritdoc
 55:      */
 56:     public static function getDefaultConfiguration()
 57:     {
 58:         return array(
 59:             'tooltip' => null,
 60:             'target_map' => null,
 61:             'components' => array(
 62:                 "pan" => "pan",
 63:                 "history" => "history",
 64:                 "zoom_box" => "zoom box",
 65:                 "zoom_max" => "zoom to max extent",
 66:                 "zoom_slider" => "zoom slider"),
 67:             'anchor' => 'left-top',
 68:             'stepSize' => 50,
 69:             'stepByPixel' => false,
 70:             'draggable' => true);
 71:     }
 72: 
 73:     /**
 74:      * @inheritdoc
 75:      */
 76:     public function getWidgetName()
 77:     {
 78:         return 'mapbender.mbZoomBar';
 79:     }
 80: 
 81:     /**
 82:      * @inheritdoc
 83:      */
 84:     public function render()
 85:     {
 86:         return $this->container->get('templating')
 87:                         ->render('MapbenderCoreBundle:Element:zoombar.html.twig',
 88:                                  array(
 89:                             'id' => $this->getId(),
 90:                             "title" => $this->getTitle(),
 91:                             'configuration' => $this->getConfiguration()));
 92:     }
 93: 
 94:     /**
 95:      * @inheritdoc
 96:      */
 97:     public static function getType()
 98:     {
 99:         return 'Mapbender\CoreBundle\Element\Type\ZoomBarAdminType';
100:     }
101: 
102:     /**
103:      * @inheritdoc
104:      */
105:     public static function getFormTemplate()
106:     {
107:         return 'MapbenderManagerBundle:Element:zoombar.html.twig';
108:     }
109: }
110: 
111: 
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0