proximiio-js-library 1.8.1 → 1.8.4
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.
|
@@ -238,7 +238,9 @@ var Map = /** @class */ (function () {
|
|
|
238
238
|
center = [place.location.lng, place.location.lat];
|
|
239
239
|
}
|
|
240
240
|
style.center = center;
|
|
241
|
-
this.defaultOptions.mapboxOptions
|
|
241
|
+
if (this.defaultOptions.mapboxOptions) {
|
|
242
|
+
this.defaultOptions.mapboxOptions.center = style.center;
|
|
243
|
+
}
|
|
242
244
|
if (this.defaultOptions.zoomLevel) {
|
|
243
245
|
style.zoom = this.defaultOptions.zoomLevel;
|
|
244
246
|
}
|
|
@@ -355,6 +357,9 @@ var Map = /** @class */ (function () {
|
|
|
355
357
|
this.map.on('click', 'proximiio-pois-icons', function (ev) {
|
|
356
358
|
_this.onShopClick(ev);
|
|
357
359
|
});
|
|
360
|
+
this.map.on('click', 'pois-icons', function (ev) {
|
|
361
|
+
_this.onShopClick(ev);
|
|
362
|
+
});
|
|
358
363
|
this.onMapReadyListener.next(true);
|
|
359
364
|
if (this.defaultOptions.handleUrlParams) {
|
|
360
365
|
this.initUrlParams();
|
|
@@ -1528,9 +1533,9 @@ var Map = /** @class */ (function () {
|
|
|
1528
1533
|
Map.prototype.getUpcomingFloorNumber = function (way) {
|
|
1529
1534
|
var _this = this;
|
|
1530
1535
|
if (this.routingSource.lines && this.routingSource.route) {
|
|
1531
|
-
var
|
|
1532
|
-
var currentRoute = this.routingSource.lines[
|
|
1533
|
-
var nextRouteIndex = way === 'up' ?
|
|
1536
|
+
var currentRouteIndex_1 = this.routingSource.lines.findIndex(function (route) { return +route.properties.level === _this.state.floor.level; });
|
|
1537
|
+
var currentRoute = this.routingSource.lines[currentRouteIndex_1];
|
|
1538
|
+
var nextRouteIndex = this.routingSource.lines.findIndex(function (route) { return +route.properties.level === (way === 'up' ? currentRouteIndex_1 + 1 : currentRouteIndex_1 - 1); });
|
|
1534
1539
|
var nextRoute = this.routingSource.lines[nextRouteIndex];
|
|
1535
1540
|
// return currentRouteIndex !== -1 && nextRoute ? +nextRoute.properties.level : way === 'up' ? this.state.floor.level + 1 : this.state.floor.level - 1;
|
|
1536
1541
|
return nextRoute &&
|
|
@@ -43,12 +43,13 @@ var Routing = /** @class */ (function () {
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
Routing.prototype.route = function (start, finish) {
|
|
46
|
-
var points = this.wayfinding.runAStar(start, finish)
|
|
47
|
-
return new feature_1.default(i);
|
|
48
|
-
});
|
|
46
|
+
var points = this.wayfinding.runAStar(start, finish);
|
|
49
47
|
if (!points) {
|
|
50
48
|
return null;
|
|
51
49
|
}
|
|
50
|
+
points = points.map(function (i) {
|
|
51
|
+
return new feature_1.default(i);
|
|
52
|
+
});
|
|
52
53
|
var pathPoints = {};
|
|
53
54
|
var pathPartIndex = 0;
|
|
54
55
|
points.forEach(function (p, index) {
|
|
@@ -79,13 +79,13 @@ var RoutingSource = /** @class */ (function (_super) {
|
|
|
79
79
|
if (start && finish) {
|
|
80
80
|
this.notify('loading-start');
|
|
81
81
|
route = this.routing.route(start, finish);
|
|
82
|
-
paths = route.paths;
|
|
82
|
+
paths = route === null || route === void 0 ? void 0 : route.paths;
|
|
83
83
|
// @ts-ignore
|
|
84
|
-
this.route = route.paths;
|
|
84
|
+
this.route = route === null || route === void 0 ? void 0 : route.paths;
|
|
85
85
|
// @ts-ignore
|
|
86
|
-
this.points = route.points;
|
|
87
|
-
this.levelPaths = route.levelPaths;
|
|
88
|
-
this.levelPoints = route.levelPoints;
|
|
86
|
+
this.points = route === null || route === void 0 ? void 0 : route.points;
|
|
87
|
+
this.levelPaths = route === null || route === void 0 ? void 0 : route.levelPaths;
|
|
88
|
+
this.levelPoints = route === null || route === void 0 ? void 0 : route.levelPoints;
|
|
89
89
|
if (paths) {
|
|
90
90
|
lines = [];
|
|
91
91
|
for (_i = 0, _a = Object.entries(paths); _i < _a.length; _i++) {
|