@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 +1 -0
- package/dist/api-extensions/google/MapTripGoogleMapType.d.ts +1 -1
- package/dist/api-extensions/leaflet/MapTripLeafletGridLayer.d.ts +22 -1
- package/dist/core/VectorTileFactory.d.ts +1 -1
- package/dist/core/VectorTileRenderer.d.ts +1 -1
- package/dist/core/rendering_config_grayscale.d.ts +34 -0
- package/dist/map-tiles.d.ts +2 -2
- package/dist/map-tiles.js +884 -861
- package/dist/map-tiles.js.map +1 -1
- package/dist/types/interfaces.d.ts +8 -9
- package/lib/api-extensions/google/MapTripGoogleMapType.ts +4 -1
- package/lib/api-extensions/leaflet/MapTripLeafletGridLayer.ts +29 -25
- package/lib/api-extensions/openlayers/MapTripOpenLayersSource.ts +1 -0
- package/lib/core/VectorTileFactory.ts +16 -12
- package/lib/core/VectorTileRenderer.ts +13 -5
- package/lib/core/rendering_config_grayscale.ts +1126 -1104
- package/lib/main.ts +0 -2
- package/lib/types/interfaces.ts +10 -10
- package/package.json +5 -5
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,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
|
|
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 {
|
|
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,
|
|
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;
|
package/dist/map-tiles.d.ts
CHANGED
|
@@ -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
|
-
|
|
9
|
-
export { VectorTileFactory, RENDERING_CONFIG_DEFAULT, RENDERING_CONFIG_GRAYSCALE, RENDERING_CONFIG_TRAFFIC, MapTripLeafletGridLayer, MapTripGoogleMapType, MapTripOpenLayersSource,
|
|
8
|
+
|
|
9
|
+
export { VectorTileFactory, RENDERING_CONFIG_DEFAULT, RENDERING_CONFIG_GRAYSCALE, RENDERING_CONFIG_TRAFFIC, MapTripLeafletGridLayer, MapTripGoogleMapType, MapTripOpenLayersSource, };
|