gpx-builder
Advanced tools
Comparing version 3.8.0 to 4.0.0
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
## v4.0.0 (2022-01-23) | ||
### Changed | ||
- [19dbf65](https://github.com/fabulator/gpx-builder/commit/19dbf65f36dbd6fad2c1483e036570e3cdb5a804) Use Route class instead of Route type for base-builder. BREAKING | ||
## v3.8.0 (2021-10-28) | ||
@@ -5,0 +9,0 @@ ### Fixed |
@@ -1,4 +0,4 @@ | ||
import { Extensions, GPXBuildData, Route } from '../../types'; | ||
import { Extensions, GPXBuildData } from '../../types'; | ||
import * as models from './models'; | ||
import { Metadata, Point, Track } from './models'; | ||
import { Metadata, Point, Track, Route } from './models'; | ||
export default class BaseBuilder { | ||
@@ -5,0 +5,0 @@ protected data: GPXBuildData; |
@@ -55,3 +55,3 @@ 'use strict'; | ||
setRoutes(routes) { | ||
this.data.rte = routes; | ||
this.data.rte = routes.map(route => route.toObject()); | ||
return this; | ||
@@ -58,0 +58,0 @@ } |
@@ -7,4 +7,5 @@ import Bounds from './Bounds'; | ||
import Point from './Point'; | ||
import Route from './Route'; | ||
import Segment from './Segment'; | ||
import Track from './Track'; | ||
export { Bounds, Copyright, Track, Segment, Point, Metadata, Person, Link }; | ||
export { Bounds, Copyright, Track, Segment, Point, Metadata, Person, Link, Route }; |
@@ -11,2 +11,3 @@ 'use strict'; | ||
var Point = require('./Point.js'); | ||
var Route = require('./Route.js'); | ||
var Segment = require('./Segment.js'); | ||
@@ -23,3 +24,4 @@ var Track = require('./Track.js'); | ||
exports.Point = Point; | ||
exports.Route = Route; | ||
exports.Segment = Segment; | ||
exports.Track = Track; |
@@ -13,2 +13,3 @@ import BaseBuilder from '../BaseBuilder'; | ||
Link: typeof import("../BaseBuilder/models").Link; | ||
Route: typeof import("../BaseBuilder/models").Route; | ||
}; | ||
@@ -15,0 +16,0 @@ /** |
@@ -13,3 +13,4 @@ import GarminBuilder from '../GarminBuilder/GarminBuilder'; | ||
Link: typeof import("../BaseBuilder/models").Link; | ||
Route: typeof import("../BaseBuilder/models").Route; | ||
}; | ||
} |
@@ -49,3 +49,3 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
setRoutes(routes) { | ||
this.data.rte = routes; | ||
this.data.rte = routes.map(route => route.toObject()); | ||
return this; | ||
@@ -52,0 +52,0 @@ } |
@@ -7,3 +7,4 @@ export { default as Bounds } from './Bounds.js'; | ||
export { default as Point } from './Point.js'; | ||
export { default as Route } from './Route.js'; | ||
export { default as Segment } from './Segment.js'; | ||
export { default as Track } from './Track.js'; |
{ | ||
"name": "gpx-builder", | ||
"version": "3.8.0", | ||
"version": "4.0.0", | ||
"description": "Builder of GPX files", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -70,3 +70,3 @@ # GPX builder | ||
Library contain two Builders: | ||
Library contain three Builders: | ||
@@ -76,1 +76,5 @@ - BaseBuilder - To create GPX 1.1 valid files. [Check all the properties you can add to GPX](https://github.com/fabulator/gpx-builder/blob/master/src/builder/BaseBuilder/BaseBuilder.ts). | ||
- StravaBuilder - To extends GPX by data that uses Strava. | ||
Types | ||
What you find in [type file](https://github.com/fabulator/gpx-builder/blob/master/src/types.ts) are types that are used as object for builders. Eg. you can create object based on `WayPoint` and use it directly to creator. You can also use `Point` class in builder section that has more user friendly constructor. It will convert you data to `WayPoint` type. |
/* eslint-disable import/no-duplicates */ | ||
import { Extensions, GPXBuildData, Route } from '../../types'; | ||
import { Extensions, GPXBuildData } from '../../types'; | ||
import * as models from './models'; | ||
import { Metadata, Point, Segment, Track } from './models'; | ||
import { Metadata, Point, Segment, Track, Route } from './models'; | ||
@@ -47,3 +47,3 @@ export default class BaseBuilder { | ||
public setRoutes(routes: Route[]): this { | ||
this.data.rte = routes; | ||
this.data.rte = routes.map((route) => route.toObject()); | ||
return this; | ||
@@ -50,0 +50,0 @@ } |
@@ -7,5 +7,6 @@ import Bounds from './Bounds'; | ||
import Point from './Point'; | ||
import Route from './Route'; | ||
import Segment from './Segment'; | ||
import Track from './Track'; | ||
export { Bounds, Copyright, Track, Segment, Point, Metadata, Person, Link }; | ||
export { Bounds, Copyright, Track, Segment, Point, Metadata, Person, Link, Route }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140076
90
3104
79