From 4029b88e2c79eaed519c829e373ac916f426f311 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 2 Feb 2026 18:38:26 +0100 Subject: Initial commit --- OsmAndBuilder/OsmAndBuilder.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 OsmAndBuilder/OsmAndBuilder.ts (limited to 'OsmAndBuilder/OsmAndBuilder.ts') diff --git a/OsmAndBuilder/OsmAndBuilder.ts b/OsmAndBuilder/OsmAndBuilder.ts new file mode 100644 index 0000000..9c0930a --- /dev/null +++ b/OsmAndBuilder/OsmAndBuilder.ts @@ -0,0 +1,24 @@ +import { BaseBuilder } from 'gpx-builder'; +import { OsmAndPoint } from './models/OsmAndPoint.ts'; + +export class OsmAndBuilder extends BaseBuilder { + public static MODELS = { + ...BaseBuilder.MODELS, + Point: OsmAndPoint, + }; + + /** + * OsmAnd builder includes extensions for waypoint customization: + * https://osmand.net/docs/technical/osmand-file-formats/osmand-gpx/#waypoints-customization + */ + public constructor() { + super(); + this.data = { + ...this.data, + attributes: { + ...this.data.attributes, + 'xmlns:osmand': 'https://osmand.net/docs/technical/osmand-file-formats/osmand-gpx', + }, + }; + } +} -- cgit v1.2.3