@aggdirect/coolmap-services 1.0.7 → 1.0.8
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/README.md +15 -1
- package/esm2020/aggdirect-coolmap-services.mjs +5 -0
- package/esm2020/lib/service/coolmap.service.mjs +439 -0
- package/esm2020/lib/service/data-model.mjs +35 -0
- package/esm2020/lib/service/utils.service.mjs +210 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +7 -7
- package/fesm2015/{coolmap-services.js → aggdirect-coolmap-services.mjs} +695 -688
- package/fesm2015/aggdirect-coolmap-services.mjs.map +1 -0
- package/fesm2020/aggdirect-coolmap-services.mjs +691 -0
- package/fesm2020/aggdirect-coolmap-services.mjs.map +1 -0
- package/{coolmap-services.d.ts → index.d.ts} +5 -4
- package/lib/service/coolmap.service.d.ts +45 -42
- package/lib/service/data-model.d.ts +73 -73
- package/lib/service/utils.service.d.ts +49 -46
- package/package.json +40 -15
- package/public-api.d.ts +3 -3
- package/bundles/coolmap-services.umd.js +0 -1125
- package/bundles/coolmap-services.umd.js.map +0 -1
- package/bundles/coolmap-services.umd.min.js +0 -2
- package/bundles/coolmap-services.umd.min.js.map +0 -1
- package/coolmap-services.metadata.json +0 -1
- package/esm2015/coolmap-services.js +0 -5
- package/esm2015/lib/service/coolmap.service.js +0 -449
- package/esm2015/lib/service/data-model.js +0 -35
- package/esm2015/lib/service/utils.service.js +0 -216
- package/fesm2015/coolmap-services.js.map +0 -1
|
@@ -1,1125 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('mapbox-gl'), require('@turf/turf'), require('rxjs'), require('@angular/common/http'), require('@angular/material/snack-bar'), require('@angular/platform-browser'), require('@deck.gl/mapbox'), require('@deck.gl/layers')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('coolmap-services', ['exports', '@angular/core', 'mapbox-gl', '@turf/turf', 'rxjs', '@angular/common/http', '@angular/material/snack-bar', '@angular/platform-browser', '@deck.gl/mapbox', '@deck.gl/layers'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['coolmap-services'] = {}, global.ng.core, global.mapboxgl, global.turf, global.rxjs, global.ng.common.http, global.ng.material.snackBar, global.ng.platformBrowser, global.mapbox, global.layers));
|
|
5
|
-
}(this, (function (exports, i0, mapboxgl, turf, rxjs, i1, i2, i2$1, mapbox, layers) { 'use strict';
|
|
6
|
-
|
|
7
|
-
/******************************************************************************
|
|
8
|
-
Copyright (c) Microsoft Corporation.
|
|
9
|
-
|
|
10
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
-
purpose with or without fee is hereby granted.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
-
***************************************************************************** */
|
|
21
|
-
/* global Reflect, Promise */
|
|
22
|
-
var extendStatics = function (d, b) {
|
|
23
|
-
extendStatics = Object.setPrototypeOf ||
|
|
24
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
25
|
-
function (d, b) { for (var p in b)
|
|
26
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
27
|
-
d[p] = b[p]; };
|
|
28
|
-
return extendStatics(d, b);
|
|
29
|
-
};
|
|
30
|
-
function __extends(d, b) {
|
|
31
|
-
if (typeof b !== "function" && b !== null)
|
|
32
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
33
|
-
extendStatics(d, b);
|
|
34
|
-
function __() { this.constructor = d; }
|
|
35
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
36
|
-
}
|
|
37
|
-
var __assign = function () {
|
|
38
|
-
__assign = Object.assign || function __assign(t) {
|
|
39
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
40
|
-
s = arguments[i];
|
|
41
|
-
for (var p in s)
|
|
42
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
43
|
-
t[p] = s[p];
|
|
44
|
-
}
|
|
45
|
-
return t;
|
|
46
|
-
};
|
|
47
|
-
return __assign.apply(this, arguments);
|
|
48
|
-
};
|
|
49
|
-
function __rest(s, e) {
|
|
50
|
-
var t = {};
|
|
51
|
-
for (var p in s)
|
|
52
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
53
|
-
t[p] = s[p];
|
|
54
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
55
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
56
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
57
|
-
t[p[i]] = s[p[i]];
|
|
58
|
-
}
|
|
59
|
-
return t;
|
|
60
|
-
}
|
|
61
|
-
function __decorate(decorators, target, key, desc) {
|
|
62
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
63
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
64
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
65
|
-
else
|
|
66
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
67
|
-
if (d = decorators[i])
|
|
68
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
69
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
70
|
-
}
|
|
71
|
-
function __param(paramIndex, decorator) {
|
|
72
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
73
|
-
}
|
|
74
|
-
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
75
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function")
|
|
76
|
-
throw new TypeError("Function expected"); return f; }
|
|
77
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
78
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
79
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
80
|
-
var _, done = false;
|
|
81
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
82
|
-
var context = {};
|
|
83
|
-
for (var p in contextIn)
|
|
84
|
-
context[p] = p === "access" ? {} : contextIn[p];
|
|
85
|
-
for (var p in contextIn.access)
|
|
86
|
-
context.access[p] = contextIn.access[p];
|
|
87
|
-
context.addInitializer = function (f) { if (done)
|
|
88
|
-
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
89
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
90
|
-
if (kind === "accessor") {
|
|
91
|
-
if (result === void 0)
|
|
92
|
-
continue;
|
|
93
|
-
if (result === null || typeof result !== "object")
|
|
94
|
-
throw new TypeError("Object expected");
|
|
95
|
-
if (_ = accept(result.get))
|
|
96
|
-
descriptor.get = _;
|
|
97
|
-
if (_ = accept(result.set))
|
|
98
|
-
descriptor.set = _;
|
|
99
|
-
if (_ = accept(result.init))
|
|
100
|
-
initializers.push(_);
|
|
101
|
-
}
|
|
102
|
-
else if (_ = accept(result)) {
|
|
103
|
-
if (kind === "field")
|
|
104
|
-
initializers.push(_);
|
|
105
|
-
else
|
|
106
|
-
descriptor[key] = _;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
if (target)
|
|
110
|
-
Object.defineProperty(target, contextIn.name, descriptor);
|
|
111
|
-
done = true;
|
|
112
|
-
}
|
|
113
|
-
;
|
|
114
|
-
function __runInitializers(thisArg, initializers, value) {
|
|
115
|
-
var useValue = arguments.length > 2;
|
|
116
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
117
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
118
|
-
}
|
|
119
|
-
return useValue ? value : void 0;
|
|
120
|
-
}
|
|
121
|
-
;
|
|
122
|
-
function __propKey(x) {
|
|
123
|
-
return typeof x === "symbol" ? x : "".concat(x);
|
|
124
|
-
}
|
|
125
|
-
;
|
|
126
|
-
function __setFunctionName(f, name, prefix) {
|
|
127
|
-
if (typeof name === "symbol")
|
|
128
|
-
name = name.description ? "[".concat(name.description, "]") : "";
|
|
129
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
130
|
-
}
|
|
131
|
-
;
|
|
132
|
-
function __metadata(metadataKey, metadataValue) {
|
|
133
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
134
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
135
|
-
}
|
|
136
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
137
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
138
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
139
|
-
function fulfilled(value) { try {
|
|
140
|
-
step(generator.next(value));
|
|
141
|
-
}
|
|
142
|
-
catch (e) {
|
|
143
|
-
reject(e);
|
|
144
|
-
} }
|
|
145
|
-
function rejected(value) { try {
|
|
146
|
-
step(generator["throw"](value));
|
|
147
|
-
}
|
|
148
|
-
catch (e) {
|
|
149
|
-
reject(e);
|
|
150
|
-
} }
|
|
151
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
152
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
function __generator(thisArg, body) {
|
|
156
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
157
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
158
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
159
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
160
|
-
function step(op) {
|
|
161
|
-
if (f)
|
|
162
|
-
throw new TypeError("Generator is already executing.");
|
|
163
|
-
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
164
|
-
try {
|
|
165
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
166
|
-
return t;
|
|
167
|
-
if (y = 0, t)
|
|
168
|
-
op = [op[0] & 2, t.value];
|
|
169
|
-
switch (op[0]) {
|
|
170
|
-
case 0:
|
|
171
|
-
case 1:
|
|
172
|
-
t = op;
|
|
173
|
-
break;
|
|
174
|
-
case 4:
|
|
175
|
-
_.label++;
|
|
176
|
-
return { value: op[1], done: false };
|
|
177
|
-
case 5:
|
|
178
|
-
_.label++;
|
|
179
|
-
y = op[1];
|
|
180
|
-
op = [0];
|
|
181
|
-
continue;
|
|
182
|
-
case 7:
|
|
183
|
-
op = _.ops.pop();
|
|
184
|
-
_.trys.pop();
|
|
185
|
-
continue;
|
|
186
|
-
default:
|
|
187
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
188
|
-
_ = 0;
|
|
189
|
-
continue;
|
|
190
|
-
}
|
|
191
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
192
|
-
_.label = op[1];
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
196
|
-
_.label = t[1];
|
|
197
|
-
t = op;
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
if (t && _.label < t[2]) {
|
|
201
|
-
_.label = t[2];
|
|
202
|
-
_.ops.push(op);
|
|
203
|
-
break;
|
|
204
|
-
}
|
|
205
|
-
if (t[2])
|
|
206
|
-
_.ops.pop();
|
|
207
|
-
_.trys.pop();
|
|
208
|
-
continue;
|
|
209
|
-
}
|
|
210
|
-
op = body.call(thisArg, _);
|
|
211
|
-
}
|
|
212
|
-
catch (e) {
|
|
213
|
-
op = [6, e];
|
|
214
|
-
y = 0;
|
|
215
|
-
}
|
|
216
|
-
finally {
|
|
217
|
-
f = t = 0;
|
|
218
|
-
}
|
|
219
|
-
if (op[0] & 5)
|
|
220
|
-
throw op[1];
|
|
221
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
225
|
-
if (k2 === undefined)
|
|
226
|
-
k2 = k;
|
|
227
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
228
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
229
|
-
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
230
|
-
}
|
|
231
|
-
Object.defineProperty(o, k2, desc);
|
|
232
|
-
}) : (function (o, m, k, k2) {
|
|
233
|
-
if (k2 === undefined)
|
|
234
|
-
k2 = k;
|
|
235
|
-
o[k2] = m[k];
|
|
236
|
-
});
|
|
237
|
-
function __exportStar(m, o) {
|
|
238
|
-
for (var p in m)
|
|
239
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
240
|
-
__createBinding(o, m, p);
|
|
241
|
-
}
|
|
242
|
-
function __values(o) {
|
|
243
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
244
|
-
if (m)
|
|
245
|
-
return m.call(o);
|
|
246
|
-
if (o && typeof o.length === "number")
|
|
247
|
-
return {
|
|
248
|
-
next: function () {
|
|
249
|
-
if (o && i >= o.length)
|
|
250
|
-
o = void 0;
|
|
251
|
-
return { value: o && o[i++], done: !o };
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
255
|
-
}
|
|
256
|
-
function __read(o, n) {
|
|
257
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
258
|
-
if (!m)
|
|
259
|
-
return o;
|
|
260
|
-
var i = m.call(o), r, ar = [], e;
|
|
261
|
-
try {
|
|
262
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
263
|
-
ar.push(r.value);
|
|
264
|
-
}
|
|
265
|
-
catch (error) {
|
|
266
|
-
e = { error: error };
|
|
267
|
-
}
|
|
268
|
-
finally {
|
|
269
|
-
try {
|
|
270
|
-
if (r && !r.done && (m = i["return"]))
|
|
271
|
-
m.call(i);
|
|
272
|
-
}
|
|
273
|
-
finally {
|
|
274
|
-
if (e)
|
|
275
|
-
throw e.error;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
return ar;
|
|
279
|
-
}
|
|
280
|
-
/** @deprecated */
|
|
281
|
-
function __spread() {
|
|
282
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
283
|
-
ar = ar.concat(__read(arguments[i]));
|
|
284
|
-
return ar;
|
|
285
|
-
}
|
|
286
|
-
/** @deprecated */
|
|
287
|
-
function __spreadArrays() {
|
|
288
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
289
|
-
s += arguments[i].length;
|
|
290
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
291
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
292
|
-
r[k] = a[j];
|
|
293
|
-
return r;
|
|
294
|
-
}
|
|
295
|
-
function __spreadArray(to, from, pack) {
|
|
296
|
-
if (pack || arguments.length === 2)
|
|
297
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
298
|
-
if (ar || !(i in from)) {
|
|
299
|
-
if (!ar)
|
|
300
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
301
|
-
ar[i] = from[i];
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
305
|
-
}
|
|
306
|
-
function __await(v) {
|
|
307
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
308
|
-
}
|
|
309
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
310
|
-
if (!Symbol.asyncIterator)
|
|
311
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
312
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
313
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
314
|
-
function verb(n) { if (g[n])
|
|
315
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
316
|
-
function resume(n, v) { try {
|
|
317
|
-
step(g[n](v));
|
|
318
|
-
}
|
|
319
|
-
catch (e) {
|
|
320
|
-
settle(q[0][3], e);
|
|
321
|
-
} }
|
|
322
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
323
|
-
function fulfill(value) { resume("next", value); }
|
|
324
|
-
function reject(value) { resume("throw", value); }
|
|
325
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
326
|
-
resume(q[0][0], q[0][1]); }
|
|
327
|
-
}
|
|
328
|
-
function __asyncDelegator(o) {
|
|
329
|
-
var i, p;
|
|
330
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
331
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
|
332
|
-
}
|
|
333
|
-
function __asyncValues(o) {
|
|
334
|
-
if (!Symbol.asyncIterator)
|
|
335
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
336
|
-
var m = o[Symbol.asyncIterator], i;
|
|
337
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
338
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
339
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
340
|
-
}
|
|
341
|
-
function __makeTemplateObject(cooked, raw) {
|
|
342
|
-
if (Object.defineProperty) {
|
|
343
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
344
|
-
}
|
|
345
|
-
else {
|
|
346
|
-
cooked.raw = raw;
|
|
347
|
-
}
|
|
348
|
-
return cooked;
|
|
349
|
-
}
|
|
350
|
-
;
|
|
351
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
352
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
353
|
-
}) : function (o, v) {
|
|
354
|
-
o["default"] = v;
|
|
355
|
-
};
|
|
356
|
-
function __importStar(mod) {
|
|
357
|
-
if (mod && mod.__esModule)
|
|
358
|
-
return mod;
|
|
359
|
-
var result = {};
|
|
360
|
-
if (mod != null)
|
|
361
|
-
for (var k in mod)
|
|
362
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
363
|
-
__createBinding(result, mod, k);
|
|
364
|
-
__setModuleDefault(result, mod);
|
|
365
|
-
return result;
|
|
366
|
-
}
|
|
367
|
-
function __importDefault(mod) {
|
|
368
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
369
|
-
}
|
|
370
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
371
|
-
if (kind === "a" && !f)
|
|
372
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
373
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
374
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
375
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
376
|
-
}
|
|
377
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
378
|
-
if (kind === "m")
|
|
379
|
-
throw new TypeError("Private method is not writable");
|
|
380
|
-
if (kind === "a" && !f)
|
|
381
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
382
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
383
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
384
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
385
|
-
}
|
|
386
|
-
function __classPrivateFieldIn(state, receiver) {
|
|
387
|
-
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
388
|
-
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
389
|
-
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
var UtilsService = /** @class */ (function () {
|
|
393
|
-
function UtilsService(http, snackBar) {
|
|
394
|
-
this.http = http;
|
|
395
|
-
this.snackBar = snackBar;
|
|
396
|
-
this.analyticsRESTURL = '';
|
|
397
|
-
this.RESTURLPrefix = '';
|
|
398
|
-
this.pickupOptions = [];
|
|
399
|
-
this.destOptions = [];
|
|
400
|
-
this.ownerOptions = [];
|
|
401
|
-
this.customerOptions = [];
|
|
402
|
-
this.unitOptions = [];
|
|
403
|
-
this.materialOptions = [];
|
|
404
|
-
this.jcodeOptions = [];
|
|
405
|
-
this.driverOption = [];
|
|
406
|
-
this.truckingCompanayOption = [];
|
|
407
|
-
this.routeNameOptions = [];
|
|
408
|
-
this.preventnavChange = new rxjs.BehaviorSubject(false);
|
|
409
|
-
this.navChangeObserve = this.preventnavChange.asObservable();
|
|
410
|
-
this.clearViewRouteforJobCode = new rxjs.BehaviorSubject(false);
|
|
411
|
-
this.clearViewRouteforJobCodeObserve = this.clearViewRouteforJobCode.asObservable();
|
|
412
|
-
this.preVentJobdetailclose = new rxjs.BehaviorSubject(false);
|
|
413
|
-
this.getpreVentJobdetailclose = this.preVentJobdetailclose.asObservable();
|
|
414
|
-
this.routeDetailsUtility = new rxjs.BehaviorSubject({});
|
|
415
|
-
this.getrouteDetailsUtility = this.routeDetailsUtility.asObservable();
|
|
416
|
-
this.removeMapEntity = new rxjs.BehaviorSubject({});
|
|
417
|
-
this.removeMapEntityUtility = this.removeMapEntity.asObservable();
|
|
418
|
-
this.dict = new Map();
|
|
419
|
-
this.analyticsRESTURL = 'https://test-analytics.aggdirect.com/REST/';
|
|
420
|
-
this.RESTURLPrefix = 'https://test-server.aggdirect.com/REST/';
|
|
421
|
-
}
|
|
422
|
-
UtilsService.prototype.getDateFormat = function (strVal, seprater) {
|
|
423
|
-
seprater = seprater ? seprater : '-';
|
|
424
|
-
var mydate = strVal;
|
|
425
|
-
return (mydate === null || mydate === void 0 ? void 0 : mydate.getFullYear()) + seprater + ((mydate ? mydate.getMonth() : 0) + 1) + seprater + (mydate === null || mydate === void 0 ? void 0 : mydate.getDate());
|
|
426
|
-
};
|
|
427
|
-
UtilsService.prototype.getData = function (path) { return this.http.get("" + this.analyticsRESTURL + path); };
|
|
428
|
-
UtilsService.prototype.postdata = function (path, data) { return this.http.post("" + this.analyticsRESTURL + path, data); };
|
|
429
|
-
UtilsService.prototype.postDataWithRestUrl = function (path, data) { return this.http.post("" + this.RESTURLPrefix + path, data); };
|
|
430
|
-
UtilsService.prototype.fetchAutoCompleteLocations = function (keyword) {
|
|
431
|
-
return this.http.get("https://api.mapbox.com/geocoding/v5/mapbox.places/" + keyword + ".json?access_token=pk.eyJ1Ijoic2FudGFudS1vZ21hIiwiYSI6ImNsOGQ0cDVrNjAweTMzb3RmdG9ieTU5ZDkifQ.I6ZS7mViZYSvBo4zz-mGQQ&country=US");
|
|
432
|
-
};
|
|
433
|
-
UtilsService.prototype.openSnackBar = function (message, className) {
|
|
434
|
-
this.snackBar.open(message, '', {
|
|
435
|
-
duration: 5000, verticalPosition: 'top', horizontalPosition: 'center', panelClass: [className ? className : 'default']
|
|
436
|
-
});
|
|
437
|
-
};
|
|
438
|
-
UtilsService.prototype.makeOptions = function (item) {
|
|
439
|
-
var _this = this;
|
|
440
|
-
var _a;
|
|
441
|
-
if (item.order_number) {
|
|
442
|
-
(this.jcodeOptions.findIndex(function (elem) { return elem.job_id === item.job_id; }) === -1) ? this.jcodeOptions.push({ job_code: item.order_number, job_id: item.job_id }) : null;
|
|
443
|
-
if (item.driver_list && ((_a = item.driver_list) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
444
|
-
item.driver_list.forEach(function (driver) {
|
|
445
|
-
_this.driverOption.findIndex(function (elem) { return elem === driver['driver_name']; }) === -1 ? _this.driverOption.push(driver['driver_name']) : null;
|
|
446
|
-
_this.truckingCompanayOption.findIndex(function (elem) { return elem === driver['trucking_company']; }) === -1 ? _this.truckingCompanayOption.push(driver['trucking_company']) : null;
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
((this.pickupOptions.findIndex(function (elem) { return elem === item.pickup_location; })) === -1) ? this.pickupOptions.push(item.pickup_location) : null;
|
|
451
|
-
((this.destOptions.findIndex(function (elem) { return elem === item.delivery_location; })) === -1) ? this.destOptions.push(item.delivery_location) : null;
|
|
452
|
-
(this.customerOptions.findIndex(function (customer) { return customer === item.customer_name; }) === -1) ? this.customerOptions.push(item.customer_name) : null;
|
|
453
|
-
(this.unitOptions.findIndex(function (elem) { return elem === item.unit; }) === -1) ? this.unitOptions.push(item.unit) : null;
|
|
454
|
-
(this.materialOptions.findIndex(function (elem) { return elem === item.material; }) === -1) ? this.materialOptions.push(item.material) : null;
|
|
455
|
-
if (item.route_name)
|
|
456
|
-
this.routeNameOptions.findIndex(function (elem) { return elem === item.route_name; }) === -1 ? this.routeNameOptions.push(item.route_name) : null;
|
|
457
|
-
};
|
|
458
|
-
UtilsService.prototype.filter = function (value, filters) {
|
|
459
|
-
if (typeof value !== 'string') {
|
|
460
|
-
return [];
|
|
461
|
-
}
|
|
462
|
-
var filterValue = value.toLowerCase();
|
|
463
|
-
if (filterValue === '') {
|
|
464
|
-
return [];
|
|
465
|
-
}
|
|
466
|
-
var searchResults = [];
|
|
467
|
-
this.unitOptions.map(function (unit) {
|
|
468
|
-
if (unit.toLowerCase().includes(filterValue)) {
|
|
469
|
-
searchResults.push({ "type": "unit", "label": unit, "value": unit });
|
|
470
|
-
}
|
|
471
|
-
});
|
|
472
|
-
this.customerOptions.map(function (unit) {
|
|
473
|
-
if (unit.toLowerCase().includes(filterValue)) {
|
|
474
|
-
searchResults.push({ "type": "customer", "label": unit, "value": unit });
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
this.materialOptions.map(function (unit) {
|
|
478
|
-
if (unit.toLowerCase().includes(filterValue)) {
|
|
479
|
-
searchResults.push({ "type": "material", "label": unit, "value": unit });
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
this.pickupOptions.map(function (unit) {
|
|
483
|
-
if (unit.toLowerCase().includes(filterValue)) {
|
|
484
|
-
searchResults.push({ "type": "pickup location", "label": unit, "value": unit });
|
|
485
|
-
}
|
|
486
|
-
});
|
|
487
|
-
this.destOptions.map(function (unit) {
|
|
488
|
-
if (unit.toLowerCase().includes(filterValue)) {
|
|
489
|
-
searchResults.push({ "type": "destination location", "label": unit, "value": unit });
|
|
490
|
-
}
|
|
491
|
-
});
|
|
492
|
-
this.jcodeOptions.map(function (unit) {
|
|
493
|
-
if (unit.job_code.toLowerCase().includes(filterValue)) {
|
|
494
|
-
searchResults.push({ "type": "job", "label": unit['job_code'], "value": unit });
|
|
495
|
-
}
|
|
496
|
-
});
|
|
497
|
-
this.driverOption.map(function (unit) {
|
|
498
|
-
if (unit.toLowerCase().includes(filterValue)) {
|
|
499
|
-
searchResults.push({ "type": "Driver", "label": unit, "value": unit });
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
this.truckingCompanayOption.map(function (unit) {
|
|
503
|
-
if (unit.toLowerCase().includes(filterValue)) {
|
|
504
|
-
searchResults.push({ "type": "Trucking Company", "label": unit, "value": unit });
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
this.routeNameOptions.map(function (unit) {
|
|
508
|
-
if (unit.toLowerCase().includes(filterValue)) {
|
|
509
|
-
searchResults.push({ "type": "Route name", "label": unit, "value": unit });
|
|
510
|
-
}
|
|
511
|
-
});
|
|
512
|
-
var searchDict = {};
|
|
513
|
-
filters.map(function (filter) {
|
|
514
|
-
searchDict[filter['name'] + filter['type']] = filter;
|
|
515
|
-
});
|
|
516
|
-
var furtherFilter = [];
|
|
517
|
-
searchResults.map(function (search) {
|
|
518
|
-
if ((search['label'] + search['type']) in searchDict) { }
|
|
519
|
-
else {
|
|
520
|
-
furtherFilter.push(search);
|
|
521
|
-
}
|
|
522
|
-
});
|
|
523
|
-
return furtherFilter;
|
|
524
|
-
};
|
|
525
|
-
UtilsService.prototype.getSearchResults = function (list, filterval) {
|
|
526
|
-
return list.filter(function (element) {
|
|
527
|
-
var _a, _b;
|
|
528
|
-
var result_list_boolean = [];
|
|
529
|
-
if (filterval.length > 0) {
|
|
530
|
-
if (filterval[0]['type'] === 'unit') {
|
|
531
|
-
result_list_boolean.push(filterval[0]['name'] === element[filterval[0]['type']]);
|
|
532
|
-
}
|
|
533
|
-
if (filterval[0]['type'] === 'customer') {
|
|
534
|
-
result_list_boolean.push(filterval[0]['name'] === element['customer_name']);
|
|
535
|
-
}
|
|
536
|
-
if (filterval[0]['type'] === 'material') {
|
|
537
|
-
result_list_boolean.push(filterval[0]['name'] === element[filterval[0]['type']]);
|
|
538
|
-
}
|
|
539
|
-
if (filterval[0]['type'] === 'pickup location') {
|
|
540
|
-
result_list_boolean.push(filterval[0]['name'] === element['pickup_location']);
|
|
541
|
-
}
|
|
542
|
-
if (filterval[0]['type'] === 'destination location') {
|
|
543
|
-
result_list_boolean.push(filterval[0]['name'] === element['delivery_location']);
|
|
544
|
-
}
|
|
545
|
-
if (filterval[0]['type'] === 'job') {
|
|
546
|
-
result_list_boolean.push(filterval[0]['name'] === element['order_number']);
|
|
547
|
-
}
|
|
548
|
-
if (filterval[0]['type'] === 'Route name') {
|
|
549
|
-
result_list_boolean.push(filterval[0]['name'] === element['route_name']);
|
|
550
|
-
}
|
|
551
|
-
if (filterval[0]['type'] === 'Driver') {
|
|
552
|
-
var index = (_a = element.driver_list) === null || _a === void 0 ? void 0 : _a.findIndex(function (ele) { return filterval[0]['name'] === ele['driver_name']; });
|
|
553
|
-
if (index !== -1)
|
|
554
|
-
result_list_boolean.push(true);
|
|
555
|
-
}
|
|
556
|
-
if (filterval[0]['type'] === 'Trucking Company') {
|
|
557
|
-
var index = (_b = element.driver_list) === null || _b === void 0 ? void 0 : _b.findIndex(function (ele) { return filterval[0]['name'] === ele['trucking_company']; });
|
|
558
|
-
if (index !== -1)
|
|
559
|
-
result_list_boolean.push(true);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
if (result_list_boolean.length > 0) {
|
|
563
|
-
return result_list_boolean.reduce(function (prev, curr) { return prev && curr; });
|
|
564
|
-
}
|
|
565
|
-
return false;
|
|
566
|
-
});
|
|
567
|
-
};
|
|
568
|
-
UtilsService.prototype.clearOptions = function () {
|
|
569
|
-
this.pickupOptions = [];
|
|
570
|
-
this.destOptions = [];
|
|
571
|
-
this.ownerOptions = [];
|
|
572
|
-
this.customerOptions = [];
|
|
573
|
-
this.unitOptions = [];
|
|
574
|
-
this.materialOptions = [];
|
|
575
|
-
this.jcodeOptions = [];
|
|
576
|
-
this.routeNameOptions = [];
|
|
577
|
-
};
|
|
578
|
-
UtilsService.prototype.setdictValue = function (key, value) {
|
|
579
|
-
this.dict.set(key, value);
|
|
580
|
-
};
|
|
581
|
-
UtilsService.prototype.getdictValue = function (key) {
|
|
582
|
-
return JSON.parse(this.dict.get(key));
|
|
583
|
-
};
|
|
584
|
-
UtilsService.prototype.removedictValue = function (key) {
|
|
585
|
-
this.dict.delete(key);
|
|
586
|
-
};
|
|
587
|
-
UtilsService.prototype.conveySearchIcon = function (value) {
|
|
588
|
-
if (value && typeof (value) !== 'object')
|
|
589
|
-
return true;
|
|
590
|
-
return false;
|
|
591
|
-
};
|
|
592
|
-
return UtilsService;
|
|
593
|
-
}());
|
|
594
|
-
UtilsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UtilsService_Factory() { return new UtilsService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.MatSnackBar)); }, token: UtilsService, providedIn: "root" });
|
|
595
|
-
UtilsService.decorators = [
|
|
596
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
597
|
-
];
|
|
598
|
-
UtilsService.ctorParameters = function () { return [
|
|
599
|
-
{ type: i1.HttpClient },
|
|
600
|
-
{ type: i2.MatSnackBar }
|
|
601
|
-
]; };
|
|
602
|
-
|
|
603
|
-
var CoolmapService = /** @class */ (function () {
|
|
604
|
-
function CoolmapService(utils, eventManager) {
|
|
605
|
-
this.utils = utils;
|
|
606
|
-
this.eventManager = eventManager;
|
|
607
|
-
this.markerOriginList = [];
|
|
608
|
-
this.markerDestinationList = [];
|
|
609
|
-
this.initiatecoolmap = new rxjs.BehaviorSubject(true);
|
|
610
|
-
this.reintiatecoolmap = this.initiatecoolmap.asObservable();
|
|
611
|
-
this.bounds = new mapboxgl.LngLatBounds();
|
|
612
|
-
this.originDestinationCordinates = [];
|
|
613
|
-
this.eventManager.addGlobalEventListener('window', 'resize', this.onResize.bind(this));
|
|
614
|
-
this.windowActualHeightWidth = { availHeight: 0 };
|
|
615
|
-
}
|
|
616
|
-
CoolmapService.prototype.initiateMapForAddRoute = function (el) {
|
|
617
|
-
var _this = this;
|
|
618
|
-
return new Promise(function (resolve, reject) {
|
|
619
|
-
_this.map ? _this.map.remove() : '';
|
|
620
|
-
_this.map = new mapboxgl.Map({
|
|
621
|
-
accessToken: 'pk.eyJ1Ijoic2FudGFudS1vZ21hIiwiYSI6ImNsOGQ0cDVrNjAweTMzb3RmdG9ieTU5ZDkifQ.I6ZS7mViZYSvBo4zz-mGQQ',
|
|
622
|
-
container: el,
|
|
623
|
-
style: 'mapbox://styles/santanu-ogma/cl8ep33uz003414n1twlosz9d',
|
|
624
|
-
center: [-77.036873, 38.907192],
|
|
625
|
-
zoom: 10, bearing: 0, pitch: 65, interactive: true,
|
|
626
|
-
});
|
|
627
|
-
_this.map.once('load', function (res) {
|
|
628
|
-
resolve(res);
|
|
629
|
-
});
|
|
630
|
-
});
|
|
631
|
-
};
|
|
632
|
-
// Below method Load route with animation
|
|
633
|
-
CoolmapService.prototype.loadMapProperty = function (pinRouteGeojson, index, unit, route, bottom) {
|
|
634
|
-
var _this = this;
|
|
635
|
-
return new Promise(function (resolve, reject) {
|
|
636
|
-
var origin = pinRouteGeojson.features[0].geometry.coordinates[0];
|
|
637
|
-
var linecolor = (unit === 'Ton') ? '#ff7272' : (unit === 'Load') ? '#a3c52e' : '#ae23d1';
|
|
638
|
-
var destination = pinRouteGeojson.features[0].geometry.coordinates[pinRouteGeojson.features[0].geometry.coordinates.length - 1];
|
|
639
|
-
_this.extendBound(pinRouteGeojson.features[0].geometry.coordinates, true).then(function (res) {
|
|
640
|
-
var point = {
|
|
641
|
-
'type': 'FeatureCollection',
|
|
642
|
-
'features': [
|
|
643
|
-
{ 'type': 'Feature', 'properties': {}, 'geometry': { 'type': 'Point', 'coordinates': origin } }
|
|
644
|
-
]
|
|
645
|
-
};
|
|
646
|
-
var lineDistance = turf.length(pinRouteGeojson.features[0]);
|
|
647
|
-
var arc = [];
|
|
648
|
-
var steps = 10 * pinRouteGeojson.features[0].geometry.coordinates.length;
|
|
649
|
-
for (var i = 0; i < lineDistance; i += lineDistance / steps) {
|
|
650
|
-
var segment = turf.along(pinRouteGeojson.features[0], i);
|
|
651
|
-
arc.push(segment.geometry.coordinates);
|
|
652
|
-
}
|
|
653
|
-
pinRouteGeojson.features[0].geometry.coordinates = arc;
|
|
654
|
-
var pinRoute = pinRouteGeojson.features[0].geometry.coordinates;
|
|
655
|
-
var marker = new mapboxgl.Marker(document.createElement('div'))
|
|
656
|
-
.setLngLat(pinRoute[0]).addTo(_this.map).togglePopup();
|
|
657
|
-
if (_this.map.getSource("line" + index)) {
|
|
658
|
-
_this.removeRouteAndMarker(index).then(function () { });
|
|
659
|
-
}
|
|
660
|
-
_this.map.addSource("line" + index, { type: 'geojson', lineMetrics: true, data: pinRouteGeojson });
|
|
661
|
-
_this.map.addLayer({
|
|
662
|
-
type: 'line',
|
|
663
|
-
source: "line" + index,
|
|
664
|
-
id: "line" + index,
|
|
665
|
-
paint: {
|
|
666
|
-
'line-width': 2,
|
|
667
|
-
'line-gradient': [
|
|
668
|
-
'interpolate',
|
|
669
|
-
['linear'],
|
|
670
|
-
['line-progress'],
|
|
671
|
-
0, unit === 'Ton' ? '#d7f7e4' : unit === 'Load' ? '#c9d8f5' : '#f5dcc1',
|
|
672
|
-
1, unit === 'Ton' ? '#ff7272' : unit === 'Load' ? '#a3c52e' : '#ae23d1',
|
|
673
|
-
]
|
|
674
|
-
},
|
|
675
|
-
layout: { 'line-cap': 'round', 'line-join': 'round' }
|
|
676
|
-
});
|
|
677
|
-
var dataSetForMap = {
|
|
678
|
-
counter: 0,
|
|
679
|
-
pinRouteGeojson: pinRouteGeojson, steps: steps,
|
|
680
|
-
point: point, pointId: "point" + index,
|
|
681
|
-
marker: marker, pinRoute: pinRoute, lineId: "line" + index, index: index,
|
|
682
|
-
origin: origin, destination: destination, lineDistance: lineDistance,
|
|
683
|
-
linecolor: linecolor, route: route,
|
|
684
|
-
isViewRoute: true
|
|
685
|
-
};
|
|
686
|
-
_this.createMarker(dataSetForMap);
|
|
687
|
-
_this.map.on('mouseenter', "line" + index, function (e) {
|
|
688
|
-
_this.map.setPaintProperty("line" + index, 'line-width', 5);
|
|
689
|
-
_this.map.setPaintProperty("line" + index, 'line-opacity', 1);
|
|
690
|
-
var datasetForPopup = {
|
|
691
|
-
coordinate: [e.lngLat.lng, e.lngLat.lat],
|
|
692
|
-
pickup: route.pickup_location ? route.pickup_location : '',
|
|
693
|
-
drop: route.delivery_location ? route.delivery_location : '',
|
|
694
|
-
routeType: route.project ? 'Project' : 'Route',
|
|
695
|
-
title: route.project ? route.project : route.route_name ? route.route_name : '',
|
|
696
|
-
material: route.material ? route.material : '',
|
|
697
|
-
type: route.unit ? route.unit : ''
|
|
698
|
-
};
|
|
699
|
-
_this.createPopup(datasetForPopup);
|
|
700
|
-
});
|
|
701
|
-
_this.map.on('mouseleave', "line" + index, function (e) {
|
|
702
|
-
_this.map.setPaintProperty("line" + index, 'line-width', 2);
|
|
703
|
-
if (_this.popup) {
|
|
704
|
-
_this.popup.remove();
|
|
705
|
-
}
|
|
706
|
-
});
|
|
707
|
-
});
|
|
708
|
-
_this.map.once('idle', function (res) {
|
|
709
|
-
resolve(true);
|
|
710
|
-
});
|
|
711
|
-
});
|
|
712
|
-
};
|
|
713
|
-
// Below method Load route without animation
|
|
714
|
-
CoolmapService.prototype.drawLine = function (cordinates, index, route, enablefitbound, routeType) {
|
|
715
|
-
var _this = this;
|
|
716
|
-
var linecolor;
|
|
717
|
-
var origin = cordinates[0];
|
|
718
|
-
var destination = cordinates[cordinates.length - 1];
|
|
719
|
-
if (origin[0] && origin[1] && destination && destination[0] && destination[1]) {
|
|
720
|
-
linecolor = this.provideLineColor(route['unit'], routeType);
|
|
721
|
-
if (enablefitbound) {
|
|
722
|
-
var padding = {
|
|
723
|
-
top: this.padding.top, bottom: this.padding.bottom + (this.windowActualHeightWidth.availHeight - (window.innerHeight - 65)),
|
|
724
|
-
left: this.padding.left, right: this.padding.right
|
|
725
|
-
};
|
|
726
|
-
this.map.fitBounds([origin, destination], { padding: padding }, { fitboundCompleteJob: true });
|
|
727
|
-
}
|
|
728
|
-
if (this.map.getSource("route-source-for-job-code" + index)) {
|
|
729
|
-
this.removeRouteAndMarker(index).then(function () { });
|
|
730
|
-
}
|
|
731
|
-
this.map.addSource("route-source-for-job-code" + index, {
|
|
732
|
-
'type': 'geojson',
|
|
733
|
-
'data': { 'type': 'Feature', 'properties': {}, 'geometry': { 'type': 'LineString', 'coordinates': cordinates } }
|
|
734
|
-
});
|
|
735
|
-
this.map.addLayer({
|
|
736
|
-
'id': "route-for-job-code" + index,
|
|
737
|
-
'type': 'line',
|
|
738
|
-
'source': "route-source-for-job-code" + index,
|
|
739
|
-
paint: { 'line-color': linecolor, 'line-width': 2 },
|
|
740
|
-
layout: { 'line-cap': 'round', 'line-join': 'round' }
|
|
741
|
-
});
|
|
742
|
-
var dataSetForMap = {
|
|
743
|
-
origin: origin, destination: destination, index: index, linecolor: linecolor, route: route
|
|
744
|
-
};
|
|
745
|
-
this.createMarker(dataSetForMap);
|
|
746
|
-
this.map.on('mouseenter', "route-for-job-code" + index, function (e) {
|
|
747
|
-
if (_this.popup) {
|
|
748
|
-
_this.popup.remove();
|
|
749
|
-
}
|
|
750
|
-
_this.map.setPaintProperty("route-for-job-code" + index, 'line-width', 5);
|
|
751
|
-
_this.map.setPaintProperty("route-for-job-code" + index, 'line-opacity', 1);
|
|
752
|
-
var datasetForPopup = {
|
|
753
|
-
coordinate: [e.lngLat.lng, e.lngLat.lat],
|
|
754
|
-
pickup: route.pickup_location ? route.pickup_location : '',
|
|
755
|
-
drop: route.delivery_location ? route.delivery_location : '',
|
|
756
|
-
jobCode: route.project ? route.order_number : null,
|
|
757
|
-
customer: route.project ? route.customer_name : null,
|
|
758
|
-
routeType: route.project ? 'Project' : 'Route',
|
|
759
|
-
title: route.project ? route.project : route.route_name ? route.route_name : '',
|
|
760
|
-
material: route.material ? route.material : '',
|
|
761
|
-
type: route.unit ? route.unit : ''
|
|
762
|
-
};
|
|
763
|
-
_this.createPopup(datasetForPopup);
|
|
764
|
-
});
|
|
765
|
-
this.map.on('mouseleave', "route-for-job-code" + index, function (e) {
|
|
766
|
-
_this.map.setPaintProperty("route-for-job-code" + index, 'line-width', 2);
|
|
767
|
-
if (_this.popup) {
|
|
768
|
-
_this.popup.remove();
|
|
769
|
-
}
|
|
770
|
-
});
|
|
771
|
-
}
|
|
772
|
-
};
|
|
773
|
-
CoolmapService.prototype.provideLineColor = function (unitType, type) {
|
|
774
|
-
var checkType = (type && !['jobrouteList', 'addroute'].includes(type)) ? true : false;
|
|
775
|
-
var color;
|
|
776
|
-
switch (unitType) {
|
|
777
|
-
case "Ton":
|
|
778
|
-
color = checkType ? '#39c471' : '#ff7272';
|
|
779
|
-
break;
|
|
780
|
-
case "Load":
|
|
781
|
-
color = checkType ? '#326ad3' : '#a3c52e';
|
|
782
|
-
break;
|
|
783
|
-
case "Hourly":
|
|
784
|
-
color = checkType ? '#ffad56' : '#ae23d1';
|
|
785
|
-
break;
|
|
786
|
-
}
|
|
787
|
-
return color;
|
|
788
|
-
};
|
|
789
|
-
CoolmapService.prototype.showRoutePopup = function (arcDetails, event, isViewRoute) {
|
|
790
|
-
if (this.popup) {
|
|
791
|
-
this.popup.remove();
|
|
792
|
-
this.map.setPaintProperty("" + (isViewRoute ? 'line' : 'route-for-job-code') + arcDetails.layer.props.data.index, 'line-width', 2);
|
|
793
|
-
}
|
|
794
|
-
if (arcDetails.color && this.map.getLayoutProperty(arcDetails.layer.id, 'visibility') !== 'none') {
|
|
795
|
-
this.map.setPaintProperty("" + (isViewRoute ? 'line' : 'route-for-job-code') + arcDetails.layer.props.data.index, 'line-width', 5);
|
|
796
|
-
this.map.setPaintProperty("" + (isViewRoute ? 'line' : 'route-for-job-code') + arcDetails.layer.props.data.index, 'line-opacity', 1);
|
|
797
|
-
var datasetForPopup = {
|
|
798
|
-
coordinate: arcDetails.coordinate,
|
|
799
|
-
pickup: arcDetails.layer.props.data.route.pickup_location ? arcDetails.layer.props.data.route.pickup_location : '',
|
|
800
|
-
drop: arcDetails.layer.props.data.route.delivery_location ? arcDetails.layer.props.data.route.delivery_location : '',
|
|
801
|
-
jobCode: arcDetails.layer.props.data.route.project ? arcDetails.layer.props.data.route.order_number : '',
|
|
802
|
-
customer: arcDetails.layer.props.data.route.project ? arcDetails.layer.props.data.route.customer_name : '',
|
|
803
|
-
routeType: arcDetails.layer.props.data.route.project ? 'Project' : 'Route',
|
|
804
|
-
title: arcDetails.layer.props.data.route.project ? arcDetails.layer.props.data.route.project : arcDetails.layer.props.data.route.route_name ? arcDetails.layer.props.data.route.route_name : '',
|
|
805
|
-
material: arcDetails.layer.props.data.route.material ? arcDetails.layer.props.data.route.material : '',
|
|
806
|
-
type: arcDetails.layer.props.data.route.unit ? arcDetails.layer.props.data.route.unit : ''
|
|
807
|
-
};
|
|
808
|
-
this.createPopup(datasetForPopup);
|
|
809
|
-
}
|
|
810
|
-
};
|
|
811
|
-
CoolmapService.prototype.createPopup = function (datasetForPopup) {
|
|
812
|
-
this.popup = new mapboxgl.Popup({
|
|
813
|
-
closeButton: false,
|
|
814
|
-
closeOnClick: false,
|
|
815
|
-
closeOnMove: true,
|
|
816
|
-
anchor: 'bottom-left'
|
|
817
|
-
});
|
|
818
|
-
this.popup.setLngLat(datasetForPopup.coordinate)
|
|
819
|
-
.setHTML("\n <div class=\"destination\">\n <div class=\"duration\">\n <p class=\"pickprt\"><b>Pickup Location:</b> " + datasetForPopup.pickup + "</p>\n <p class=\"dropprt\"><b>Drop Location:</b> " + datasetForPopup.drop + "</p>\n </div>\n " + (datasetForPopup.jobCode ? '<span><b>Job Code:</b> ' + datasetForPopup.jobCode + '</span>' : '') + "\n " + (datasetForPopup.customer ? '<span><b>Customer:</b> ' + datasetForPopup.customer + '</span>' : '') + "\n <span><b>" + datasetForPopup.routeType + " Name:</b> " + datasetForPopup.title + "</span>\n <span><b>Material:</b> " + datasetForPopup.material + "</span>\n <span><b>Type:</b> " + datasetForPopup.type + "</span>\n </div>\n ")
|
|
820
|
-
.addTo(this.map);
|
|
821
|
-
};
|
|
822
|
-
CoolmapService.prototype.hexToRGB = function (hex) {
|
|
823
|
-
return hex.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (m, r, g, b) { return '#' + r + r + g + g + b + b; })
|
|
824
|
-
.substring(1).match(/.{2}/g)
|
|
825
|
-
.map(function (x) { return parseInt(x, 16); });
|
|
826
|
-
};
|
|
827
|
-
CoolmapService.prototype.createMarker = function (routeDetails) {
|
|
828
|
-
var _this = this;
|
|
829
|
-
var _a, _b;
|
|
830
|
-
if (routeDetails.origin[0] && routeDetails.origin[1] && routeDetails.destination[0] && routeDetails.destination[1]) {
|
|
831
|
-
var popup = new mapboxgl.Popup({ closeButton: false }).setHTML('<b>Pickup: </b>' + ((_a = routeDetails.route) === null || _a === void 0 ? void 0 : _a.pickup_location));
|
|
832
|
-
var popupForDestination = new mapboxgl.Popup({ closeButton: false })
|
|
833
|
-
.setHTML('<b>Delivery: </b>' + ((_b = routeDetails.route) === null || _b === void 0 ? void 0 : _b.delivery_location));
|
|
834
|
-
var el = document.createElement('div');
|
|
835
|
-
el.className = 'marker';
|
|
836
|
-
el.innerHTML = "<span class='markerPointer' style='background:" + routeDetails.linecolor + "'><b>P</b><span class='markerSpan' style='border-top: 10px solid " + routeDetails.linecolor + "'></span></span>";
|
|
837
|
-
var originMarker_1 = new mapboxgl.Marker(el)
|
|
838
|
-
.setPopup(popup).setLngLat(routeDetails.origin).addTo(this.map);
|
|
839
|
-
originMarker_1.getElement().addEventListener('mouseenter', function () { return originMarker_1.togglePopup(); });
|
|
840
|
-
originMarker_1.getElement().addEventListener('mouseleave', function () { return originMarker_1.togglePopup(); });
|
|
841
|
-
var elementForDestination = document.createElement('div');
|
|
842
|
-
elementForDestination.className = 'marker';
|
|
843
|
-
elementForDestination.innerHTML = "<span class='markerPointer' style='background:" + routeDetails.linecolor + "'><b>D</b><span class='markerSpan' style='border-top: 10px solid " + routeDetails.linecolor + "'></span></span>";
|
|
844
|
-
var destinationMarker_1 = new mapboxgl.Marker(elementForDestination).setPopup(popupForDestination).setLngLat(routeDetails.destination).addTo(this.map);
|
|
845
|
-
destinationMarker_1.getElement().addEventListener('mouseenter', function () { return destinationMarker_1.togglePopup(); });
|
|
846
|
-
destinationMarker_1.getElement().addEventListener('mouseleave', function () { return destinationMarker_1.togglePopup(); });
|
|
847
|
-
this.markerOriginList[routeDetails.index] = originMarker_1;
|
|
848
|
-
this.markerDestinationList[routeDetails.index] = destinationMarker_1;
|
|
849
|
-
var colorArray = this.hexToRGB(routeDetails.linecolor);
|
|
850
|
-
var arcLayer = new mapbox.MapboxLayer({
|
|
851
|
-
id: 'arc-layer' + routeDetails.index,
|
|
852
|
-
type: layers.ArcLayer,
|
|
853
|
-
pickable: true,
|
|
854
|
-
data: { route: routeDetails.route, index: routeDetails.index },
|
|
855
|
-
getWidth: 1,
|
|
856
|
-
getSourcePosition: routeDetails.origin,
|
|
857
|
-
getTargetPosition: routeDetails.destination,
|
|
858
|
-
getTargetColor: [255, 255, 255],
|
|
859
|
-
getSourceColor: [colorArray[0], colorArray[1], colorArray[2]],
|
|
860
|
-
onHover: function (info, event) { return _this.showRoutePopup(info, event, routeDetails.isViewRoute); },
|
|
861
|
-
});
|
|
862
|
-
this.map.addLayer(arcLayer);
|
|
863
|
-
}
|
|
864
|
-
};
|
|
865
|
-
CoolmapService.prototype.removeRouteAndMarker = function (index) {
|
|
866
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
867
|
-
return __generator(this, function (_e) {
|
|
868
|
-
switch (_e.label) {
|
|
869
|
-
case 0:
|
|
870
|
-
if (!this.map) return [3 /*break*/, 2];
|
|
871
|
-
this.map.getLayer("arc-layer" + index) ? this.map.removeLayer("arc-layer" + index) : '';
|
|
872
|
-
this.map.getLayer("line" + index) ? this.map.removeLayer("line" + index) : '';
|
|
873
|
-
this.map.getLayer("custom_layer" + index) ? this.map.removeLayer("custom_layer" + index) : '';
|
|
874
|
-
this.map.getSource("line" + index) ? this.map.removeSource("line" + index) : '';
|
|
875
|
-
this.map.getLayer("route-for-job-code" + index) ? this.map.removeLayer("route-for-job-code" + index) : '';
|
|
876
|
-
this.map.getSource("route-source-for-job-code" + index) ? this.map.removeSource("route-source-for-job-code" + index) : '';
|
|
877
|
-
this.findMarkerBound(index);
|
|
878
|
-
this.markerOriginList[index] ? this.markerOriginList[index].remove() : '';
|
|
879
|
-
this.markerDestinationList[index] ? this.markerDestinationList[index].remove() : '';
|
|
880
|
-
return [4 /*yield*/, true];
|
|
881
|
-
case 1:
|
|
882
|
-
_e.sent();
|
|
883
|
-
_e.label = 2;
|
|
884
|
-
case 2: return [2 /*return*/];
|
|
885
|
-
}
|
|
886
|
-
});
|
|
887
|
-
});
|
|
888
|
-
};
|
|
889
|
-
CoolmapService.prototype.findMarkerBound = function (index) {
|
|
890
|
-
var _this = this;
|
|
891
|
-
var indexOfCordinates = this.originDestinationCordinates.findIndex(function (x) { var _a, _b, _c, _d; return (x[0][0].toFixed(6) == ((_b = (_a = _this.markerOriginList[index]) === null || _a === void 0 ? void 0 : _a.getLngLat()) === null || _b === void 0 ? void 0 : _b.lng.toFixed(6))) && (x[0][1].toFixed(6) == ((_d = (_c = _this.markerOriginList[index]) === null || _c === void 0 ? void 0 : _c.getLngLat()) === null || _d === void 0 ? void 0 : _d.lat.toFixed(6))); });
|
|
892
|
-
if (indexOfCordinates >= 0) {
|
|
893
|
-
this.originDestinationCordinates.splice(indexOfCordinates, 1);
|
|
894
|
-
}
|
|
895
|
-
};
|
|
896
|
-
CoolmapService.prototype.filterRoute = function (ID, visibility, showAllFitbound) {
|
|
897
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
898
|
-
var originM, destinationM;
|
|
899
|
-
return __generator(this, function (_e) {
|
|
900
|
-
switch (_e.label) {
|
|
901
|
-
case 0:
|
|
902
|
-
if (ID) {
|
|
903
|
-
if (this.map.getLayer("route-for-job-code" + ID)) {
|
|
904
|
-
this.map.setLayoutProperty("route-for-job-code" + ID, 'visibility', visibility);
|
|
905
|
-
originM = this.markerOriginList[ID].getElement();
|
|
906
|
-
originM.style.display = ((visibility === 'visible') ? 'block' : visibility);
|
|
907
|
-
destinationM = this.markerDestinationList[ID].getElement();
|
|
908
|
-
destinationM.style.display = ((visibility === 'visible') ? 'block' : visibility);
|
|
909
|
-
if (visibility === 'none' && showAllFitbound) {
|
|
910
|
-
this.findMarkerBound(ID);
|
|
911
|
-
this.extendReBound();
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
if (this.map.getLayer("arc-layer" + ID)) {
|
|
915
|
-
this.map.setLayoutProperty("arc-layer" + ID, 'visibility', visibility);
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
return [4 /*yield*/, true];
|
|
919
|
-
case 1:
|
|
920
|
-
_e.sent();
|
|
921
|
-
return [2 /*return*/];
|
|
922
|
-
}
|
|
923
|
-
});
|
|
924
|
-
});
|
|
925
|
-
};
|
|
926
|
-
CoolmapService.prototype.extendBound = function (route, showAllFitbound) {
|
|
927
|
-
var _this = this;
|
|
928
|
-
return new Promise(function (resolve, reject) {
|
|
929
|
-
if (route) {
|
|
930
|
-
if (typeof route === 'string') {
|
|
931
|
-
var path_1 = route.split(';');
|
|
932
|
-
path_1 = path_1.map(function (ele) { return ele = _this.formateLatLong(ele); });
|
|
933
|
-
path_1.forEach(function (ele, index) {
|
|
934
|
-
if (ele.length === 1)
|
|
935
|
-
path_1.splice(index, 1);
|
|
936
|
-
});
|
|
937
|
-
route = path_1;
|
|
938
|
-
}
|
|
939
|
-
if (route[0][0] && route[0][1] && route[route.length - 1][0] && route[route.length - 1][1]) {
|
|
940
|
-
_this.originDestinationCordinates.push(route);
|
|
941
|
-
route.map(function (item) {
|
|
942
|
-
_this.bounds.extend(item);
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
if (showAllFitbound) {
|
|
947
|
-
var padding_1 = { top: _this.padding.top, bottom: (_this.padding.bottom + (_this.windowActualHeightWidth.availHeight - (window.innerHeight - 65))), left: _this.padding.left, right: _this.padding.right };
|
|
948
|
-
setTimeout(function () {
|
|
949
|
-
if (showAllFitbound && (Object.keys(_this.bounds).length > 0))
|
|
950
|
-
_this.map.fitBounds(_this.bounds, { padding: padding_1 }, { fitboundComplete: true });
|
|
951
|
-
}, 100);
|
|
952
|
-
_this.map.once('moveend', function (event) {
|
|
953
|
-
if (event.fitboundComplete) {
|
|
954
|
-
resolve(true);
|
|
955
|
-
}
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
});
|
|
959
|
-
};
|
|
960
|
-
CoolmapService.prototype.extendReBound = function (bottom) {
|
|
961
|
-
var _this = this;
|
|
962
|
-
return new Promise(function (resolve, reject) {
|
|
963
|
-
_this.bounds = new mapboxgl.LngLatBounds();
|
|
964
|
-
if (_this.originDestinationCordinates.length >= 0) {
|
|
965
|
-
_this.originDestinationCordinates.map(function (item, index) {
|
|
966
|
-
item.map(function (route) {
|
|
967
|
-
_this.bounds.extend(route);
|
|
968
|
-
});
|
|
969
|
-
if (index === (_this.originDestinationCordinates.length - 1)) {
|
|
970
|
-
var padding_2 = { top: _this.padding.top, bottom: (_this.padding.bottom + (_this.windowActualHeightWidth.availHeight - (window.innerHeight - 65))), left: _this.padding.left, right: _this.padding.right };
|
|
971
|
-
setTimeout(function () {
|
|
972
|
-
if (_this.originDestinationCordinates.length > 0)
|
|
973
|
-
_this.map.fitBounds(_this.bounds, { padding: padding_2 });
|
|
974
|
-
}, 500);
|
|
975
|
-
resolve(true);
|
|
976
|
-
}
|
|
977
|
-
});
|
|
978
|
-
}
|
|
979
|
-
else {
|
|
980
|
-
resolve(true);
|
|
981
|
-
}
|
|
982
|
-
});
|
|
983
|
-
};
|
|
984
|
-
CoolmapService.prototype.plotRoute = function (route, i, type, enablefitbound, showAllFitbound) {
|
|
985
|
-
var _this = this;
|
|
986
|
-
return new Promise(function (resolve, reject) {
|
|
987
|
-
var param = {};
|
|
988
|
-
if (['jobcode'].includes(type)) {
|
|
989
|
-
param['job'] = route['job_id'];
|
|
990
|
-
_this.utils.postDataWithRestUrl('schedule/job/path', param).subscribe(function (res) {
|
|
991
|
-
if (res['data']['route']) {
|
|
992
|
-
var path_2 = res['data']['route'].split(';');
|
|
993
|
-
path_2 = path_2.map(function (ele) { return ele = _this.formateLatLong(ele); });
|
|
994
|
-
path_2.forEach(function (ele, index) {
|
|
995
|
-
if (ele.length === 1)
|
|
996
|
-
path_2.splice(index, 1);
|
|
997
|
-
});
|
|
998
|
-
route['path'] = path_2;
|
|
999
|
-
_this.extendBound(route['path'], showAllFitbound);
|
|
1000
|
-
if (route['path'] && route['path'].length > 0)
|
|
1001
|
-
_this.drawLine(route['path'], i, route, enablefitbound, type);
|
|
1002
|
-
route['index'] = i;
|
|
1003
|
-
}
|
|
1004
|
-
else {
|
|
1005
|
-
_this.extendBound(null, showAllFitbound);
|
|
1006
|
-
}
|
|
1007
|
-
resolve(true);
|
|
1008
|
-
}, function (err) {
|
|
1009
|
-
if (err) {
|
|
1010
|
-
reject(false);
|
|
1011
|
-
}
|
|
1012
|
-
});
|
|
1013
|
-
}
|
|
1014
|
-
else if (['jobrouteList', 'addroute'].includes(type)) {
|
|
1015
|
-
if (route['path'] && route['path'].length > 0) {
|
|
1016
|
-
var path_3 = route['path'].split(';');
|
|
1017
|
-
path_3 = path_3.map(function (ele) { return ele = _this.formateLatLong(ele); });
|
|
1018
|
-
path_3.forEach(function (ele, index) {
|
|
1019
|
-
if (ele.length === 1)
|
|
1020
|
-
path_3.splice(index, 1);
|
|
1021
|
-
});
|
|
1022
|
-
_this.extendBound(path_3, showAllFitbound);
|
|
1023
|
-
_this.drawLine(path_3, i, route, enablefitbound, type);
|
|
1024
|
-
}
|
|
1025
|
-
;
|
|
1026
|
-
}
|
|
1027
|
-
});
|
|
1028
|
-
};
|
|
1029
|
-
CoolmapService.prototype.clearBound = function () { this.bounds = new mapboxgl.LngLatBounds(); this.originDestinationCordinates = []; this.clearPadding(); };
|
|
1030
|
-
CoolmapService.prototype.formateLatLong = function (latlong) { return latlong ? latlong.split(',').map(function (x) { return +x; }).reverse() : null; };
|
|
1031
|
-
CoolmapService.prototype.clearBoundWithCordinates = function () {
|
|
1032
|
-
this.bounds = new mapboxgl.LngLatBounds();
|
|
1033
|
-
this.originDestinationCordinates = [];
|
|
1034
|
-
};
|
|
1035
|
-
CoolmapService.prototype.onResize = function (event) {
|
|
1036
|
-
var _this = this;
|
|
1037
|
-
if (!this.bounds.isEmpty()) {
|
|
1038
|
-
this.windowActualHeightWidth.availHeight = (window.innerHeight > window.screen.availHeight) ? window.innerHeight : window.screen.availHeight;
|
|
1039
|
-
setTimeout(function () {
|
|
1040
|
-
_this.map.fitBounds(_this.bounds, { padding: { top: _this.padding.top, bottom: _this.padding.bottom + (_this.windowActualHeightWidth.availHeight - (event.target.innerHeight - 65)), left: _this.padding.left, right: _this.padding.right } });
|
|
1041
|
-
}, 500);
|
|
1042
|
-
}
|
|
1043
|
-
};
|
|
1044
|
-
CoolmapService.prototype.setWindowHeight = function (screen) {
|
|
1045
|
-
this.windowActualHeightWidth.availHeight = screen;
|
|
1046
|
-
};
|
|
1047
|
-
CoolmapService.prototype.setPadding = function (padding) { this.padding = padding; };
|
|
1048
|
-
CoolmapService.prototype.clearPadding = function () { this.padding = null; };
|
|
1049
|
-
CoolmapService.prototype.removeJobFromMap = function (data) {
|
|
1050
|
-
var _this = this;
|
|
1051
|
-
data.map(function (ele, index) {
|
|
1052
|
-
var id = (ele['job_id'] ? ele['job_id'] : ele['route_id']);
|
|
1053
|
-
_this.removeRouteAndMarker(id);
|
|
1054
|
-
if (index === (data.length - 1)) {
|
|
1055
|
-
_this.extendReBound();
|
|
1056
|
-
}
|
|
1057
|
-
});
|
|
1058
|
-
};
|
|
1059
|
-
return CoolmapService;
|
|
1060
|
-
}());
|
|
1061
|
-
CoolmapService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CoolmapService_Factory() { return new CoolmapService(i0.ɵɵinject(UtilsService), i0.ɵɵinject(i2$1.EventManager)); }, token: CoolmapService, providedIn: "root" });
|
|
1062
|
-
CoolmapService.decorators = [
|
|
1063
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
1064
|
-
];
|
|
1065
|
-
CoolmapService.ctorParameters = function () { return [
|
|
1066
|
-
{ type: UtilsService },
|
|
1067
|
-
{ type: i2$1.EventManager }
|
|
1068
|
-
]; };
|
|
1069
|
-
|
|
1070
|
-
var Route = /** @class */ (function () {
|
|
1071
|
-
function Route() {
|
|
1072
|
-
this.index = 0;
|
|
1073
|
-
}
|
|
1074
|
-
return Route;
|
|
1075
|
-
}());
|
|
1076
|
-
var EstinationData = ['estimated_distance', 'estimated_time'];
|
|
1077
|
-
(function (EstinationEnum) {
|
|
1078
|
-
EstinationEnum["estimated_distance"] = "miles";
|
|
1079
|
-
EstinationEnum["estimated_time"] = "time";
|
|
1080
|
-
})(exports.EstinationEnum || (exports.EstinationEnum = {}));
|
|
1081
|
-
var JobCodeOverviewData = ['customer_contact', 'delivery_contact', 'pickup_location', 'delivery_location', 'project', 'unit'];
|
|
1082
|
-
(function (JobCodeOverviewEnum) {
|
|
1083
|
-
JobCodeOverviewEnum["customer_contact"] = "Customer Contact";
|
|
1084
|
-
JobCodeOverviewEnum["delivery_contact"] = "Delivery Contact";
|
|
1085
|
-
JobCodeOverviewEnum["pickup_location"] = "Pickup";
|
|
1086
|
-
JobCodeOverviewEnum["delivery_location"] = "Delivery";
|
|
1087
|
-
JobCodeOverviewEnum["project"] = "Project Name";
|
|
1088
|
-
JobCodeOverviewEnum["unit"] = "Job Type";
|
|
1089
|
-
})(exports.JobCodeOverviewEnum || (exports.JobCodeOverviewEnum = {}));
|
|
1090
|
-
var DriversmsCardKey = ['order_number', 'date', 'values', 'material', 'unit', 'pickup_location', 'delivery_location'];
|
|
1091
|
-
(function (DriverSmsCardEnum) {
|
|
1092
|
-
DriverSmsCardEnum["order_number"] = "Jobcode";
|
|
1093
|
-
DriverSmsCardEnum["date"] = "Date";
|
|
1094
|
-
DriverSmsCardEnum["values"] = "Total tasks";
|
|
1095
|
-
DriverSmsCardEnum["material"] = "Material";
|
|
1096
|
-
DriverSmsCardEnum["unit"] = "Unit";
|
|
1097
|
-
DriverSmsCardEnum["pickup_location"] = "Pickup Address";
|
|
1098
|
-
DriverSmsCardEnum["delivery_location"] = "Delivery Address";
|
|
1099
|
-
})(exports.DriverSmsCardEnum || (exports.DriverSmsCardEnum = {}));
|
|
1100
|
-
var PopupData = /** @class */ (function () {
|
|
1101
|
-
function PopupData() {
|
|
1102
|
-
}
|
|
1103
|
-
return PopupData;
|
|
1104
|
-
}());
|
|
1105
|
-
|
|
1106
|
-
/*
|
|
1107
|
-
* Public API Surface of coolmap-services
|
|
1108
|
-
*/
|
|
1109
|
-
|
|
1110
|
-
/**
|
|
1111
|
-
* Generated bundle index. Do not edit.
|
|
1112
|
-
*/
|
|
1113
|
-
|
|
1114
|
-
exports.CoolmapService = CoolmapService;
|
|
1115
|
-
exports.DriversmsCardKey = DriversmsCardKey;
|
|
1116
|
-
exports.EstinationData = EstinationData;
|
|
1117
|
-
exports.JobCodeOverviewData = JobCodeOverviewData;
|
|
1118
|
-
exports.PopupData = PopupData;
|
|
1119
|
-
exports.Route = Route;
|
|
1120
|
-
exports.UtilsService = UtilsService;
|
|
1121
|
-
|
|
1122
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1123
|
-
|
|
1124
|
-
})));
|
|
1125
|
-
//# sourceMappingURL=coolmap-services.umd.js.map
|