You are here

ip-geoloc-openlayers.html.twig in IP Geolocation Views & Maps 8

ip-geoloc-openlayers.tpl.php

This template is used to output a map of marker locations taken from a view.

Variables available:

  • $map: the map object, contains id, name, height and width
  • $container_width, $container_height: dimensions of enclosing div
  • $view: the view object, if required (maybe to display title above map?)

File

templates/ip-geoloc-openlayers.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * ip-geoloc-openlayers.tpl.php
  5. *
  6. * This template is used to output a map of marker locations taken from a view.
  7. *
  8. * Variables available:
  9. * - $map: the map object, contains id, name, height and width
  10. * - $container_width, $container_height: dimensions of enclosing div
  11. * - $view: the view object, if required (maybe to display title above map?)
  12. */
  13. #}
  14. {#
  15. <div class="ip-geoloc-map openlayers-view">
  16. <div id="openlayers-container-<?php echo $map['id']; ?>"
  17. style="width:<?php echo $container_width; ?>; height:<?php echo $container_height; ?>"
  18. class="openlayers-container openlayers-container-map-<?php echo $map['id']; ?>">
  19. <div id="<?php echo $map['id']; ?>"
  20. style="width:<?php echo $map['width']; ?>; height:<?php echo $map['height']; ?>"
  21. class="openlayers-map openlayers-map-<?php echo $map['map_name']; ?>">
  22. </div>
  23. </div>
  24. </div>
  25. #}
  26. <div class="ip-geoloc-map openlayers-view">
  27. <div id="openlayers-container-{{ map.id }} "
  28. style="width:{{ container_width }} height:{{ container_height }}"
  29. class="openlayers-container openlayers-container-map-{{ map.id }}">
  30. <div id="{{ map.id }}"
  31. style="width:{{ map.width }} height:{{ map.height }}"
  32. class="openlayers-map openlayers-map-{{ map.map_name }}">
  33. </div>
  34. </div>
  35. </div>