@maptrip/map-tiles 1.1.0 → 1.2.0

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.
Files changed (39) hide show
  1. package/README.md +5 -3
  2. package/dist/api-extensions/google/MapTripGoogleMapType.d.ts +28 -0
  3. package/dist/api-extensions/leaflet/MapTripLeafletGridLayer.d.ts +4 -0
  4. package/dist/api-extensions/openlayers/MapTripOpenLayersSource.d.ts +19 -0
  5. package/dist/core/CollisionDetector.d.ts +14 -0
  6. package/dist/core/VectorTileFactory.d.ts +64 -0
  7. package/dist/core/VectorTileLoader.d.ts +40 -0
  8. package/dist/core/VectorTileRenderer.d.ts +123 -0
  9. package/dist/core/constants.d.ts +10 -0
  10. package/dist/core/rendering_config_default.d.ts +658 -0
  11. package/dist/core/rendering_config_grayscale.d.ts +638 -0
  12. package/dist/core/rendering_config_traffic.d.ts +39 -0
  13. package/dist/map-tiles.d.ts +9 -0
  14. package/dist/map-tiles.js +23647 -10188
  15. package/dist/map-tiles.js.map +1 -0
  16. package/dist/types/interfaces.d.ts +135 -0
  17. package/lib/api-extensions/google/MapTripGoogleMapType.ts +40 -0
  18. package/lib/api-extensions/leaflet/MapTripLeafletGridLayer.ts +44 -0
  19. package/lib/api-extensions/openlayers/MapTripOpenLayersSource.ts +61 -0
  20. package/lib/core/CollisionDetector.ts +95 -0
  21. package/lib/core/VectorTileFactory.ts +327 -0
  22. package/lib/core/VectorTileLoader.ts +165 -0
  23. package/lib/core/VectorTileRenderer.ts +1212 -0
  24. package/lib/core/constants.ts +21 -0
  25. package/lib/core/rendering_config_default.ts +1131 -0
  26. package/lib/{main.js → main.ts} +2 -0
  27. package/lib/types/interfaces.ts +147 -0
  28. package/package.json +19 -14
  29. package/lib/api-extensions/google/MapTripGoogleMapType.js +0 -25
  30. package/lib/api-extensions/leaflet/MapTripLeafletGridLayer.js +0 -24
  31. package/lib/api-extensions/openlayers/MapTripOpenLayersSource.js +0 -43
  32. package/lib/core/CollisionDetector.js +0 -65
  33. package/lib/core/VectorTileFactory.js +0 -245
  34. package/lib/core/VectorTileLoader.js +0 -132
  35. package/lib/core/VectorTileRenderer.js +0 -826
  36. package/lib/core/constants.js +0 -18
  37. package/lib/core/rendering_config_default.js +0 -1107
  38. /package/lib/core/{rendering_config_grayscale.js → rendering_config_grayscale.ts} +0 -0
  39. /package/lib/core/{rendering_config_traffic.js → rendering_config_traffic.ts} +0 -0
@@ -0,0 +1,638 @@
1
+ declare const RENDERING_CONFIG_GRAYSCALE: {
2
+ background: {
3
+ from: number;
4
+ to: number;
5
+ color: string;
6
+ }[];
7
+ layers: {
8
+ earth: string;
9
+ natural_park: string;
10
+ forest: string;
11
+ urban_area: string;
12
+ water: string;
13
+ country: string;
14
+ highway: string;
15
+ interstate_major: string;
16
+ interstate_minor: string;
17
+ minor_road: string;
18
+ minor_road_restricted: string;
19
+ minor_road_oneway: string;
20
+ minor_road_oneway_rev: string;
21
+ residential_road: string;
22
+ residential_road_oneway: string;
23
+ residential_road_oneway_rev: string;
24
+ ferry: string;
25
+ rail: string;
26
+ capital: string;
27
+ metropolis: string;
28
+ large_city: string;
29
+ city: string;
30
+ settlement: string;
31
+ other_settlement: string;
32
+ interstateNumbers: string;
33
+ expresswayNumbers: string;
34
+ expresswayintersections: string;
35
+ trafficFlowFast: string;
36
+ trafficFlowMedium: string;
37
+ trafficFlowSlow: string;
38
+ trafficJam: string;
39
+ roadworks: string;
40
+ dangerousSituation: string;
41
+ accident: string;
42
+ };
43
+ renderers: {
44
+ metropolis: {
45
+ from: number;
46
+ to: number;
47
+ text: {
48
+ size: number;
49
+ color: string;
50
+ font: string;
51
+ fontWeight: string;
52
+ outlineColor: string;
53
+ outlineWidth: number;
54
+ };
55
+ }[];
56
+ large_city: {
57
+ from: number;
58
+ to: number;
59
+ text: {
60
+ size: number;
61
+ color: string;
62
+ font: string;
63
+ fontWeight: string;
64
+ outlineColor: string;
65
+ outlineWidth: number;
66
+ };
67
+ }[];
68
+ city: {
69
+ from: number;
70
+ to: number;
71
+ text: {
72
+ size: number;
73
+ color: string;
74
+ font: string;
75
+ fontWeight: string;
76
+ outlineColor: string;
77
+ outlineWidth: number;
78
+ };
79
+ }[];
80
+ settlement: {
81
+ from: number;
82
+ to: number;
83
+ text: {
84
+ size: number;
85
+ color: string;
86
+ font: string;
87
+ fontWeight: string;
88
+ outlineColor: string;
89
+ outlineWidth: number;
90
+ };
91
+ }[];
92
+ earth: {
93
+ from: number;
94
+ to: number;
95
+ polygon: {
96
+ color: string;
97
+ };
98
+ }[];
99
+ urban_area: {
100
+ from: number;
101
+ to: number;
102
+ polygon: {
103
+ color: string;
104
+ };
105
+ }[];
106
+ forest: ({
107
+ from: number;
108
+ to: number;
109
+ polygon: {
110
+ color: string;
111
+ };
112
+ text?: undefined;
113
+ } | {
114
+ from: number;
115
+ to: number;
116
+ polygon: {
117
+ color: string;
118
+ };
119
+ text: {
120
+ size: number;
121
+ color: string;
122
+ font: string;
123
+ fontStyle: string;
124
+ };
125
+ })[];
126
+ natural_park: ({
127
+ from: number;
128
+ to: number;
129
+ polygon: {
130
+ color: string;
131
+ };
132
+ text?: undefined;
133
+ } | {
134
+ from: number;
135
+ to: number;
136
+ polygon: {
137
+ color: string;
138
+ };
139
+ text: {
140
+ size: number;
141
+ color: string;
142
+ font: string;
143
+ fontStyle: string;
144
+ };
145
+ })[];
146
+ water: {
147
+ from: number;
148
+ to: number;
149
+ line: {
150
+ color: string;
151
+ width: number;
152
+ };
153
+ polygon: {
154
+ color: string;
155
+ };
156
+ text: {
157
+ size: number;
158
+ color: string;
159
+ font: string;
160
+ fontWeight: string;
161
+ fontStyle: string;
162
+ };
163
+ }[];
164
+ country: {
165
+ from: number;
166
+ to: number;
167
+ line: {
168
+ color: string;
169
+ };
170
+ text: {
171
+ size: number;
172
+ color: string;
173
+ font: string;
174
+ fontWeight: string;
175
+ outlineColor: string;
176
+ outlineWidth: number;
177
+ };
178
+ }[];
179
+ trafficFlowFast: {
180
+ from: number;
181
+ to: number;
182
+ line: {
183
+ color: string;
184
+ width: number;
185
+ };
186
+ }[];
187
+ trafficFlowMedium: {
188
+ from: number;
189
+ to: number;
190
+ line: {
191
+ color: string;
192
+ width: number;
193
+ };
194
+ }[];
195
+ trafficFlowSlow: {
196
+ from: number;
197
+ to: number;
198
+ line: {
199
+ color: string;
200
+ width: number;
201
+ };
202
+ }[];
203
+ trafficJam: {
204
+ from: number;
205
+ to: number;
206
+ image: {
207
+ url: string;
208
+ width: number;
209
+ height: number;
210
+ dx: number;
211
+ dy: number;
212
+ };
213
+ text: {
214
+ size: number;
215
+ color: string;
216
+ font: string;
217
+ };
218
+ }[];
219
+ roadworks: {
220
+ from: number;
221
+ to: number;
222
+ image: {
223
+ url: string;
224
+ width: number;
225
+ height: number;
226
+ dx: number;
227
+ dy: number;
228
+ };
229
+ text: {
230
+ size: number;
231
+ color: string;
232
+ font: string;
233
+ };
234
+ }[];
235
+ dangerous_situation: {
236
+ from: number;
237
+ to: number;
238
+ image: {
239
+ url: string;
240
+ width: number;
241
+ height: number;
242
+ dx: number;
243
+ dy: number;
244
+ };
245
+ text: {
246
+ size: number;
247
+ color: string;
248
+ font: string;
249
+ };
250
+ }[];
251
+ highway: ({
252
+ from: number;
253
+ to: number;
254
+ line: {
255
+ color: string;
256
+ width: number;
257
+ outlineColor: string;
258
+ outlineWidth: number;
259
+ };
260
+ image: {
261
+ url: string;
262
+ width: number;
263
+ height: number;
264
+ dx: number;
265
+ dy: number;
266
+ };
267
+ text: {
268
+ size: number;
269
+ color: string;
270
+ font: string;
271
+ };
272
+ } | {
273
+ from: number;
274
+ to: number;
275
+ line: {
276
+ color: string;
277
+ width: number;
278
+ outlineColor?: undefined;
279
+ outlineWidth?: undefined;
280
+ };
281
+ image?: undefined;
282
+ text?: undefined;
283
+ })[];
284
+ interstate_major: ({
285
+ from: number;
286
+ to: number;
287
+ line: {
288
+ width: number;
289
+ color: string;
290
+ outlineColor: string;
291
+ outlineWidth: number;
292
+ };
293
+ text: {
294
+ size: number;
295
+ color: string;
296
+ font: string;
297
+ outlineColor: string;
298
+ outlineWidth: number;
299
+ };
300
+ } | {
301
+ from: number;
302
+ to: number;
303
+ line: {
304
+ width: number;
305
+ color: string;
306
+ outlineColor: string;
307
+ outlineWidth: number;
308
+ };
309
+ text?: undefined;
310
+ } | {
311
+ from: number;
312
+ to: number;
313
+ line: {
314
+ width: number;
315
+ color: string;
316
+ outlineColor?: undefined;
317
+ outlineWidth?: undefined;
318
+ };
319
+ text?: undefined;
320
+ })[];
321
+ interstate_minor: ({
322
+ from: number;
323
+ to: number;
324
+ line: {
325
+ width: number;
326
+ color: string;
327
+ outlineColor: string;
328
+ outlineWidth: number;
329
+ };
330
+ text: {
331
+ size: number;
332
+ color: string;
333
+ font: string;
334
+ outlineColor: string;
335
+ outlineWidth: number;
336
+ };
337
+ } | {
338
+ from: number;
339
+ to: number;
340
+ line: {
341
+ width: number;
342
+ color: string;
343
+ outlineColor: string;
344
+ outlineWidth: number;
345
+ };
346
+ text?: undefined;
347
+ })[];
348
+ minor_road: ({
349
+ from: number;
350
+ to: number;
351
+ line: {
352
+ width: number;
353
+ color: string;
354
+ };
355
+ text: {
356
+ size: number;
357
+ color: string;
358
+ font: string;
359
+ outlineColor: string;
360
+ outlineWidth: number;
361
+ };
362
+ } | {
363
+ from: number;
364
+ to: number;
365
+ line: {
366
+ width: number;
367
+ color: string;
368
+ };
369
+ text?: undefined;
370
+ })[];
371
+ minor_road_oneway: ({
372
+ from: number;
373
+ to: number;
374
+ line: {
375
+ width: number;
376
+ color: string;
377
+ url: string;
378
+ height: number;
379
+ dx: number;
380
+ dy: number;
381
+ direction: string;
382
+ };
383
+ text: {
384
+ size: number;
385
+ color: string;
386
+ font: string;
387
+ outlineColor: string;
388
+ outlineWidth: number;
389
+ };
390
+ } | {
391
+ from: number;
392
+ to: number;
393
+ line: {
394
+ width: number;
395
+ color: string;
396
+ url?: undefined;
397
+ height?: undefined;
398
+ dx?: undefined;
399
+ dy?: undefined;
400
+ direction?: undefined;
401
+ };
402
+ text: {
403
+ size: number;
404
+ color: string;
405
+ font: string;
406
+ outlineColor: string;
407
+ outlineWidth: number;
408
+ };
409
+ } | {
410
+ from: number;
411
+ to: number;
412
+ line: {
413
+ width: number;
414
+ color: string;
415
+ url?: undefined;
416
+ height?: undefined;
417
+ dx?: undefined;
418
+ dy?: undefined;
419
+ direction?: undefined;
420
+ };
421
+ text?: undefined;
422
+ })[];
423
+ minor_road_oneway_reverse: ({
424
+ from: number;
425
+ to: number;
426
+ line: {
427
+ width: number;
428
+ color: string;
429
+ url: string;
430
+ height: number;
431
+ dx: number;
432
+ dy: number;
433
+ direction: string;
434
+ };
435
+ text: {
436
+ size: number;
437
+ color: string;
438
+ font: string;
439
+ outlineColor: string;
440
+ outlineWidth: number;
441
+ };
442
+ } | {
443
+ from: number;
444
+ to: number;
445
+ line: {
446
+ width: number;
447
+ color: string;
448
+ url?: undefined;
449
+ height?: undefined;
450
+ dx?: undefined;
451
+ dy?: undefined;
452
+ direction?: undefined;
453
+ };
454
+ text: {
455
+ size: number;
456
+ color: string;
457
+ font: string;
458
+ outlineColor: string;
459
+ outlineWidth: number;
460
+ };
461
+ } | {
462
+ from: number;
463
+ to: number;
464
+ line: {
465
+ width: number;
466
+ color: string;
467
+ url?: undefined;
468
+ height?: undefined;
469
+ dx?: undefined;
470
+ dy?: undefined;
471
+ direction?: undefined;
472
+ };
473
+ text?: undefined;
474
+ })[];
475
+ minor_road_restricted: ({
476
+ from: number;
477
+ to: number;
478
+ line: {
479
+ width: number;
480
+ color: string;
481
+ };
482
+ text: {
483
+ size: number;
484
+ color: string;
485
+ font: string;
486
+ };
487
+ } | {
488
+ from: number;
489
+ to: number;
490
+ line: {
491
+ width: number;
492
+ color: string;
493
+ };
494
+ text?: undefined;
495
+ })[];
496
+ residential_road: {
497
+ from: number;
498
+ to: number;
499
+ line: {
500
+ width: number;
501
+ color: string;
502
+ };
503
+ text: {
504
+ size: number;
505
+ color: string;
506
+ font: string;
507
+ outlineColor: string;
508
+ outlineWidth: number;
509
+ };
510
+ }[];
511
+ residential_road_oneway: ({
512
+ from: number;
513
+ to: number;
514
+ line: {
515
+ width: number;
516
+ color: string;
517
+ url: string;
518
+ height: number;
519
+ dx: number;
520
+ dy: number;
521
+ direction: string;
522
+ };
523
+ text: {
524
+ size: number;
525
+ color: string;
526
+ font: string;
527
+ outlineColor: string;
528
+ outlineWidth: number;
529
+ };
530
+ } | {
531
+ from: number;
532
+ to: number;
533
+ line: {
534
+ width: number;
535
+ color: string;
536
+ url?: undefined;
537
+ height?: undefined;
538
+ dx?: undefined;
539
+ dy?: undefined;
540
+ direction?: undefined;
541
+ };
542
+ text: {
543
+ size: number;
544
+ color: string;
545
+ font: string;
546
+ outlineColor: string;
547
+ outlineWidth: number;
548
+ };
549
+ })[];
550
+ residential_road_oneway_rev: ({
551
+ from: number;
552
+ to: number;
553
+ line: {
554
+ width: number;
555
+ color: string;
556
+ url: string;
557
+ height: number;
558
+ dx: number;
559
+ dy: number;
560
+ direction: string;
561
+ };
562
+ text: {
563
+ size: number;
564
+ color: string;
565
+ font: string;
566
+ outlineColor: string;
567
+ outlineWidth: number;
568
+ };
569
+ } | {
570
+ from: number;
571
+ to: number;
572
+ line: {
573
+ width: number;
574
+ color: string;
575
+ url?: undefined;
576
+ height?: undefined;
577
+ dx?: undefined;
578
+ dy?: undefined;
579
+ direction?: undefined;
580
+ };
581
+ text: {
582
+ size: number;
583
+ color: string;
584
+ font: string;
585
+ outlineColor: string;
586
+ outlineWidth: number;
587
+ };
588
+ })[];
589
+ rail: {
590
+ from: number;
591
+ to: number;
592
+ line: {
593
+ width: number;
594
+ color: string;
595
+ };
596
+ }[];
597
+ ferry: ({
598
+ from: number;
599
+ to: number;
600
+ line: {
601
+ width: number;
602
+ color: string;
603
+ };
604
+ text: {
605
+ size: number;
606
+ color: string;
607
+ font: string;
608
+ outlineColor: string;
609
+ outlineWidth: number;
610
+ };
611
+ } | {
612
+ from: number;
613
+ to: number;
614
+ line: {
615
+ width: number;
616
+ color: string;
617
+ };
618
+ text?: undefined;
619
+ })[];
620
+ interstateNumbers: {
621
+ from: number;
622
+ to: number;
623
+ image: {
624
+ url: string;
625
+ width: number;
626
+ height: number;
627
+ dx: number;
628
+ dy: number;
629
+ };
630
+ text: {
631
+ size: number;
632
+ color: string;
633
+ font: string;
634
+ };
635
+ }[];
636
+ };
637
+ };
638
+ export { RENDERING_CONFIG_GRAYSCALE };
@@ -0,0 +1,39 @@
1
+ declare const RENDERING_CONFIG_TRAFFIC: {
2
+ background: {
3
+ from: number;
4
+ to: number;
5
+ color: string;
6
+ }[];
7
+ layers: {
8
+ trafficFlowFast: string;
9
+ trafficFlowMedium: string;
10
+ trafficFlowSlow: string;
11
+ };
12
+ renderers: {
13
+ trafficFlowFast: {
14
+ from: number;
15
+ to: number;
16
+ line: {
17
+ color: string;
18
+ width: number;
19
+ };
20
+ }[];
21
+ trafficFlowMedium: {
22
+ from: number;
23
+ to: number;
24
+ line: {
25
+ color: string;
26
+ width: number;
27
+ };
28
+ }[];
29
+ trafficFlowSlow: {
30
+ from: number;
31
+ to: number;
32
+ line: {
33
+ color: string;
34
+ width: number;
35
+ };
36
+ }[];
37
+ };
38
+ };
39
+ export { RENDERING_CONFIG_TRAFFIC };
@@ -0,0 +1,9 @@
1
+ import { MapTripOpenLayersSource } from './api-extensions/openlayers/MapTripOpenLayersSource.js';
2
+ import { MapTripLeafletGridLayer } from './api-extensions/leaflet/MapTripLeafletGridLayer.js';
3
+ import { MapTripGoogleMapType } from './api-extensions/google/MapTripGoogleMapType.js';
4
+ import { RENDERING_CONFIG_TRAFFIC } from './core/rendering_config_traffic.js';
5
+ import { RENDERING_CONFIG_GRAYSCALE } from './core/rendering_config_grayscale.js';
6
+ import { RENDERING_CONFIG_DEFAULT } from './core/rendering_config_default.js';
7
+ import { VectorTileFactory } from './core/VectorTileFactory.js';
8
+ import type * as types from "./types/interfaces.js";
9
+ export { VectorTileFactory, RENDERING_CONFIG_DEFAULT, RENDERING_CONFIG_GRAYSCALE, RENDERING_CONFIG_TRAFFIC, MapTripLeafletGridLayer, MapTripGoogleMapType, MapTripOpenLayersSource, types, };