@maptiler/client 2.6.0 → 2.7.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/.github/workflows/format-lint.yml +6 -3
- package/CHANGELOG.md +49 -0
- package/dist/maptiler-client.cjs +337 -41
- package/dist/maptiler-client.cjs.map +1 -1
- package/dist/maptiler-client.d.ts +726 -341
- package/dist/maptiler-client.min.mjs +1 -1
- package/dist/maptiler-client.mjs +337 -41
- package/dist/maptiler-client.mjs.map +1 -1
- package/package.json +1 -1
- package/readme.md +147 -61
package/dist/maptiler-client.mjs
CHANGED
|
@@ -1460,7 +1460,7 @@ class ReferenceMapStyle {
|
|
|
1460
1460
|
return this.orderedVariants[0].warnIfDeprecated();
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
const
|
|
1463
|
+
const MAP_STYLE_CONFIG = [
|
|
1464
1464
|
{
|
|
1465
1465
|
referenceStyleID: "STREETS_V2",
|
|
1466
1466
|
name: "Streets",
|
|
@@ -1570,7 +1570,7 @@ const mapStylePresetList = [
|
|
|
1570
1570
|
{
|
|
1571
1571
|
id: "base-v4-ai",
|
|
1572
1572
|
name: "Base AI",
|
|
1573
|
-
variantType: "
|
|
1573
|
+
variantType: "AI",
|
|
1574
1574
|
description: "",
|
|
1575
1575
|
imageURL: ""
|
|
1576
1576
|
}
|
|
@@ -1586,19 +1586,23 @@ const mapStylePresetList = [
|
|
|
1586
1586
|
name: "Default",
|
|
1587
1587
|
variantType: "DEFAULT",
|
|
1588
1588
|
description: "",
|
|
1589
|
-
imageURL: ""
|
|
1589
|
+
imageURL: "",
|
|
1590
|
+
deprecated: true,
|
|
1591
|
+
deprecationMessage: `"outdoor-v2" is deprecated, use "outdoor-v4" instead`
|
|
1590
1592
|
},
|
|
1591
1593
|
{
|
|
1592
1594
|
id: "outdoor-v2-dark",
|
|
1593
1595
|
name: "Dark",
|
|
1594
1596
|
variantType: "DARK",
|
|
1595
1597
|
description: "",
|
|
1596
|
-
imageURL: ""
|
|
1598
|
+
imageURL: "",
|
|
1599
|
+
deprecated: true,
|
|
1600
|
+
deprecationMessage: `"outdoor-v2-dark" is deprecated, use "outdoor-v4-dark" instead`
|
|
1597
1601
|
}
|
|
1598
1602
|
]
|
|
1599
1603
|
},
|
|
1600
1604
|
{
|
|
1601
|
-
referenceStyleID: "
|
|
1605
|
+
referenceStyleID: "WINTER_V2",
|
|
1602
1606
|
name: "Winter",
|
|
1603
1607
|
description: "",
|
|
1604
1608
|
variants: [
|
|
@@ -1608,6 +1612,9 @@ const mapStylePresetList = [
|
|
|
1608
1612
|
variantType: "DEFAULT",
|
|
1609
1613
|
description: "",
|
|
1610
1614
|
imageURL: ""
|
|
1615
|
+
// this is not deprecated yet...
|
|
1616
|
+
// deprecated: true,
|
|
1617
|
+
// deprecationMessage: `"winter-v2" is deprecated, use "winter-v4" instead`,
|
|
1611
1618
|
},
|
|
1612
1619
|
{
|
|
1613
1620
|
id: "winter-v2-dark",
|
|
@@ -1615,11 +1622,35 @@ const mapStylePresetList = [
|
|
|
1615
1622
|
variantType: "DARK",
|
|
1616
1623
|
description: "",
|
|
1617
1624
|
imageURL: ""
|
|
1625
|
+
// this is not deprecated yet...
|
|
1626
|
+
// deprecated: true,
|
|
1627
|
+
// deprecationMessage: `"winter-v2-dark" is deprecated, use "winter-v4-dark" instead`,
|
|
1628
|
+
}
|
|
1629
|
+
]
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
referenceStyleID: "WINTER_V4",
|
|
1633
|
+
name: "Winter",
|
|
1634
|
+
description: "",
|
|
1635
|
+
variants: [
|
|
1636
|
+
{
|
|
1637
|
+
id: "winter-v4",
|
|
1638
|
+
name: "Default",
|
|
1639
|
+
variantType: "DEFAULT",
|
|
1640
|
+
description: "",
|
|
1641
|
+
imageURL: ""
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
id: "winter-v4-dark",
|
|
1645
|
+
name: "Dark",
|
|
1646
|
+
variantType: "DARK",
|
|
1647
|
+
description: "",
|
|
1648
|
+
imageURL: ""
|
|
1618
1649
|
}
|
|
1619
1650
|
]
|
|
1620
1651
|
},
|
|
1621
1652
|
{
|
|
1622
|
-
referenceStyleID: "
|
|
1653
|
+
referenceStyleID: "SATELLITE_V2",
|
|
1623
1654
|
name: "Satellite",
|
|
1624
1655
|
description: "",
|
|
1625
1656
|
variants: [
|
|
@@ -1628,12 +1659,14 @@ const mapStylePresetList = [
|
|
|
1628
1659
|
name: "Default",
|
|
1629
1660
|
variantType: "DEFAULT",
|
|
1630
1661
|
description: "",
|
|
1631
|
-
imageURL: ""
|
|
1662
|
+
imageURL: "",
|
|
1663
|
+
deprecated: true,
|
|
1664
|
+
deprecationMessage: `"satellite" is deprecated, use "satellite-v4" instead`
|
|
1632
1665
|
}
|
|
1633
1666
|
]
|
|
1634
1667
|
},
|
|
1635
1668
|
{
|
|
1636
|
-
referenceStyleID: "
|
|
1669
|
+
referenceStyleID: "HYBRID_V2",
|
|
1637
1670
|
name: "Hybrid",
|
|
1638
1671
|
description: "",
|
|
1639
1672
|
variants: [
|
|
@@ -1646,6 +1679,25 @@ const mapStylePresetList = [
|
|
|
1646
1679
|
}
|
|
1647
1680
|
]
|
|
1648
1681
|
},
|
|
1682
|
+
{
|
|
1683
|
+
referenceStyleID: "HYBRID_V4",
|
|
1684
|
+
name: "Hybrid",
|
|
1685
|
+
description: "",
|
|
1686
|
+
variants: [
|
|
1687
|
+
{
|
|
1688
|
+
id: "hybrid-v4",
|
|
1689
|
+
name: "Default",
|
|
1690
|
+
variantType: "DEFAULT",
|
|
1691
|
+
imageURL: ""
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
id: "hybrid-v4-dark",
|
|
1695
|
+
name: "Dark",
|
|
1696
|
+
variantType: "DARK",
|
|
1697
|
+
imageURL: ""
|
|
1698
|
+
}
|
|
1699
|
+
]
|
|
1700
|
+
},
|
|
1649
1701
|
{
|
|
1650
1702
|
referenceStyleID: "BASIC_V2",
|
|
1651
1703
|
name: "Basic",
|
|
@@ -1658,21 +1710,24 @@ const mapStylePresetList = [
|
|
|
1658
1710
|
description: "",
|
|
1659
1711
|
imageURL: "",
|
|
1660
1712
|
deprecated: true,
|
|
1661
|
-
deprecationMessage: `"basic-v2" is deprecated, use "
|
|
1713
|
+
deprecationMessage: `"basic-v2" is deprecated, use "base-v4" instead`
|
|
1662
1714
|
},
|
|
1663
1715
|
{
|
|
1664
1716
|
id: "basic-v2-dark",
|
|
1665
1717
|
name: "Dark",
|
|
1666
1718
|
variantType: "DARK",
|
|
1667
1719
|
description: "",
|
|
1668
|
-
imageURL: ""
|
|
1720
|
+
imageURL: "",
|
|
1721
|
+
deprecationMessage: `"basic-v2" is deprecated, use "base-v4" instead`
|
|
1669
1722
|
},
|
|
1670
1723
|
{
|
|
1671
1724
|
id: "basic-v2-light",
|
|
1672
1725
|
name: "Light",
|
|
1673
1726
|
variantType: "LIGHT",
|
|
1674
1727
|
description: "",
|
|
1675
|
-
imageURL: ""
|
|
1728
|
+
imageURL: "",
|
|
1729
|
+
deprecated: true,
|
|
1730
|
+
deprecationMessage: `"basic-v2" is deprecated, use "base-v4" instead`
|
|
1676
1731
|
}
|
|
1677
1732
|
]
|
|
1678
1733
|
},
|
|
@@ -1712,7 +1767,7 @@ const mapStylePresetList = [
|
|
|
1712
1767
|
]
|
|
1713
1768
|
},
|
|
1714
1769
|
{
|
|
1715
|
-
referenceStyleID: "
|
|
1770
|
+
referenceStyleID: "OPENSTREETMAP_V2",
|
|
1716
1771
|
name: "OpenStreetMap",
|
|
1717
1772
|
description: "",
|
|
1718
1773
|
variants: [
|
|
@@ -1722,11 +1777,18 @@ const mapStylePresetList = [
|
|
|
1722
1777
|
variantType: "DEFAULT",
|
|
1723
1778
|
description: "",
|
|
1724
1779
|
imageURL: ""
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
id: "openstreetmap-dark",
|
|
1783
|
+
name: "Dark",
|
|
1784
|
+
variantType: "DARK",
|
|
1785
|
+
description: "",
|
|
1786
|
+
imageURL: ""
|
|
1725
1787
|
}
|
|
1726
1788
|
]
|
|
1727
1789
|
},
|
|
1728
1790
|
{
|
|
1729
|
-
referenceStyleID: "
|
|
1791
|
+
referenceStyleID: "TOPO_V2",
|
|
1730
1792
|
name: "Topo",
|
|
1731
1793
|
description: "",
|
|
1732
1794
|
variants: [
|
|
@@ -1735,41 +1797,49 @@ const mapStylePresetList = [
|
|
|
1735
1797
|
name: "Default",
|
|
1736
1798
|
variantType: "DEFAULT",
|
|
1737
1799
|
description: "",
|
|
1738
|
-
imageURL: ""
|
|
1800
|
+
imageURL: "",
|
|
1801
|
+
deprecated: true,
|
|
1802
|
+
deprecationMessage: `"topo-v2" is deprecated, use "topo-v4" instead`
|
|
1739
1803
|
},
|
|
1740
1804
|
{
|
|
1741
1805
|
id: "topo-v2-dark",
|
|
1742
1806
|
name: "Dark",
|
|
1743
1807
|
variantType: "DARK",
|
|
1744
1808
|
description: "",
|
|
1745
|
-
imageURL: ""
|
|
1809
|
+
imageURL: "",
|
|
1810
|
+
deprecated: true,
|
|
1811
|
+
deprecationMessage: `"topo-v2-dark" is deprecated, use "topo-v4-dark" instead`
|
|
1746
1812
|
},
|
|
1747
1813
|
{
|
|
1748
1814
|
id: "topo-v2-shiny",
|
|
1749
1815
|
name: "Shiny",
|
|
1750
|
-
deprecated: true,
|
|
1751
1816
|
variantType: "SHINY",
|
|
1752
1817
|
description: "",
|
|
1753
|
-
imageURL: ""
|
|
1818
|
+
imageURL: "",
|
|
1819
|
+
deprecated: true
|
|
1754
1820
|
},
|
|
1755
1821
|
{
|
|
1756
1822
|
id: "topo-v2-pastel",
|
|
1757
1823
|
name: "Pastel",
|
|
1758
1824
|
variantType: "PASTEL",
|
|
1759
1825
|
description: "",
|
|
1760
|
-
imageURL: ""
|
|
1826
|
+
imageURL: "",
|
|
1827
|
+
deprecated: true,
|
|
1828
|
+
deprecationMessage: `"topo-v2-pastel" is deprecated, use "topo-v4-pastel" instead`
|
|
1761
1829
|
},
|
|
1762
1830
|
{
|
|
1763
1831
|
id: "topo-v2-topographique",
|
|
1764
1832
|
name: "Topographique",
|
|
1765
1833
|
variantType: "TOPOGRAPHIQUE",
|
|
1766
1834
|
description: "",
|
|
1767
|
-
imageURL: ""
|
|
1835
|
+
imageURL: "",
|
|
1836
|
+
deprecated: true,
|
|
1837
|
+
deprecationMessage: `"topo-v2-topographique" is deprecated, use "topo-v4-topographique" instead`
|
|
1768
1838
|
}
|
|
1769
1839
|
]
|
|
1770
1840
|
},
|
|
1771
1841
|
{
|
|
1772
|
-
referenceStyleID: "
|
|
1842
|
+
referenceStyleID: "VOYAGER_V2",
|
|
1773
1843
|
name: "Voyager",
|
|
1774
1844
|
description: "",
|
|
1775
1845
|
variants: [
|
|
@@ -1808,16 +1878,20 @@ const mapStylePresetList = [
|
|
|
1808
1878
|
]
|
|
1809
1879
|
},
|
|
1810
1880
|
{
|
|
1811
|
-
referenceStyleID: "
|
|
1881
|
+
referenceStyleID: "TONER_V2",
|
|
1812
1882
|
name: "Toner",
|
|
1813
1883
|
description: "",
|
|
1884
|
+
deprecated: true,
|
|
1885
|
+
deprecationMessage: `"toner-v2" is deprecated, and will be no longer be a default style in the future`,
|
|
1814
1886
|
variants: [
|
|
1815
1887
|
{
|
|
1816
1888
|
id: "toner-v2",
|
|
1817
1889
|
name: "Default",
|
|
1818
1890
|
variantType: "DEFAULT",
|
|
1819
1891
|
description: "",
|
|
1820
|
-
imageURL: ""
|
|
1892
|
+
imageURL: "",
|
|
1893
|
+
deprecated: true,
|
|
1894
|
+
deprecationMessage: `"toner-v2" is deprecated, and may be removed in future versions.`
|
|
1821
1895
|
},
|
|
1822
1896
|
{
|
|
1823
1897
|
id: "toner-v2-background",
|
|
@@ -1825,27 +1899,31 @@ const mapStylePresetList = [
|
|
|
1825
1899
|
variantType: "BACKGROUND",
|
|
1826
1900
|
deprecated: true,
|
|
1827
1901
|
description: "",
|
|
1828
|
-
imageURL: ""
|
|
1902
|
+
imageURL: "",
|
|
1903
|
+
deprecationMessage: `"toner-v2-background" is deprecated, and may be removed in future versions.`
|
|
1829
1904
|
},
|
|
1830
1905
|
{
|
|
1831
1906
|
id: "toner-v2-lite",
|
|
1832
1907
|
name: "Lite",
|
|
1833
1908
|
variantType: "LITE",
|
|
1834
1909
|
description: "",
|
|
1835
|
-
imageURL: ""
|
|
1910
|
+
imageURL: "",
|
|
1911
|
+
deprecated: true,
|
|
1912
|
+
deprecationMessage: `"toner-v2-lite" is deprecated, and may be removed in future versions.`
|
|
1836
1913
|
},
|
|
1837
1914
|
{
|
|
1838
1915
|
id: "toner-v2-lines",
|
|
1839
1916
|
name: "Lines",
|
|
1840
1917
|
variantType: "LINES",
|
|
1841
|
-
deprecated: true,
|
|
1842
1918
|
description: "",
|
|
1843
|
-
imageURL: ""
|
|
1919
|
+
imageURL: "",
|
|
1920
|
+
deprecated: true,
|
|
1921
|
+
deprecationMessage: `"toner-v2-lines" is deprecated, and may be removed in future versions.`
|
|
1844
1922
|
}
|
|
1845
1923
|
]
|
|
1846
1924
|
},
|
|
1847
1925
|
{
|
|
1848
|
-
referenceStyleID: "
|
|
1926
|
+
referenceStyleID: "DATAVIZ_V2",
|
|
1849
1927
|
name: "Dataviz",
|
|
1850
1928
|
description: "",
|
|
1851
1929
|
variants: [
|
|
@@ -1854,26 +1932,32 @@ const mapStylePresetList = [
|
|
|
1854
1932
|
name: "Default",
|
|
1855
1933
|
variantType: "DEFAULT",
|
|
1856
1934
|
description: "",
|
|
1857
|
-
imageURL: ""
|
|
1935
|
+
imageURL: "",
|
|
1936
|
+
deprecated: true,
|
|
1937
|
+
deprecationMessage: `"dataviz" is deprecated, use "dataviz-v4" instead`
|
|
1858
1938
|
},
|
|
1859
1939
|
{
|
|
1860
1940
|
id: "dataviz-dark",
|
|
1861
1941
|
name: "Dark",
|
|
1862
1942
|
variantType: "DARK",
|
|
1863
1943
|
description: "",
|
|
1864
|
-
imageURL: ""
|
|
1944
|
+
imageURL: "",
|
|
1945
|
+
deprecated: true,
|
|
1946
|
+
deprecationMessage: `"dataviz-dark" is deprecated, use "dataviz-v4-dark" instead`
|
|
1865
1947
|
},
|
|
1866
1948
|
{
|
|
1867
1949
|
id: "dataviz-light",
|
|
1868
1950
|
name: "Light",
|
|
1869
1951
|
variantType: "LIGHT",
|
|
1870
1952
|
description: "",
|
|
1871
|
-
imageURL: ""
|
|
1953
|
+
imageURL: "",
|
|
1954
|
+
deprecated: true,
|
|
1955
|
+
deprecationMessage: `"dataviz-light" is deprecated, use "dataviz-v4-light" instead`
|
|
1872
1956
|
}
|
|
1873
1957
|
]
|
|
1874
1958
|
},
|
|
1875
1959
|
{
|
|
1876
|
-
referenceStyleID: "
|
|
1960
|
+
referenceStyleID: "BACKDROP_V2",
|
|
1877
1961
|
name: "Backdrop",
|
|
1878
1962
|
description: "",
|
|
1879
1963
|
variants: [
|
|
@@ -1882,26 +1966,32 @@ const mapStylePresetList = [
|
|
|
1882
1966
|
name: "Default",
|
|
1883
1967
|
variantType: "DEFAULT",
|
|
1884
1968
|
description: "",
|
|
1885
|
-
imageURL: ""
|
|
1969
|
+
imageURL: "",
|
|
1970
|
+
deprecated: true,
|
|
1971
|
+
deprecationMessage: `"backdrop" is deprecated, use "backdrop-v4" instead`
|
|
1886
1972
|
},
|
|
1887
1973
|
{
|
|
1888
1974
|
id: "backdrop-dark",
|
|
1889
1975
|
name: "Dark",
|
|
1890
1976
|
variantType: "DARK",
|
|
1891
1977
|
description: "",
|
|
1892
|
-
imageURL: ""
|
|
1978
|
+
imageURL: "",
|
|
1979
|
+
deprecated: true,
|
|
1980
|
+
deprecationMessage: `"backdrop-dark" is deprecated, use "backdrop-v4-dark" instead`
|
|
1893
1981
|
},
|
|
1894
1982
|
{
|
|
1895
1983
|
id: "backdrop-light",
|
|
1896
1984
|
name: "Light",
|
|
1897
1985
|
variantType: "LIGHT",
|
|
1898
1986
|
description: "",
|
|
1899
|
-
imageURL: ""
|
|
1987
|
+
imageURL: "",
|
|
1988
|
+
deprecated: true,
|
|
1989
|
+
deprecationMessage: `"backdrop-light" is deprecated, use "backdrop-v4-light" instead`
|
|
1900
1990
|
}
|
|
1901
1991
|
]
|
|
1902
1992
|
},
|
|
1903
1993
|
{
|
|
1904
|
-
referenceStyleID: "
|
|
1994
|
+
referenceStyleID: "OCEAN_V2",
|
|
1905
1995
|
name: "Ocean",
|
|
1906
1996
|
description: "",
|
|
1907
1997
|
variants: [
|
|
@@ -1910,12 +2000,14 @@ const mapStylePresetList = [
|
|
|
1910
2000
|
name: "Default",
|
|
1911
2001
|
variantType: "DEFAULT",
|
|
1912
2002
|
description: "",
|
|
1913
|
-
imageURL: ""
|
|
2003
|
+
imageURL: "",
|
|
2004
|
+
deprecated: true,
|
|
2005
|
+
deprecationMessage: `"ocean" is deprecated, use "ocean-v4" instead`
|
|
1914
2006
|
}
|
|
1915
2007
|
]
|
|
1916
2008
|
},
|
|
1917
2009
|
{
|
|
1918
|
-
referenceStyleID: "
|
|
2010
|
+
referenceStyleID: "AQUARELLE_V2",
|
|
1919
2011
|
name: "Aquarelle",
|
|
1920
2012
|
description: "Watercolor map for creative use",
|
|
1921
2013
|
variants: [
|
|
@@ -1924,21 +2016,27 @@ const mapStylePresetList = [
|
|
|
1924
2016
|
name: "Default",
|
|
1925
2017
|
variantType: "DEFAULT",
|
|
1926
2018
|
description: "",
|
|
1927
|
-
imageURL: ""
|
|
2019
|
+
imageURL: "",
|
|
2020
|
+
deprecated: true,
|
|
2021
|
+
deprecationMessage: `"aquarelle" is deprecated, use "aquarelle-v4" instead`
|
|
1928
2022
|
},
|
|
1929
2023
|
{
|
|
1930
2024
|
id: "aquarelle-dark",
|
|
1931
2025
|
name: "Dark",
|
|
1932
2026
|
variantType: "DARK",
|
|
1933
2027
|
description: "",
|
|
1934
|
-
imageURL: ""
|
|
2028
|
+
imageURL: "",
|
|
2029
|
+
deprecated: true,
|
|
2030
|
+
deprecationMessage: `"aquarelle-dark" is deprecated, use "aquarelle-v4-dark" instead`
|
|
1935
2031
|
},
|
|
1936
2032
|
{
|
|
1937
2033
|
id: "aquarelle-vivid",
|
|
1938
2034
|
name: "Vivid",
|
|
1939
2035
|
variantType: "VIVID",
|
|
1940
2036
|
description: "",
|
|
1941
|
-
imageURL: ""
|
|
2037
|
+
imageURL: "",
|
|
2038
|
+
deprecated: true,
|
|
2039
|
+
deprecationMessage: `"aquarelle-vivid" is deprecated, use "aquarelle-v4-vivid" instead`
|
|
1942
2040
|
}
|
|
1943
2041
|
]
|
|
1944
2042
|
},
|
|
@@ -2003,13 +2101,209 @@ const mapStylePresetList = [
|
|
|
2003
2101
|
imageURL: ""
|
|
2004
2102
|
}
|
|
2005
2103
|
]
|
|
2104
|
+
},
|
|
2105
|
+
{
|
|
2106
|
+
referenceStyleID: "SATELLITE_V4",
|
|
2107
|
+
name: "Satellite v4",
|
|
2108
|
+
description: "",
|
|
2109
|
+
variants: [
|
|
2110
|
+
{
|
|
2111
|
+
id: "satellite-v4",
|
|
2112
|
+
name: "Default",
|
|
2113
|
+
variantType: "DEFAULT",
|
|
2114
|
+
description: "",
|
|
2115
|
+
imageURL: ""
|
|
2116
|
+
},
|
|
2117
|
+
{
|
|
2118
|
+
id: "satellite-v4-dark",
|
|
2119
|
+
name: "Dark",
|
|
2120
|
+
variantType: "DARK",
|
|
2121
|
+
description: "",
|
|
2122
|
+
imageURL: ""
|
|
2123
|
+
}
|
|
2124
|
+
]
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
referenceStyleID: "DATAVIZ_V4",
|
|
2128
|
+
name: "Dataviz",
|
|
2129
|
+
description: "",
|
|
2130
|
+
variants: [
|
|
2131
|
+
{
|
|
2132
|
+
id: "dataviz-v4",
|
|
2133
|
+
name: "Default",
|
|
2134
|
+
variantType: "DEFAULT",
|
|
2135
|
+
description: "",
|
|
2136
|
+
imageURL: ""
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
id: "dataviz-v4-dark",
|
|
2140
|
+
name: "Dark",
|
|
2141
|
+
variantType: "DARK",
|
|
2142
|
+
description: "",
|
|
2143
|
+
imageURL: ""
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
id: "dataviz-v4-light",
|
|
2147
|
+
name: "Light",
|
|
2148
|
+
variantType: "LIGHT",
|
|
2149
|
+
description: "",
|
|
2150
|
+
imageURL: ""
|
|
2151
|
+
}
|
|
2152
|
+
]
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
referenceStyleID: "OUTDOOR_V4",
|
|
2156
|
+
name: "Outdoor",
|
|
2157
|
+
description: "",
|
|
2158
|
+
variants: [
|
|
2159
|
+
{
|
|
2160
|
+
id: "outdoor-v4",
|
|
2161
|
+
name: "Default",
|
|
2162
|
+
variantType: "DEFAULT",
|
|
2163
|
+
description: "",
|
|
2164
|
+
imageURL: ""
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
id: "outdoor-v4-dark",
|
|
2168
|
+
name: "Dark",
|
|
2169
|
+
variantType: "DARK",
|
|
2170
|
+
description: "",
|
|
2171
|
+
imageURL: ""
|
|
2172
|
+
}
|
|
2173
|
+
]
|
|
2174
|
+
},
|
|
2175
|
+
{
|
|
2176
|
+
referenceStyleID: "BACKDROP_V4",
|
|
2177
|
+
name: "Backdrop",
|
|
2178
|
+
description: "",
|
|
2179
|
+
variants: [
|
|
2180
|
+
{
|
|
2181
|
+
id: "backdrop-v4",
|
|
2182
|
+
name: "Default",
|
|
2183
|
+
variantType: "DEFAULT",
|
|
2184
|
+
description: "",
|
|
2185
|
+
imageURL: ""
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
id: "backdrop-v4-dark",
|
|
2189
|
+
name: "Dark",
|
|
2190
|
+
variantType: "DARK",
|
|
2191
|
+
description: "",
|
|
2192
|
+
imageURL: ""
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
id: "backdrop-v4-light",
|
|
2196
|
+
name: "Light",
|
|
2197
|
+
variantType: "LIGHT",
|
|
2198
|
+
description: "",
|
|
2199
|
+
imageURL: ""
|
|
2200
|
+
}
|
|
2201
|
+
]
|
|
2202
|
+
},
|
|
2203
|
+
{
|
|
2204
|
+
referenceStyleID: "AQUARELLE_V4",
|
|
2205
|
+
name: "Aquarelle",
|
|
2206
|
+
description: "Watercolor map for creative use",
|
|
2207
|
+
variants: [
|
|
2208
|
+
{
|
|
2209
|
+
id: "aquarelle-v4",
|
|
2210
|
+
name: "Default",
|
|
2211
|
+
variantType: "DEFAULT",
|
|
2212
|
+
description: "",
|
|
2213
|
+
imageURL: ""
|
|
2214
|
+
},
|
|
2215
|
+
{
|
|
2216
|
+
id: "aquarelle-v4-dark",
|
|
2217
|
+
name: "Dark",
|
|
2218
|
+
variantType: "DARK",
|
|
2219
|
+
description: "",
|
|
2220
|
+
imageURL: ""
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
id: "aquarelle-v4-vivid",
|
|
2224
|
+
name: "Vivid",
|
|
2225
|
+
variantType: "VIVID",
|
|
2226
|
+
description: "",
|
|
2227
|
+
imageURL: ""
|
|
2228
|
+
}
|
|
2229
|
+
]
|
|
2230
|
+
},
|
|
2231
|
+
{
|
|
2232
|
+
referenceStyleID: "OCEAN_V4",
|
|
2233
|
+
name: "Ocean",
|
|
2234
|
+
description: "",
|
|
2235
|
+
variants: [
|
|
2236
|
+
{
|
|
2237
|
+
id: "ocean-v4",
|
|
2238
|
+
name: "Default",
|
|
2239
|
+
variantType: "DEFAULT",
|
|
2240
|
+
description: "",
|
|
2241
|
+
imageURL: ""
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
id: "ocean-v4-dark",
|
|
2245
|
+
name: "Dark",
|
|
2246
|
+
variantType: "DARK",
|
|
2247
|
+
description: "",
|
|
2248
|
+
imageURL: ""
|
|
2249
|
+
}
|
|
2250
|
+
]
|
|
2251
|
+
},
|
|
2252
|
+
{
|
|
2253
|
+
referenceStyleID: "TOPO_V4",
|
|
2254
|
+
name: "Topo",
|
|
2255
|
+
description: "",
|
|
2256
|
+
variants: [
|
|
2257
|
+
{
|
|
2258
|
+
id: "topo-v4",
|
|
2259
|
+
name: "Default",
|
|
2260
|
+
variantType: "DEFAULT",
|
|
2261
|
+
description: "",
|
|
2262
|
+
imageURL: ""
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
id: "topo-v4-dark",
|
|
2266
|
+
name: "Dark",
|
|
2267
|
+
variantType: "DARK",
|
|
2268
|
+
description: "",
|
|
2269
|
+
imageURL: ""
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
id: "topo-v4-pastel",
|
|
2273
|
+
name: "Pastel",
|
|
2274
|
+
variantType: "PASTEL",
|
|
2275
|
+
description: "",
|
|
2276
|
+
imageURL: ""
|
|
2277
|
+
},
|
|
2278
|
+
{
|
|
2279
|
+
id: "topo-v4-topographique",
|
|
2280
|
+
name: "Topographique",
|
|
2281
|
+
variantType: "TOPOGRAPHIQUE",
|
|
2282
|
+
description: "",
|
|
2283
|
+
imageURL: ""
|
|
2284
|
+
}
|
|
2285
|
+
]
|
|
2006
2286
|
}
|
|
2007
2287
|
];
|
|
2008
2288
|
const defaultReferenceStyleMap = {
|
|
2009
2289
|
STREETS: "STREETS_V2",
|
|
2010
2290
|
BASIC: "BASIC_V2",
|
|
2011
|
-
LANDSCAPE: "LANDSCAPE_V2"
|
|
2291
|
+
LANDSCAPE: "LANDSCAPE_V2",
|
|
2292
|
+
AQUARELLE: "AQUARELLE_V2",
|
|
2293
|
+
SATELLITE: "SATELLITE_V2",
|
|
2294
|
+
WINTER: "WINTER_V2",
|
|
2295
|
+
HYBRID: "HYBRID_V2",
|
|
2296
|
+
OCEAN: "OCEAN_V2",
|
|
2297
|
+
TONER: "TONER_V2",
|
|
2298
|
+
TOPO: "TOPO_V2",
|
|
2299
|
+
OPENSTREETMAP: "OPENSTREETMAP_V2",
|
|
2300
|
+
DATAVIZ: "DATAVIZ_V2",
|
|
2301
|
+
BACKDROP: "BACKDROP_V2",
|
|
2302
|
+
VOYAGER: "VOYAGER_V2"
|
|
2012
2303
|
};
|
|
2304
|
+
const mapStylePresetList = [
|
|
2305
|
+
...MAP_STYLE_CONFIG
|
|
2306
|
+
];
|
|
2013
2307
|
function applyVersionToDefaultReferenceStyle(defaultKey, referenceKey) {
|
|
2014
2308
|
if (mapStylePresetList.find((style) => style.referenceStyleID === defaultKey)) {
|
|
2015
2309
|
console.warn(
|
|
@@ -2366,10 +2660,12 @@ const staticMaps = {
|
|
|
2366
2660
|
|
|
2367
2661
|
const EARTH_RADIUS = 63710088e-1;
|
|
2368
2662
|
const EARTH_CIRCUMFERENCE = 2 * Math.PI * EARTH_RADIUS;
|
|
2663
|
+
const MAX_VALID_LATITUDE = 85.0511287;
|
|
2369
2664
|
function longitudeToMercatorX(lng) {
|
|
2370
2665
|
return (180 + lng) / 360;
|
|
2371
2666
|
}
|
|
2372
2667
|
function latitudeToMercatorY(lat) {
|
|
2668
|
+
lat = Math.max(Math.min(lat, MAX_VALID_LATITUDE), -MAX_VALID_LATITUDE);
|
|
2373
2669
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360))) / 360;
|
|
2374
2670
|
}
|
|
2375
2671
|
function wgs84ToMercator(position) {
|