You are here

interface MapInterface in Openlayers 7.3

Interface MapInterface.

Hierarchy

  • interface \Drupal\openlayers\Types\ObjectInterface extends \Drupal\Component\Plugin\PluginInspectionInterface

Expanded class hierarchy of MapInterface

All classes that implement MapInterface

2 files declare their use of MapInterface
BlockLayerSwitcher.php in modules/openlayers_library/src/Plugin/Component/BlockLayerSwitcher/BlockLayerSwitcher.php
Component: Block Layer Switcher.
OpenlayersStyles.php in modules/openlayers_ui/src/Plugin/export_ui/OpenlayersStyles.php
Class openlayers_components_ui.

File

src/Types/MapInterface.php, line 12
Interface MapInterface.

Namespace

Drupal\openlayers\Types
View source
interface MapInterface extends ObjectInterface {

  /**
   * Returns the id of this map.
   *
   * @return string
   *   The id of this map.
   */
  public function getId();

  /**
   * Add a layer to the map.
   *
   * @param LayerInterface $layer
   *   The layer object to add.
   *
   * @return MapInterface
   *   The parent map.
   */
  public function addLayer(LayerInterface $layer);

  /**
   * Add a component to the map.
   *
   * @param ComponentInterface $component
   *   The component object to add.
   *
   * @return MapInterface
   *   The parent map.
   */
  public function addComponent(ComponentInterface $component);

  /**
   * Add a control to the map.
   *
   * @param ControlInterface $control
   *   The control object to add.
   *
   * @return MapInterface
   *   The parent map.
   */
  public function addControl(ControlInterface $control);

  /**
   * Add an interaction to the map.
   *
   * @param InteractionInterface $interaction
   *   The interaction object to add.
   *
   * @return MapInterface
   *   The parent map.
   */
  public function addInteraction(InteractionInterface $interaction);

  /**
   * Remove a layer from the map.
   *
   * @param string $layer_id
   *   The machine name (or id) of the layer to remove.
   *
   * @return MapInterface
   *   The map.
   */
  public function removeLayer($layer_id);

  /**
   * Remove a component from the map.
   *
   * @param string $component_id
   *   The machine name (or id) of the component to remove.
   *
   * @return MapInterface
   *   The map.
   */
  public function removeComponent($component_id);

  /**
   * Remove a control from the map.
   *
   * @param string $control_id
   *   The machine name (or id) of the control to remove.
   *
   * @return MapInterface
   *   The map.
   */
  public function removeControl($control_id);

  /**
   * Remove a interaction from the map.
   *
   * @param string $interaction_id
   *   The machine name (or id) of the interaction to remove.
   *
   * @return MapInterface
   *   The map.
   */
  public function removeInteraction($interaction_id);

  /**
   * Build render array of a map.
   *
   * @param array $build
   *   The build array before being completed.
   *
   * @return array
   *   The render array.
   */
  public function build(array $build = array());

  /**
   * Render a build array into HTML.
   *
   * @return array
   *   The map HTML.
   */
  public function render();

  /**
   * Return the size of the map.
   *
   * @return array $size
   *   Return an array with width and height.
   */
  public function getSize();

  /**
   * Set the size of the map.
   *
   * @param array $size
   *   An array with two elements, a width and a height.
   *
   * @return MapInterface
   *   The map.
   */
  public function setSize(array $size = array());

  /**
   * Set the target element to render this map into.
   *
   * @param string $target
   *   The html ID of the element to render the map into.
   *
   * @return MapInterface
   *   The map.
   */
  public function setTarget($target);

  /**
   * Get the target ID in which this map is rendered.
   *
   * @return string
   *   The ID of the Element that the map is rendered in.
   */
  public function getTarget();

}

Members

Namesort descending Modifiers Type Description Overrides
MapInterface::addComponent public function Add a component to the map. 1
MapInterface::addControl public function Add a control to the map. 1
MapInterface::addInteraction public function Add an interaction to the map. 1
MapInterface::addLayer public function Add a layer to the map. 1
MapInterface::build public function Build render array of a map. 1
MapInterface::getId public function Returns the id of this map. Overrides ObjectInterface::getId
MapInterface::getSize public function Return the size of the map. 1
MapInterface::getTarget public function Get the target ID in which this map is rendered. 1
MapInterface::removeComponent public function Remove a component from the map. 1
MapInterface::removeControl public function Remove a control from the map. 1
MapInterface::removeInteraction public function Remove a interaction from the map. 1
MapInterface::removeLayer public function Remove a layer from the map. 1
MapInterface::render public function Render a build array into HTML. 1
MapInterface::setSize public function Set the size of the map. 1
MapInterface::setTarget public function Set the target element to render this map into. 1
ObjectInterface::addObject public function Add an object into the collection of the parent object. 1
ObjectInterface::attached public function Returns a list of attachments for building the render array. 1
ObjectInterface::clearOption public function Remove an option. 1
ObjectInterface::dependencies public function Defines dependencies. 1
ObjectInterface::getClassDirectory public function Returns the path to the plugin directory. 1
ObjectInterface::getClassPath public function Returns the path to the class file. 1
ObjectInterface::getCollection public function Return the Collection object linked to the object. 1
ObjectInterface::getConfiguration public function Return the object configuration. 1
ObjectInterface::getDependencies public function Return all the dependencies objects of the parent object. 1
ObjectInterface::getDescription public function Return the description of the object. 1
ObjectInterface::getExport public function Return an object, CTools Exportable. 1
ObjectInterface::getFactoryService public function Return the Factory Service of the object. 1
ObjectInterface::getJS public function Return the JS to insert in the page when building the object. 1
ObjectInterface::getMachineName public function Return the unique machine name of the object. 1
ObjectInterface::getName public function Return the human name of the object. 1
ObjectInterface::getObjects public function Return an array of OL objects indexed by their type. 1
ObjectInterface::getOption public function Returns an option. 1
ObjectInterface::getOptions public function Return the options array. 1
ObjectInterface::getParents public function Returns an array with the maps this object is attached on. 1
ObjectInterface::getPluginDescription public function Return the description of the object's plugin. 1
ObjectInterface::getProvider public function Return the module that provides this plugin. 1
ObjectInterface::getType public function The type of this object. 1
ObjectInterface::getWeight public function Get the weight of an object. 1
ObjectInterface::i18nStringsRefresh public function Refresh string translations. 1
ObjectInterface::init public function Initializes the object. 1
ObjectInterface::initCollection public function Initializes the Collection, Import objects from options, Import the current object. 1
ObjectInterface::isAsynchronous public function Whether or not this object has to be processed asynchronously. 1
ObjectInterface::optionsForm public function Provides the options form to configure this object. 1
ObjectInterface::optionsFormSubmit public function Submit callback for the options form. 1
ObjectInterface::optionsFormValidate public function Validation callback for the options form. 1
ObjectInterface::optionsToObjects public function Return a flat array containing Openlayers Objects from the options array. 1
ObjectInterface::postBuild public function Invoked after an objects render array is built. 1
ObjectInterface::preBuild public function Invoked before an objects render array is built. 1
ObjectInterface::removeObject public function Remove an object from the collection. 1
ObjectInterface::resetCollection public function Reset the object's Collection. 1
ObjectInterface::setFactoryService public function Set the Factory Service of the object. 1
ObjectInterface::setId public function Set the object ID. 1
ObjectInterface::setOption public function Set an option. 1
ObjectInterface::setOptions public function Set the options array. 1
ObjectInterface::setWeight public function Set the weight of an object. 1