martindholmes / BreezeMap

BreezeMap is a project to create a simple user interface for interactive map and facsimile editing based on TEI XML and OpenLayers 4+.
MIT License
11 stars 3 forks source link

LineStrings need optional directionality #29

Closed martindholmes closed 3 years ago

martindholmes commented 3 years ago

Some projects coming up involve paths or journeys that can be represented by LineStrings, but in order to be usefully displayed, will need to allow for directionality. The plan is as follows:

The TEI <location> element, which is currently only acted on if it has @type="GeoJSON", will have an optional @subtype="directional", which would be constrained by Schematron such that if the child <geo> element's geometry type is not "LineString", an error would be raised.

Where both these conditions pertain, the resulting GeoJSON for the feature will be assigned a boolean property "directional" set to true.

Where a feature has this property, a distinct style will be used to render it, incorporating arrows and/or animated rendering of the line.

The directionality will be assumed to be that which is inherent in the coordinate sequence.

martindholmes commented 3 years ago

The first two components of this have been implemented. Only the JavaScript and styling remain.

martindholmes commented 3 years ago

Working on this in branch issue-29-directionality.

martindholmes commented 3 years ago

This work has now landed in dev, working as intended.