source: sipes/modules_contrib/openlayers/includes/openlayers.theme.inc @ c43ea01

stableversion-3.0
Last change on this file since c43ea01 was 177a560, checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago

se agrego el directorio de modulos contribuidos de drupal

  • Propiedad mode establecida a 100644
File size: 1.2 KB
Línea 
1<?php
2
3/**
4 * @file
5 * This file holds the theme functions for openlayers module
6 *
7 * @ingroup openlayers
8 */
9
10/**
11 * Theme function for openlayers_map
12 */
13function theme_openlayers_map($map = array(), $preset_name = '') {
14  // To ensure that any controls are on the map correctly, we need to
15  // wrap the map in a container, and take into account percentage dimensions
16  $container_width = $map['width'];
17  $container_height = $map['height'];
18  $map['width'] = (strpos($map['width'], '%') > 0) ? '100%' : $map['width'];
19  $map['height'] = (strpos($map['height'], '%') > 0) ? '100%' : $map['height'];
20
21  // Create output
22  $output = '
23    <div style="width: ' . $container_width . '; height: ' . $container_height . ';" id="openlayers-container-'. $map['id'] .'" class="openlayers-container openlayers-container-preset-' . $preset_name .'">
24      <div style="width: ' . $map['width'] . '; height: ' . $map['height'] . ';" id="'. $map['id'] .'" class="openlayers-map openlayers-preset-' . $preset_name .'"></div>
25    </div>
26  ';
27  return $output;
28}
29
30/**
31 * Theme function to be able to override styles
32 */
33function theme_openlayers_styles($styles = array(), $map = array()) {
34  // Default is to just send the processed styles back
35  return $styles;
36}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.