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