You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

VEF-based viewers enable the user styling of popup and sidebar metadata that gets displayed when clicking on features on the map for better readability and visualization. Templates that are based on the Markdown language allow flexible customization of metadata rendering. Predefined function calls enable the use of advanced visualizations such as displaying diagrams or a video player. Without the use of templates, the original metadata gets displayed in a simple table while using the technical names of each property.

Example of a Styled Sidebar

The folliowing screenshots are taken from a VEF-based viewer using the same clicked feature

Unstyled MetadataStyled Metadata
Unstyled Metadata


Styled Metadata

Format Specifications

The basis for the metadata templates is the lightweight markup language Markdown. Markdown has a lot of flexiblility for formatting text and is human readable in its unparsed form.
To display the metadata properties, they need to be enclosed in curly brackets. The metadata is inside an object and can be accessed using dot-notation or like entries from a dictionary.

The root for the displayed metadata is structured like a GeoJSON feature and contains a geometry, properties and layer-object.

A predefined list of function calls can be used to perform additional metadata transformations. Function calls also need to be enclosed in curly brackets and use rounded brackets to enclose parameters.

NotationExplanation
{properties.expediton}Accessed the property expedition from the clicked feature
{properties["general.name"]}Accesses the property event.name from the clicked feature. Dot notation cannot be used here, because the property name contains a dot.
{layer.name}Acccesses the name of the layer itself
{formatDate(properties.date_time_end)}Calls a custom function to format a date string using the property date_time_end as a parameter
{addFilterButton("device", properties.device)}Calls a custom function with two parameters to display a filter button in the table column that filters by device

Available Functions


Recommendations


Example Template

  • No labels