@maptrip/map-tiles 1.3.3 → 1.5.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.
package/README.md CHANGED
@@ -188,7 +188,7 @@ Please refer to the documentation of your API to see how you can implement your
188
188
  ## Map Data Providers
189
189
 
190
190
  The maps can be rendered with map data from various providers. To do this, set the property `provider`
191
- to one of the strings `TomTom`, `HERE` or `OpenStreetmap` when creating a factory:
191
+ to one of the strings `TomTom`, `Orbis`, `HERE` or `OpenStreetmap` when creating a factory:
192
192
 
193
193
  ```js
194
194
  const factory = VectorTileFactory.createFactory({
@@ -236,7 +236,7 @@ You can specify a third parameter with properties when creating the factory. The
236
236
 
237
237
  | Property | Description | Default Value |
238
238
  | ----------------- | ------------------------------------------------------------------------------------------------- | ------------------------ |
239
- | provider | The map data provider (`TomTom`, `HERE` or `OpenStreetmap`) | OpenStreetmap |
239
+ | provider | The map data provider (`TomTom`, `Orbis`, `HERE` or `OpenStreetmap`) | OpenStreetmap |
240
240
  | baseMap | Set to `false` for a traffic overlay which can be used on top of e.g. an aerial view | true |
241
241
  | traffic | Add traffic flows to the map tiles (only available for TomTom and HERE maps) | false |
242
242
  | timeout | Load timeout for tiles in milliseconds. Increase this if you have a very slow internet connection | 5000 |
@@ -278,6 +278,19 @@ To use them, you mapping API has to be able to use both base layers and overlays
278
278
 
279
279
  ## History
280
280
 
281
+ - 1.5.0
282
+ - Fixed rendering of urban green spaces
283
+ - Improved rendering of outlines
284
+ - Improved arrows of one way streets
285
+ - Minor roads: Added outline, standardized width for regular streets and one-way streets
286
+ - Residential roads: Added outline, standardized width for regular streets and one-way streets
287
+ - Improved rendering of railways
288
+ - Updated dependencies with security vulnerabilities
289
+ - 1.4.0:
290
+ - Added map data provider `Orbis`
291
+ - Added map data provider name to attribution
292
+ - Fixed rendering of polygons with rings (esp. small islands)
293
+ - Updated dependencies with security vulnerabilities
281
294
  - 1.3.3: Added a link for demo apps to README.md
282
295
  - 1.3.2: Updated dependencies with security vulnerabilities
283
296
  - 1.3.1: Updated all all providers to use the latest build of the project
@@ -26,6 +26,8 @@ declare class VectorTileFactory {
26
26
  private static getUrlTemplatesForBaseLayer;
27
27
  private static getUrlTemplatesForTrafficLayer;
28
28
  private static getRenderingConfig;
29
+ private createCanvas;
30
+ private cropCanvas;
29
31
  getJsonTile(z: number, x: number, y: number, token: string, callback?: SuccessCallback): HTMLCanvasElement;
30
32
  /**
31
33
  * @private
@@ -2,9 +2,14 @@ export declare const URL_TEMPLATE = "https://v${index}.maptrip.de/?tilex=${x}&ti
2
2
  export declare const PROVIDER_PROJECTS: {
3
3
  [key: string]: string;
4
4
  };
5
+ export declare const PROVIDER_NAMES: {
6
+ [key: string]: string;
7
+ };
5
8
  export declare const PROVIDER_TRAFFIC: {
6
9
  [key: string]: string | null;
7
10
  };
8
11
  export declare const MIN_ZOOM = 2;
9
12
  export declare const MAX_ZOOM = 18;
10
13
  export declare const ATTRIBUTION = "&#169;&nbsp;<a href=\"https://maptrip.de/\" target=\"_blank\">infoware GmbH</a>";
14
+ export declare const VECTOR_TILE_SIZE = 256;
15
+ export declare const VECTOR_TILE_RENDER_PADDING = 32;
@@ -352,6 +352,24 @@ declare const RENDERING_CONFIG_DEFAULT: {
352
352
  line: {
353
353
  width: number;
354
354
  color: string;
355
+ outlineColor: string;
356
+ outlineWidth: number;
357
+ };
358
+ text: {
359
+ size: number;
360
+ color: string;
361
+ font: string;
362
+ outlineColor: string;
363
+ outlineWidth: number;
364
+ };
365
+ } | {
366
+ from: number;
367
+ to: number;
368
+ line: {
369
+ width: number;
370
+ color: string;
371
+ outlineColor?: undefined;
372
+ outlineWidth?: undefined;
355
373
  };
356
374
  text: {
357
375
  size: number;
@@ -366,6 +384,8 @@ declare const RENDERING_CONFIG_DEFAULT: {
366
384
  line: {
367
385
  width: number;
368
386
  color: string;
387
+ outlineColor?: undefined;
388
+ outlineWidth?: undefined;
369
389
  };
370
390
  text?: undefined;
371
391
  })[];
@@ -376,10 +396,9 @@ declare const RENDERING_CONFIG_DEFAULT: {
376
396
  width: number;
377
397
  color: string;
378
398
  url: string;
379
- height: number;
380
- dx: number;
381
- dy: number;
382
399
  direction: string;
400
+ outlineColor: string;
401
+ outlineWidth: number;
383
402
  };
384
403
  text: {
385
404
  size: number;
@@ -395,10 +414,9 @@ declare const RENDERING_CONFIG_DEFAULT: {
395
414
  width: number;
396
415
  color: string;
397
416
  url?: undefined;
398
- height?: undefined;
399
- dx?: undefined;
400
- dy?: undefined;
401
417
  direction?: undefined;
418
+ outlineColor?: undefined;
419
+ outlineWidth?: undefined;
402
420
  };
403
421
  text: {
404
422
  size: number;
@@ -414,10 +432,9 @@ declare const RENDERING_CONFIG_DEFAULT: {
414
432
  width: number;
415
433
  color: string;
416
434
  url?: undefined;
417
- height?: undefined;
418
- dx?: undefined;
419
- dy?: undefined;
420
435
  direction?: undefined;
436
+ outlineColor?: undefined;
437
+ outlineWidth?: undefined;
421
438
  };
422
439
  text?: undefined;
423
440
  })[];
@@ -428,10 +445,9 @@ declare const RENDERING_CONFIG_DEFAULT: {
428
445
  width: number;
429
446
  color: string;
430
447
  url: string;
431
- height: number;
432
- dx: number;
433
- dy: number;
434
448
  direction: string;
449
+ outlineColor: string;
450
+ outlineWidth: number;
435
451
  };
436
452
  text: {
437
453
  size: number;
@@ -447,10 +463,9 @@ declare const RENDERING_CONFIG_DEFAULT: {
447
463
  width: number;
448
464
  color: string;
449
465
  url?: undefined;
450
- height?: undefined;
451
- dx?: undefined;
452
- dy?: undefined;
453
466
  direction?: undefined;
467
+ outlineColor?: undefined;
468
+ outlineWidth?: undefined;
454
469
  };
455
470
  text: {
456
471
  size: number;
@@ -466,10 +481,9 @@ declare const RENDERING_CONFIG_DEFAULT: {
466
481
  width: number;
467
482
  color: string;
468
483
  url?: undefined;
469
- height?: undefined;
470
- dx?: undefined;
471
- dy?: undefined;
472
484
  direction?: undefined;
485
+ outlineColor?: undefined;
486
+ outlineWidth?: undefined;
473
487
  };
474
488
  text?: undefined;
475
489
  })[];
@@ -518,9 +532,6 @@ declare const RENDERING_CONFIG_DEFAULT: {
518
532
  width: number;
519
533
  color: string;
520
534
  url: string;
521
- height: number;
522
- dx: number;
523
- dy: number;
524
535
  direction: string;
525
536
  };
526
537
  text: {
@@ -537,9 +548,6 @@ declare const RENDERING_CONFIG_DEFAULT: {
537
548
  width: number;
538
549
  color: string;
539
550
  url?: undefined;
540
- height?: undefined;
541
- dx?: undefined;
542
- dy?: undefined;
543
551
  direction?: undefined;
544
552
  };
545
553
  text: {
@@ -557,9 +565,6 @@ declare const RENDERING_CONFIG_DEFAULT: {
557
565
  width: number;
558
566
  color: string;
559
567
  url: string;
560
- height: number;
561
- dx: number;
562
- dy: number;
563
568
  direction: string;
564
569
  };
565
570
  text: {
@@ -576,9 +581,6 @@ declare const RENDERING_CONFIG_DEFAULT: {
576
581
  width: number;
577
582
  color: string;
578
583
  url?: undefined;
579
- height?: undefined;
580
- dx?: undefined;
581
- dy?: undefined;
582
584
  direction?: undefined;
583
585
  };
584
586
  text: {
@@ -606,14 +608,25 @@ declare const RENDERING_CONFIG_DEFAULT: {
606
608
  outlineWidth: number;
607
609
  };
608
610
  }[];
609
- rail: {
611
+ rail: ({
610
612
  from: number;
611
613
  to: number;
612
614
  line: {
613
615
  width: number;
614
616
  color: string;
617
+ dashColor: string;
618
+ dashLength: number;
615
619
  };
616
- }[];
620
+ } | {
621
+ from: number;
622
+ to: number;
623
+ line: {
624
+ width: number;
625
+ color: string;
626
+ dashLength: number;
627
+ dashColor?: undefined;
628
+ };
629
+ })[];
617
630
  ferry: ({
618
631
  from: number;
619
632
  to: number;
@@ -352,6 +352,24 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
352
352
  line: {
353
353
  width: number;
354
354
  color: string;
355
+ outlineColor: string;
356
+ outlineWidth: number;
357
+ };
358
+ text: {
359
+ size: number;
360
+ color: string;
361
+ font: string;
362
+ outlineColor: string;
363
+ outlineWidth: number;
364
+ };
365
+ } | {
366
+ from: number;
367
+ to: number;
368
+ line: {
369
+ width: number;
370
+ color: string;
371
+ outlineColor?: undefined;
372
+ outlineWidth?: undefined;
355
373
  };
356
374
  text: {
357
375
  size: number;
@@ -366,6 +384,8 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
366
384
  line: {
367
385
  width: number;
368
386
  color: string;
387
+ outlineColor?: undefined;
388
+ outlineWidth?: undefined;
369
389
  };
370
390
  text?: undefined;
371
391
  })[];
@@ -376,10 +396,9 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
376
396
  width: number;
377
397
  color: string;
378
398
  url: string;
379
- height: number;
380
- dx: number;
381
- dy: number;
382
399
  direction: string;
400
+ outlineColor: string;
401
+ outlineWidth: number;
383
402
  };
384
403
  text: {
385
404
  size: number;
@@ -395,10 +414,9 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
395
414
  width: number;
396
415
  color: string;
397
416
  url?: undefined;
398
- height?: undefined;
399
- dx?: undefined;
400
- dy?: undefined;
401
417
  direction?: undefined;
418
+ outlineColor?: undefined;
419
+ outlineWidth?: undefined;
402
420
  };
403
421
  text: {
404
422
  size: number;
@@ -414,10 +432,9 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
414
432
  width: number;
415
433
  color: string;
416
434
  url?: undefined;
417
- height?: undefined;
418
- dx?: undefined;
419
- dy?: undefined;
420
435
  direction?: undefined;
436
+ outlineColor?: undefined;
437
+ outlineWidth?: undefined;
421
438
  };
422
439
  text?: undefined;
423
440
  })[];
@@ -428,10 +445,9 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
428
445
  width: number;
429
446
  color: string;
430
447
  url: string;
431
- height: number;
432
- dx: number;
433
- dy: number;
434
448
  direction: string;
449
+ outlineColor: string;
450
+ outlineWidth: number;
435
451
  };
436
452
  text: {
437
453
  size: number;
@@ -447,10 +463,9 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
447
463
  width: number;
448
464
  color: string;
449
465
  url?: undefined;
450
- height?: undefined;
451
- dx?: undefined;
452
- dy?: undefined;
453
466
  direction?: undefined;
467
+ outlineColor?: undefined;
468
+ outlineWidth?: undefined;
454
469
  };
455
470
  text: {
456
471
  size: number;
@@ -466,10 +481,9 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
466
481
  width: number;
467
482
  color: string;
468
483
  url?: undefined;
469
- height?: undefined;
470
- dx?: undefined;
471
- dy?: undefined;
472
484
  direction?: undefined;
485
+ outlineColor?: undefined;
486
+ outlineWidth?: undefined;
473
487
  };
474
488
  text?: undefined;
475
489
  })[];
@@ -532,9 +546,6 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
532
546
  width: number;
533
547
  color: string;
534
548
  url: string;
535
- height: number;
536
- dx: number;
537
- dy: number;
538
549
  direction: string;
539
550
  };
540
551
  text: {
@@ -551,9 +562,6 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
551
562
  width: number;
552
563
  color: string;
553
564
  url?: undefined;
554
- height?: undefined;
555
- dx?: undefined;
556
- dy?: undefined;
557
565
  direction?: undefined;
558
566
  };
559
567
  text: {
@@ -571,9 +579,6 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
571
579
  width: number;
572
580
  color: string;
573
581
  url: string;
574
- height: number;
575
- dx: number;
576
- dy: number;
577
582
  direction: string;
578
583
  };
579
584
  text: {
@@ -590,9 +595,6 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
590
595
  width: number;
591
596
  color: string;
592
597
  url?: undefined;
593
- height?: undefined;
594
- dx?: undefined;
595
- dy?: undefined;
596
598
  direction?: undefined;
597
599
  };
598
600
  text: {
@@ -620,14 +622,25 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
620
622
  outlineWidth: number;
621
623
  };
622
624
  }[];
623
- rail: {
625
+ rail: ({
624
626
  from: number;
625
627
  to: number;
626
628
  line: {
627
629
  width: number;
628
630
  color: string;
631
+ dashColor: string;
632
+ dashLength: number;
629
633
  };
630
- }[];
634
+ } | {
635
+ from: number;
636
+ to: number;
637
+ line: {
638
+ width: number;
639
+ color: string;
640
+ dashLength: number;
641
+ dashColor?: undefined;
642
+ };
643
+ })[];
631
644
  ferry: ({
632
645
  from: number;
633
646
  to: number;