proximiio-js-library 1.13.21 → 1.13.23

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.
@@ -80,8 +80,8 @@ export default class GuidanceStepsGenerator {
80
80
  (direction === Direction.Start ||
81
81
  (direction === Direction.Finish && currentPoint.isPoi) ||
82
82
  direction === Direction.TurnAround ||
83
- direction === `${Direction.Down}_${LevelChangerTypes[currentPoint.properties.type]}` ||
84
- direction === `${Direction.Up}_${LevelChangerTypes[currentPoint.properties.type]}` ||
83
+ /*direction === `${Direction.Down}_${LevelChangerTypes[currentPoint.properties.type]}` ||
84
+ direction === `${Direction.Up}_${LevelChangerTypes[currentPoint.properties.type]}` ||*/
85
85
  direction === `${Direction.Exit}_${LevelChangerTypes[currentPoint.properties.type]}` ||
86
86
  distanceFromLastStep === 0)) {
87
87
  return;
@@ -148,11 +148,18 @@ export default class GuidanceStepsGenerator {
148
148
  : nextPoint.properties.title} ${translations[this.language].IS_ON_YOUR} ${this.getDirectionInstruction(direction).replace('turn ', '')}`;
149
149
  return instruction;
150
150
  }
151
- if (nextPoint.isLevelChanger) {
152
- instruction += `${this.getDirectionInstruction(nextPointDirection).slice(0, -1)} ${translations[this.language].TO_FLOOR} ${secondNextPoint.properties.level}`;
151
+ /*if (nextPoint.isLevelChanger) {
152
+ instruction += `${this.getDirectionInstruction(nextPointDirection).slice(0, -1)} ${
153
+ translations[this.language].TO_FLOOR
154
+ } ${secondNextPoint.properties.level}`;
155
+ return instruction;
156
+ }*/
157
+ instruction += this.getDirectionInstruction(direction);
158
+ if (currentPoint.isLevelChanger) {
159
+ instruction = instruction.slice(0, -1);
160
+ instruction += ` ${translations[this.language].TO_FLOOR} ${nextPoint.properties.level}`;
153
161
  return instruction;
154
162
  }
155
- instruction += this.getDirectionInstruction(direction);
156
163
  const nearestPoi = nearestPoint(currentPoint.geometry.coordinates, featureCollection);
157
164
  instruction = `${instruction.slice(0, -1)} ${translations[this.language].BY} ${nearestPoi.properties.title_i18n && nearestPoi.properties.title_i18n[this.language]
158
165
  ? nearestPoi.properties.title_i18n[this.language]
@@ -114,7 +114,7 @@ export default class Routing {
114
114
  const pathPoints = {};
115
115
  let pathPartIndex = 0;
116
116
  points.forEach((p, index) => {
117
- var _a, _b, _c, _d;
117
+ var _a, _b, _c;
118
118
  if (landmarkTBT) {
119
119
  if (typeof pathPoints[`path-part-${pathPartIndex}`] === 'undefined') {
120
120
  if (p.isLevelChanger && p.properties.level !== points[index + 1].properties.level) {
@@ -126,21 +126,19 @@ export default class Routing {
126
126
  else if ((_b = points[index + 1]) === null || _b === void 0 ? void 0 : _b.isPoi) {
127
127
  // do not add another path part if next poi is finish
128
128
  return;
129
- }
130
- else if ((_c = points[index + 1]) === null || _c === void 0 ? void 0 : _c.isLevelChanger) {
131
- // do not add another path part if next poi is levelChanger
132
- return;
133
- }
129
+ } /* else if (points[index + 1]?.isLevelChanger) {
130
+ // do not add another path part if next poi is levelChanger
131
+ return;
132
+ }*/
134
133
  if (points[index + 1]) {
135
134
  pathPoints[`path-part-${pathPartIndex}`] = [];
136
135
  if (points[index + 2] && points[index + 2].isPoi) {
137
136
  // if second next poi is path destination, add three points to path part as there won't be another path part added
138
137
  pathPoints[`path-part-${pathPartIndex}`].push(p, points[index + 1], points[index + 2]);
139
- }
140
- else if (points[index + 2] && points[index + 2].isLevelChanger) {
141
- // if second next poi is level changer, add three points to path part as there won't be another path part added
142
- pathPoints[`path-part-${pathPartIndex}`].push(p, points[index + 1], points[index + 2]);
143
- }
138
+ } /* else if (points[index + 2] && points[index + 2].isLevelChanger) {
139
+ // if second next poi is level changer, add three points to path part as there won't be another path part added
140
+ pathPoints[`path-part-${pathPartIndex}`].push(p, points[index + 1], points[index + 2]);
141
+ }*/
144
142
  else {
145
143
  pathPoints[`path-part-${pathPartIndex}`].push(p, points[index + 1]);
146
144
  }
@@ -166,7 +164,7 @@ export default class Routing {
166
164
  if (p.isLevelChanger && p.properties.level !== points[index + 1].properties.level) {
167
165
  pathPartIndex++;
168
166
  }
169
- else if (p.isPoi && p.id === ((_d = points[index + 1]) === null || _d === void 0 ? void 0 : _d.id)) {
167
+ else if (p.isPoi && p.id === ((_c = points[index + 1]) === null || _c === void 0 ? void 0 : _c.id)) {
170
168
  pathPartIndex++;
171
169
  }
172
170
  }