UNPKG

@furkot/osmand-data

Version:

Data used by Furkot modules dealing with OsmAnd GPX format.

29 lines (24 loc) 642 B
import { colors, toFurkot, toOsmand } from './data.js'; const schema = [['xmlns:osmand', 'https://osmand.net']]; function getWptExt({ el, elIfText }) { return function* (st) { yield* elIfText('osmand:icon', toOsmand[st.sym]); yield* el('osmand:displaycolor', null, colors[st.color] || 'Blue'); }; } function getTrkExt({ elIfText }) { return function* (tr) { yield* elIfText('osmand:displaycolor', colors[tr.color]); }; } export default { getWptType: st => st.tags?.[0], hasWptExt: st => toOsmand[st.sym], getWptExt, hasTrkExt: tr => colors[tr.color], getTrkExt, schema, toOsmand, toFurkot, colors };