UNPKG

gpx-builder

Version:
30 lines (28 loc) 488 B
class Bounds { /** * @see http://www.topografix.com/gpx/1/1/#type_boundsType */ constructor(minlat, minlon, maxlat, maxlon) { this.minlat = minlat; this.minlon = minlon; this.maxlat = maxlat; this.maxlon = maxlon; } toObject() { const { minlat, minlon, maxlat, maxlon } = this; return { attributes: { maxlat, maxlon, minlat, minlon } }; } } export { Bounds as default };