@furkot/garmin-data 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/garmin.js +18 -19
- package/lib/index.js +10 -9
- package/package.json +1 -1
package/lib/garmin.js
CHANGED
|
@@ -81,7 +81,7 @@ module.exports = {
|
|
|
81
81
|
78: 'Convenience Store', // minimarket
|
|
82
82
|
79: 'Anchor', // anchor
|
|
83
83
|
80: 'Toll Booth', // tollbooth
|
|
84
|
-
81: '
|
|
84
|
+
81: 'Medical Facility', // hospital
|
|
85
85
|
82: 'Restroom', // toilets
|
|
86
86
|
83: 'Truck Stop', // truck
|
|
87
87
|
84: 'RV Park', // rvpark
|
|
@@ -92,9 +92,9 @@ module.exports = {
|
|
|
92
92
|
89: 'Crossing', // railroadcrossing
|
|
93
93
|
90: 'Restaurant', // coffee
|
|
94
94
|
91: 'ATV', // atv
|
|
95
|
-
92: 'Dog
|
|
95
|
+
92: 'Dog Sitting', // pets
|
|
96
96
|
93: 'Triangle, Red', // fire
|
|
97
|
-
94: '
|
|
97
|
+
94: 'Bait and Tackle', // pier
|
|
98
98
|
95: 'Ferry', // ferry
|
|
99
99
|
96: 'Live Theater', // theater
|
|
100
100
|
97: 'Railway', // train
|
|
@@ -112,24 +112,24 @@ module.exports = {
|
|
|
112
112
|
109: 'Dam', // dam
|
|
113
113
|
110: 'Skull and Crossbones', // danger
|
|
114
114
|
111: 'Exit', // enter
|
|
115
|
-
112: 'Geocache',
|
|
115
|
+
112: 'Geocache Found', // gift
|
|
116
116
|
113: 'Contact, Blonde', // hairdresser
|
|
117
117
|
114: 'Favorite', // heart
|
|
118
118
|
115: 'Oil Field', // industry
|
|
119
|
-
116: '
|
|
119
|
+
116: 'Contact, Smiley', // laundry
|
|
120
120
|
117: 'Beacon', // lighthouse
|
|
121
121
|
118: 'Controlled Area', // one-way
|
|
122
122
|
119: 'Fitness Center', // playground
|
|
123
123
|
120: 'Police Station', // police
|
|
124
124
|
121: 'Police Station', // prison
|
|
125
|
-
122: '
|
|
125
|
+
122: 'Restricted Area', // roadblock
|
|
126
126
|
123: 'Contact, Alien', // rocket
|
|
127
127
|
124: 'School', // school
|
|
128
|
-
125: '
|
|
128
|
+
125: 'Lodge', // shelter
|
|
129
129
|
126: 'Shipwreck', // suitcase
|
|
130
|
-
127: 'Dog
|
|
130
|
+
127: 'Dog Running', // veterinary
|
|
131
131
|
128: 'Sad Face', // remove
|
|
132
|
-
129: '
|
|
132
|
+
129: 'Levee', // wetland
|
|
133
133
|
130: 'Circle with X', // wheelchair
|
|
134
134
|
131: 'Golf Course', // golf
|
|
135
135
|
132: 'Post Office', // envelope
|
|
@@ -137,7 +137,7 @@ module.exports = {
|
|
|
137
137
|
134: 'Ultralight Area', // airfield
|
|
138
138
|
135: 'Bar', // alcohol_shop
|
|
139
139
|
136: 'Stadium', // american_football
|
|
140
|
-
137: '
|
|
140
|
+
137: 'Reef', // aquarium
|
|
141
141
|
138: 'Scenic Area', // attraction
|
|
142
142
|
139: 'Pizza', // bakery
|
|
143
143
|
140: 'Ball Park', // baseball
|
|
@@ -152,8 +152,8 @@ module.exports = {
|
|
|
152
152
|
149: 'Scales', // commercial
|
|
153
153
|
150: 'Stadium', // cricket
|
|
154
154
|
151: 'Crossing', // cross
|
|
155
|
-
152: '
|
|
156
|
-
153: '
|
|
155
|
+
152: 'Medical Facility', // dentist
|
|
156
|
+
153: 'Medical Facility', // doctor
|
|
157
157
|
154: 'City Hall', // embassy
|
|
158
158
|
155: 'Exit', // entrance
|
|
159
159
|
156: 'Fast Food', // fast_food
|
|
@@ -169,15 +169,15 @@ module.exports = {
|
|
|
169
169
|
166: 'Railway', // rail_light
|
|
170
170
|
167: 'Railway', // rail_metro
|
|
171
171
|
168: 'Stadium', // soccer
|
|
172
|
-
169: '
|
|
172
|
+
169: 'Dot, White', // square-stroke
|
|
173
173
|
170: 'Square, Blue', // square-fill
|
|
174
174
|
171: 'City (Capitol)', // star-stroke
|
|
175
175
|
172: 'Restaurant', // sushi
|
|
176
176
|
173: 'Stadium', // tennis
|
|
177
177
|
174: 'Triangle, Blue', // triangle
|
|
178
|
-
175: 'Triangle,
|
|
178
|
+
175: 'Triangle, Green', // triangle_stroked
|
|
179
179
|
176: 'Multi-Cache', // warehouse
|
|
180
|
-
177: '
|
|
180
|
+
177: 'Stump', // garden
|
|
181
181
|
178: 'Gas Station', // diesel
|
|
182
182
|
179: 'Gas Station', // ethanol-free
|
|
183
183
|
180: 'Swimming Area', // swimming
|
|
@@ -194,11 +194,9 @@ module.exports = {
|
|
|
194
194
|
'Exit': 155, // entrance
|
|
195
195
|
'Fast Food': 156, // fast_food
|
|
196
196
|
'Favorite': 86, // star
|
|
197
|
-
'Fishing Area': 137, // aquarium
|
|
198
197
|
'Gas Station': 25, // fillingstation
|
|
199
|
-
'
|
|
200
|
-
'
|
|
201
|
-
'Hospital': 81, // hospital
|
|
198
|
+
'Ground Transportation': 106, // bus
|
|
199
|
+
'Medical Facility': 81, // hospital
|
|
202
200
|
'Lodging': 0, // hotel
|
|
203
201
|
'Museum': 33, // museum
|
|
204
202
|
'Park': 50, // park
|
|
@@ -208,6 +206,7 @@ module.exports = {
|
|
|
208
206
|
'Restaurant': 24, // restaurant
|
|
209
207
|
'Scenic Area': 61, // lookout
|
|
210
208
|
'School': 124, // school
|
|
209
|
+
'Shopping Center': 99, // cart
|
|
211
210
|
'Stadium': 68, // stadium
|
|
212
211
|
'Summit': 59, // mountains
|
|
213
212
|
'Swimming Area': 54, // watersport
|
package/lib/index.js
CHANGED
|
@@ -68,21 +68,19 @@ function formatDuration(step) {
|
|
|
68
68
|
function getWptExt({ start, end, el, elIfText, each }) {
|
|
69
69
|
return function* (st) {
|
|
70
70
|
yield* start('gpxx:WaypointExtension');
|
|
71
|
-
if (st.tags
|
|
71
|
+
if (st.tags?.length) {
|
|
72
72
|
yield* start('gpxx:Categories');
|
|
73
73
|
yield* each(st.tags, function* (cat) {
|
|
74
74
|
yield* el('gpxx:Category', null, cat);
|
|
75
75
|
});
|
|
76
76
|
yield* end();
|
|
77
77
|
}
|
|
78
|
-
if (st.
|
|
78
|
+
if (st.stopStreetAddress || st.locality?.town || st.locality?.province || st.locality?.country_long) {
|
|
79
79
|
yield* start('gpxx:Address');
|
|
80
80
|
yield* elIfText('gpxx:StreetAddress', st.stopStreetAddress);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
yield* elIfText('gpxx:Country', st.locality.country_long);
|
|
85
|
-
}
|
|
81
|
+
yield* elIfText('gpxx:City', st.locality?.town);
|
|
82
|
+
yield* elIfText('gpxx:State', st.locality?.province);
|
|
83
|
+
yield* elIfText('gpxx:Country', st.locality?.country_long);
|
|
86
84
|
yield* end();
|
|
87
85
|
}
|
|
88
86
|
yield* elIfText('gpxx:PhoneNumber', st.phone);
|
|
@@ -218,13 +216,16 @@ function getTrkExt({ start, end, elIfText }) {
|
|
|
218
216
|
module.exports = {
|
|
219
217
|
getWptCmt: st => st.notes,
|
|
220
218
|
getWptSym: st => toGarmin[st.sym],
|
|
221
|
-
hasWptExt: st => st.
|
|
219
|
+
hasWptExt: st => st.stopStreetAddress ||
|
|
220
|
+
st.locality?.town || st.locality?.province || st.locality?.country_long ||
|
|
221
|
+
st.phone ||
|
|
222
|
+
st.tags?.length,
|
|
222
223
|
getWptExt,
|
|
223
224
|
hasRteExt: () => true,
|
|
224
225
|
getRteExt,
|
|
225
226
|
hasRtePtExt: () => true,
|
|
226
227
|
getRtePtExt,
|
|
227
|
-
hasTrkExt: tr => tr.color,
|
|
228
|
+
hasTrkExt: tr => colors[tr.color],
|
|
228
229
|
getTrkExt,
|
|
229
230
|
schema,
|
|
230
231
|
toGarmin,
|