diff options
| author | Camil Staps | 2026-02-02 18:38:26 +0100 |
|---|---|---|
| committer | Camil Staps | 2026-02-02 18:38:26 +0100 |
| commit | 4029b88e2c79eaed519c829e373ac916f426f311 (patch) | |
| tree | 617fd189c60a5e80b61b417c1c77c154ae1bd149 /OsmAndBuilder/OsmAndBuilder.ts | |
Diffstat (limited to 'OsmAndBuilder/OsmAndBuilder.ts')
| -rw-r--r-- | OsmAndBuilder/OsmAndBuilder.ts | 24 |
1 files changed, 24 insertions, 0 deletions
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', + }, + }; + } +} |
