Srophé Application : Documentation


Maps can be added to any page displaying TEI data. Examples: browse, search pages and individual record pages.

Map functions are defined in modules/lib/map.xql and modules/app.xql.

Add to HTML

On a record page

<div data-template="app:display-map"/>

Other pages

The function will need to have some data passed to the map function, so it must be nested inside a browse/search/record function. The code below is used on the geo/index.html page to present a map of all records with coordinates.

 <div data-template="browse:get-all" data-template-element="tei:place/tei:placeName">
            <div data-template="app:display-map"/>

Call from XQuery

In an XQuery function you can pass data to a map using the following function:

maps:build-map($nodes as node()*, $total-count as xs:integer?)