@maptrip/map-tiles 1.2.0 → 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.
package/README.md CHANGED
@@ -274,6 +274,7 @@ To use them, you mapping API has to be able to use both base layers and overlays
274
274
 
275
275
  ## History
276
276
 
277
+ - 1.2.1: Fixed a bug in MapTripLeafletGridLayer type implementation
277
278
  - 1.2.0: Added TypeScript declaration file
278
279
  - 1.1.1: Added rendering config for foot_path layer
279
280
  - 1.1.0: Added MapTrip detour profiles
@@ -1,4 +1,4 @@
1
- import { PointXY, RENDERING_CONFIG } from '../../types/interfaces.js';
1
+ import { RENDERING_CONFIG, PointXY } from '../../types/interfaces.js';
2
2
  import { VectorTileFactory } from '../../core/VectorTileFactory.js';
3
3
 
4
4
  declare class MapTripGoogleMapType {
@@ -1,4 +1,25 @@
1
+ import { PointXY, RENDERING_CONFIG } from '../../types/interfaces.js';
2
+ import { VectorTileFactory } from '../../core/VectorTileFactory.js';
1
3
  import { default as L } from 'leaflet';
2
4
 
3
- declare const MapTripLeafletGridLayer: (new (...args: any[]) => any) & typeof L.Class;
5
+ declare class MapTripLeafletGridLayer extends L.GridLayer {
6
+ MIN_ZOOM: number;
7
+ MAX_ZOOM: number;
8
+ token: string;
9
+ factory: VectorTileFactory;
10
+ constructor(options: {
11
+ provider?: string;
12
+ baseMap?: boolean;
13
+ traffic?: boolean;
14
+ timeout?: number;
15
+ parallelDownloads?: number;
16
+ detourProfile?: string;
17
+ renderingConfig?: RENDERING_CONFIG;
18
+ token?: string;
19
+ attribution?: string;
20
+ minZoom?: number;
21
+ maxZoom?: number;
22
+ });
23
+ createTile(coords: PointXY): HTMLCanvasElement;
24
+ }
4
25
  export { MapTripLeafletGridLayer };
@@ -1,4 +1,4 @@
1
- import { RENDERING_CONFIG, SuccessCallback, MapTilesProperties } from '../types/interfaces.js';
1
+ import { SuccessCallback, MapTilesProperties, RENDERING_CONFIG } from '../types/interfaces.js';
2
2
 
3
3
  /**
4
4
  * Creates a factory to create tiles from the provided URL templates.
@@ -1,4 +1,4 @@
1
- import { Boundaries, PointXY, PolygonStyle, PolylineStyle, PolylineTextStyle, PositionXY, RENDERING_CONFIG, Renderer, Vertex } from '../types/interfaces.js';
1
+ import { Boundaries, PointXY, PolygonStyle, PolylineStyle, PolylineTextStyle, PositionXY, Renderer, Vertex, RENDERING_CONFIG } from '../types/interfaces.js';
2
2
  import { CollisionDetector } from './CollisionDetector.js';
3
3
  import { GeoJsonProperties } from 'geojson';
4
4
 
@@ -21,6 +21,7 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
21
21
  residential_road: string;
22
22
  residential_road_oneway: string;
23
23
  residential_road_oneway_rev: string;
24
+ foot_path: string;
24
25
  ferry: string;
25
26
  rail: string;
26
27
  capital: string;
@@ -483,6 +484,22 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
483
484
  size: number;
484
485
  color: string;
485
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;
486
503
  };
487
504
  } | {
488
505
  from: number;
@@ -586,6 +603,23 @@ declare const RENDERING_CONFIG_GRAYSCALE: {
586
603
  outlineWidth: number;
587
604
  };
588
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
+ }[];
589
623
  rail: {
590
624
  from: number;
591
625
  to: number;
@@ -5,5 +5,5 @@ import { RENDERING_CONFIG_TRAFFIC } from './core/rendering_config_traffic.js';
5
5
  import { RENDERING_CONFIG_GRAYSCALE } from './core/rendering_config_grayscale.js';
6
6
  import { RENDERING_CONFIG_DEFAULT } from './core/rendering_config_default.js';
7
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, };
8
+
9
+ export { VectorTileFactory, RENDERING_CONFIG_DEFAULT, RENDERING_CONFIG_GRAYSCALE, RENDERING_CONFIG_TRAFFIC, MapTripLeafletGridLayer, MapTripGoogleMapType, MapTripOpenLayersSource, };