@maptiler/client 2.5.1 → 2.6.0-rc.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/CHANGELOG.md +12 -0
- package/dist/maptiler-client.cjs +116 -18
- package/dist/maptiler-client.cjs.map +1 -1
- package/dist/maptiler-client.d.ts +58 -7
- package/dist/maptiler-client.min.mjs +1 -1
- package/dist/maptiler-client.mjs +116 -18
- package/dist/maptiler-client.mjs.map +1 -1
- package/package.json +1 -1
- package/readme.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# MapTiler Client Changelog
|
|
2
2
|
|
|
3
|
+
## 2.6.0
|
|
4
|
+
### New Features
|
|
5
|
+
- Bumps 'Streets' & 'Landscape' styles (and their variants) to new v4 styles.
|
|
6
|
+
- Adds the new 'Base' style and its variants.
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
None
|
|
10
|
+
|
|
11
|
+
### Others
|
|
12
|
+
- Adds custom deprecation warnings.
|
|
13
|
+
- Deprecates the older v2 styles and adds warnings regarding their usage.
|
|
14
|
+
|
|
3
15
|
## 2.5.1
|
|
4
16
|
### New Features
|
|
5
17
|
None
|
package/dist/maptiler-client.cjs
CHANGED
|
@@ -1289,7 +1289,7 @@ function expandMapStyle(style) {
|
|
|
1289
1289
|
return expandedStyle;
|
|
1290
1290
|
}
|
|
1291
1291
|
class MapStyleVariant {
|
|
1292
|
-
constructor(name, variantType, id, referenceStyle, description, imageURL, deprecated = false) {
|
|
1292
|
+
constructor(name, variantType, id, referenceStyle, description, imageURL, deprecated = false, deprecationMessage) {
|
|
1293
1293
|
this.name = name;
|
|
1294
1294
|
this.variantType = variantType;
|
|
1295
1295
|
this.id = id;
|
|
@@ -1297,6 +1297,7 @@ class MapStyleVariant {
|
|
|
1297
1297
|
this.description = description;
|
|
1298
1298
|
this.imageURL = imageURL;
|
|
1299
1299
|
this.deprecated = deprecated;
|
|
1300
|
+
this.deprecationMessage = deprecationMessage;
|
|
1300
1301
|
}
|
|
1301
1302
|
/**
|
|
1302
1303
|
* Get the human-friendly name
|
|
@@ -1382,10 +1383,14 @@ class MapStyleVariant {
|
|
|
1382
1383
|
warnIfDeprecated(variant = this) {
|
|
1383
1384
|
if (!variant.deprecated)
|
|
1384
1385
|
return variant;
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1386
|
+
if (variant.deprecationMessage) {
|
|
1387
|
+
console.warn(variant.deprecationMessage);
|
|
1388
|
+
} else {
|
|
1389
|
+
const name = variant.getFullName();
|
|
1390
|
+
console.warn(
|
|
1391
|
+
`Style "${name}" is deprecated and will be removed in a future version.`
|
|
1392
|
+
);
|
|
1393
|
+
}
|
|
1389
1394
|
return variant;
|
|
1390
1395
|
}
|
|
1391
1396
|
}
|
|
@@ -1463,37 +1468,103 @@ const mapStylePresetList = [
|
|
|
1463
1468
|
description: "",
|
|
1464
1469
|
variants: [
|
|
1465
1470
|
{
|
|
1466
|
-
id: "streets-
|
|
1471
|
+
id: "streets-v4",
|
|
1467
1472
|
name: "Default",
|
|
1468
1473
|
variantType: "DEFAULT",
|
|
1469
1474
|
description: "",
|
|
1470
1475
|
imageURL: ""
|
|
1471
1476
|
},
|
|
1472
1477
|
{
|
|
1473
|
-
id: "streets-
|
|
1478
|
+
id: "streets-v4-dark",
|
|
1474
1479
|
name: "Dark",
|
|
1475
1480
|
variantType: "DARK",
|
|
1476
1481
|
description: "",
|
|
1477
1482
|
imageURL: ""
|
|
1478
1483
|
},
|
|
1479
1484
|
{
|
|
1480
|
-
id: "streets-
|
|
1481
|
-
name: "
|
|
1482
|
-
variantType: "
|
|
1485
|
+
id: "streets-v4-pastel",
|
|
1486
|
+
name: "Pastel",
|
|
1487
|
+
variantType: "PASTEL",
|
|
1483
1488
|
description: "",
|
|
1484
1489
|
imageURL: ""
|
|
1485
1490
|
},
|
|
1491
|
+
{
|
|
1492
|
+
id: "streets-v2",
|
|
1493
|
+
name: "Default v2",
|
|
1494
|
+
variantType: "DEFAULT_V2",
|
|
1495
|
+
description: "",
|
|
1496
|
+
imageURL: "",
|
|
1497
|
+
deprecated: true,
|
|
1498
|
+
deprecationMessage: `"streets-v2" is deprecated, use "streets-v4" instead`
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
id: "streets-v2-dark",
|
|
1502
|
+
name: "Dark v2",
|
|
1503
|
+
variantType: "DARK_V2",
|
|
1504
|
+
description: "",
|
|
1505
|
+
imageURL: "",
|
|
1506
|
+
deprecated: true,
|
|
1507
|
+
deprecationMessage: `"streets-v2-dark" is deprecated, use "streets-v4-dark" instead`
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
id: "streets-v2-light",
|
|
1511
|
+
name: "Light v2",
|
|
1512
|
+
variantType: "LIGHT_V2",
|
|
1513
|
+
description: "",
|
|
1514
|
+
imageURL: "",
|
|
1515
|
+
deprecated: true,
|
|
1516
|
+
deprecationMessage: `"streets-v2-light" is deprecated, use "streets-v4-light" instead`
|
|
1517
|
+
},
|
|
1486
1518
|
{
|
|
1487
1519
|
id: "streets-v2-night",
|
|
1488
|
-
name: "Night",
|
|
1489
|
-
variantType: "
|
|
1520
|
+
name: "Night v2",
|
|
1521
|
+
variantType: "NIGHT_V2",
|
|
1490
1522
|
description: "",
|
|
1491
|
-
imageURL: ""
|
|
1523
|
+
imageURL: "",
|
|
1524
|
+
deprecated: true,
|
|
1525
|
+
deprecationMessage: `"streets-v2-night" is deprecated, use "streets-v4-night" instead`
|
|
1492
1526
|
},
|
|
1493
1527
|
{
|
|
1494
1528
|
id: "streets-v2-pastel",
|
|
1495
|
-
name: "Pastel",
|
|
1496
|
-
variantType: "
|
|
1529
|
+
name: "Pastel v2",
|
|
1530
|
+
variantType: "PASTEL_V2",
|
|
1531
|
+
description: "",
|
|
1532
|
+
imageURL: "",
|
|
1533
|
+
deprecated: true,
|
|
1534
|
+
deprecationMessage: `"streets-v2-pastel" is deprecated, use "streets-v4-pastel" instead`
|
|
1535
|
+
}
|
|
1536
|
+
]
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
referenceStyleID: "BASE",
|
|
1540
|
+
name: "Base",
|
|
1541
|
+
description: "",
|
|
1542
|
+
variants: [
|
|
1543
|
+
{
|
|
1544
|
+
id: "base-v4",
|
|
1545
|
+
name: "Default",
|
|
1546
|
+
variantType: "DEFAULT",
|
|
1547
|
+
description: "",
|
|
1548
|
+
imageURL: ""
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
id: "base-v4-dark",
|
|
1552
|
+
name: "Dark",
|
|
1553
|
+
variantType: "DARK",
|
|
1554
|
+
description: "",
|
|
1555
|
+
imageURL: ""
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
id: "base-v4-light",
|
|
1559
|
+
name: "Light",
|
|
1560
|
+
variantType: "LIGHT",
|
|
1561
|
+
description: "",
|
|
1562
|
+
imageURL: ""
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
id: "base-v4-ai",
|
|
1566
|
+
name: "Night",
|
|
1567
|
+
variantType: "NIGHT",
|
|
1497
1568
|
description: "",
|
|
1498
1569
|
imageURL: ""
|
|
1499
1570
|
}
|
|
@@ -1869,25 +1940,52 @@ const mapStylePresetList = [
|
|
|
1869
1940
|
description: "Terrain map for data overlays and visualisations",
|
|
1870
1941
|
variants: [
|
|
1871
1942
|
{
|
|
1872
|
-
id: "landscape",
|
|
1943
|
+
id: "landscape-v4",
|
|
1873
1944
|
name: "Default",
|
|
1874
1945
|
variantType: "DEFAULT",
|
|
1875
1946
|
description: "",
|
|
1876
1947
|
imageURL: ""
|
|
1877
1948
|
},
|
|
1878
1949
|
{
|
|
1879
|
-
id: "landscape-dark",
|
|
1950
|
+
id: "landscape-v4-dark",
|
|
1880
1951
|
name: "Dark",
|
|
1881
1952
|
variantType: "DARK",
|
|
1882
1953
|
description: "",
|
|
1883
1954
|
imageURL: ""
|
|
1884
1955
|
},
|
|
1885
1956
|
{
|
|
1886
|
-
id: "landscape-vivid",
|
|
1957
|
+
id: "landscape-v4-vivid",
|
|
1887
1958
|
name: "Vivid",
|
|
1888
1959
|
variantType: "VIVID",
|
|
1889
1960
|
description: "",
|
|
1890
1961
|
imageURL: ""
|
|
1962
|
+
},
|
|
1963
|
+
{
|
|
1964
|
+
id: "landscape",
|
|
1965
|
+
name: "Default",
|
|
1966
|
+
variantType: "DEFAULT_V2",
|
|
1967
|
+
description: "",
|
|
1968
|
+
imageURL: "",
|
|
1969
|
+
deprecated: true,
|
|
1970
|
+
deprecationMessage: `"landscape" is deprecated, use "landscape-v4" instead`
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
id: "landscape-dark",
|
|
1974
|
+
name: "Dark",
|
|
1975
|
+
variantType: "DARK_V2",
|
|
1976
|
+
description: "",
|
|
1977
|
+
imageURL: "",
|
|
1978
|
+
deprecated: true,
|
|
1979
|
+
deprecationMessage: `"landscape-dark" is deprecated, use "landscape-v4-dark" instead`
|
|
1980
|
+
},
|
|
1981
|
+
{
|
|
1982
|
+
id: "landscape-vivid",
|
|
1983
|
+
name: "Vivid",
|
|
1984
|
+
variantType: "VIVID_V2",
|
|
1985
|
+
description: "",
|
|
1986
|
+
imageURL: "",
|
|
1987
|
+
deprecated: true,
|
|
1988
|
+
deprecationMessage: `"landscape-vivid" is deprecated, use "landscape-v4-vivid" instead`
|
|
1891
1989
|
}
|
|
1892
1990
|
]
|
|
1893
1991
|
}
|