You are here

geofield-dms.html.twig in Geofield 8

Default theme implementation for Geofield DMS.

Available variables:

  • components: Contains coordinate components. Each component contains:

    • orientation: The orientation.
    • degrees: The number of degrees.
    • minutes: The number of minutes.
    • seconds: The number of seconds.

File

templates/geofield-dms.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for Geofield DMS.
  5. *
  6. * Available variables:
  7. * - components: Contains coordinate components. Each component contains:
  8. * - orientation: The orientation.
  9. * - degrees: The number of degrees.
  10. * - minutes: The number of minutes.
  11. * - seconds: The number of seconds.
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. {% for item, component in components %}
  17. <span class="dms dms-{{ item }}">
  18. {{ component['degrees'] }}°
  19. {{ component['minutes'] }}'
  20. {% if component.seconds is not empty %}
  21. {{ component['seconds'] }}"
  22. {% endif %}
  23. {{ component['orientation'] }}
  24. </span>
  25. {% if item == 'lat' %}
  26. ,
  27. {% endif %}
  28. {% endfor %}