Overview

Namespaces

  • Mapbender
    • Component
      • HTTP
    • CoreBundle
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
      • DependencyInjection
      • Element
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
    • DrupalIntegrationBundle
      • DependencyInjection
      • Security
        • Authentication
          • Provider
          • Token
        • Authorization
          • Voter
        • Factory
        • Firewall
        • User
      • Session
    • 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
        • EventListener
        • 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
  • ScaleDisplay
  • 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:  * Map's overview element
  9:  *
 10:  * @author Paul Schmidt
 11:  */
 12: class ScaleBar extends Element
 13: {
 14: 
 15:     /**
 16:      * @inheritdoc
 17:      */
 18:     static public function getClassTitle()
 19:     {
 20:         return "ScaleBar";
 21:     }
 22: 
 23:     /**
 24:      * @inheritdoc
 25:      */
 26:     static public function getClassDescription()
 27:     {
 28:         return "";
 29:     }
 30: 
 31:     /**
 32:      * @inheritdoc
 33:      */
 34:     static public function getClassTags()
 35:     {
 36:         return array('ScaleBar', "Map's scale bar");
 37:     }
 38: 
 39:     /**
 40:      * @inheritdoc
 41:      */
 42:     public static function getDefaultConfiguration()
 43:     {
 44:         return array(
 45:             'title' => 'Scale Bar',
 46:             'tooltip' => 'Scale Bar',
 47:             'target' => null,
 48:             'maxWidth' => 200,
 49:             'anchor' => 'right-bottom',
 50:             'units' => array("km"));
 51:     }
 52: 
 53:     /**
 54:      * @inheritdoc
 55:      */
 56:     public function getWidgetName()
 57:     {
 58:         return 'mapbender.mbScalebar';
 59:     }
 60: 
 61:     /**
 62:      * @inheritdoc
 63:      */
 64:     public static function getType()
 65:     {
 66:         return 'Mapbender\CoreBundle\Element\Type\ScaleBarAdminType';
 67:     }
 68: 
 69:     /**
 70:      * @inheritdoc
 71:      */
 72:     public static function getFormTemplate()
 73:     {
 74:         return 'MapbenderManagerBundle:Element:scalebar.html.twig';
 75:     }
 76: 
 77:     /**
 78:      * @inheritdoc
 79:      */
 80:     public function getAssets()
 81:     {
 82:         return array(
 83:             'js' => array('mapbender.element.scalebar.js'),
 84:             //TODO: Split up
 85:             'css' => array());
 86:     }
 87: 
 88:     /**
 89:      * @inheritdoc
 90:      */
 91:     public function render()
 92:     {
 93:         return $this->container->get('templating')
 94:                         ->render('MapbenderCoreBundle:Element:scalebar.html.twig',
 95:                                  array(
 96:                             'id' => $this->getId(),
 97:                             "title" => $this->getTitle(),
 98:                             'configuration' => $this->getConfiguration()));
 99:     }
100: 
101: }
102: 
103: 
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0