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.
1 theme call to geofield-dms.html.twig
- LatLonFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ LatLonFormatter.php - Builds a renderable array for a field value.
File
templates/geofield-dms.html.twigView source
- {#
- /**
- * @file
- * 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.
- *
- * @ingroup themeable
- */
- #}
-
- {% for item, component in components %}
- <span class="dms dms-{{ item }}">
- {{ component['degrees'] }}°
- {{ component['minutes'] }}'
- {% if component.seconds is not empty %}
- {{ component['seconds'] }}"
- {% endif %}
- {{ component['orientation'] }}
- </span>
- {% if item == 'lat' %}
- ,
- {% endif %}
- {% endfor %}