aviation-chart 2.0.9 → 2.0.11
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/dist/nav-sdk.esm.js +50 -21
- package/package.json +1 -1
package/dist/nav-sdk.esm.js
CHANGED
|
@@ -1606,7 +1606,7 @@ function buildAMMLayersLight(sourceId = 'amm') {
|
|
|
1606
1606
|
layout: {
|
|
1607
1607
|
'text-field': ['get', 'idlin'],
|
|
1608
1608
|
'text-size': 10,
|
|
1609
|
-
"icon-image": "text_bg",
|
|
1609
|
+
"icon-image": "stretch:text_bg",
|
|
1610
1610
|
"icon-text-fit": "both",
|
|
1611
1611
|
"icon-text-fit-padding": [
|
|
1612
1612
|
1,
|
|
@@ -1632,7 +1632,7 @@ function buildAMMLayersLight(sourceId = 'amm') {
|
|
|
1632
1632
|
'source-layer': 'amm-runway-threshold',
|
|
1633
1633
|
minzoom: 12,
|
|
1634
1634
|
layout: {
|
|
1635
|
-
"icon-image": "text_bg",
|
|
1635
|
+
"icon-image": "stretch:text_bg",
|
|
1636
1636
|
"icon-text-fit": "both",
|
|
1637
1637
|
"icon-text-fit-padding": [
|
|
1638
1638
|
1,
|
|
@@ -1834,12 +1834,12 @@ function buildAMMLayersDark(sourceId = 'amm') {
|
|
|
1834
1834
|
{ id: 'amm-stand-line', type: 'line', source: sourceId, 'source-layer': 'amm-stand-line', minzoom: 13, paint: { 'line-color': C.standLine, 'line-width': 1 } },
|
|
1835
1835
|
{
|
|
1836
1836
|
id: 'amm-taxiway-label', type: 'symbol', source: sourceId, 'source-layer': 'amm-taxiway-line', minzoom: 14,
|
|
1837
|
-
layout: { 'text-field': ['get', 'idlin'], 'text-size': 10, "icon-image": "text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], 'symbol-placement': 'line', 'text-keep-upright': true, 'text-allow-overlap': false },
|
|
1837
|
+
layout: { 'text-field': ['get', 'idlin'], 'text-size': 10, "icon-image": "stretch:text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], 'symbol-placement': 'line', 'text-keep-upright': true, 'text-allow-overlap': false },
|
|
1838
1838
|
paint: { 'text-color': "#0f172a", "icon-color": C.taxiwayLine },
|
|
1839
1839
|
},
|
|
1840
1840
|
{
|
|
1841
1841
|
id: 'amm-runway-threshold-label', type: 'symbol', source: sourceId, 'source-layer': 'amm-runway-threshold', minzoom: 12,
|
|
1842
|
-
layout: { "icon-image": "text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], 'text-field': ['get', 'idthr'], 'text-size': 14, 'text-allow-overlap': true, 'text-rotation-alignment': 'map', 'icon-rotation-alignment': 'map' },
|
|
1842
|
+
layout: { "icon-image": "stretch:text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], 'text-field': ['get', 'idthr'], 'text-size': 14, 'text-allow-overlap': true, 'text-rotation-alignment': 'map', 'icon-rotation-alignment': 'map' },
|
|
1843
1843
|
paint: { 'text-color': '#ffffff', "icon-color": "#ef4444" },
|
|
1844
1844
|
},
|
|
1845
1845
|
{ id: 'amm-stand', type: 'circle', source: sourceId, 'source-layer': 'amm-stand', minzoom: 12, paint: { 'circle-color': C.stand, 'circle-radius': 1.5 } },
|
|
@@ -1897,7 +1897,7 @@ function buildAMMLayersNeutral(sourceId = 'amm') {
|
|
|
1897
1897
|
{ id: 'amm-taxiway-line', type: 'line', source: sourceId, 'source-layer': 'amm-taxiway-line', minzoom: 11, paint: { 'line-color': C.taxiwayLine, 'line-width': ['interpolate', ['linear'], ['zoom'], 15, 0.8, 18, 2] } },
|
|
1898
1898
|
{
|
|
1899
1899
|
id: 'amm-taxiway-label', type: 'symbol', source: sourceId, 'source-layer': 'amm-taxiway-line', minzoom: 14,
|
|
1900
|
-
layout: { 'text-field': ['get', 'idlin'], 'text-size': 10, "icon-image": "text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], 'symbol-placement': 'line', 'text-keep-upright': true, 'text-allow-overlap': false },
|
|
1900
|
+
layout: { 'text-field': ['get', 'idlin'], 'text-size': 10, "icon-image": "stretch:text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], 'symbol-placement': 'line', 'text-keep-upright': true, 'text-allow-overlap': false },
|
|
1901
1901
|
paint: { 'text-color': H, "icon-color": C.taxiwayLine },
|
|
1902
1902
|
},
|
|
1903
1903
|
{ id: 'amm-holding', type: 'line', source: sourceId, 'source-layer': 'amm-holding', minzoom: 11, paint: { 'line-color': C.holding, 'line-width': 1.5 } },
|
|
@@ -1915,7 +1915,7 @@ function buildAMMLayersNeutral(sourceId = 'amm') {
|
|
|
1915
1915
|
{ id: 'amm-stand-line', type: 'line', source: sourceId, 'source-layer': 'amm-stand-line', minzoom: 13, paint: { 'line-color': C.standLine, 'line-width': 1 } },
|
|
1916
1916
|
{
|
|
1917
1917
|
id: 'amm-runway-threshold-label', type: 'symbol', source: sourceId, 'source-layer': 'amm-runway-threshold', minzoom: 12,
|
|
1918
|
-
layout: { "icon-image": "text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], 'text-field': ['get', 'idthr'], 'text-size': 14, 'text-allow-overlap': true, 'text-rotation-alignment': 'map', 'icon-rotation-alignment': 'map' },
|
|
1918
|
+
layout: { "icon-image": "stretch:text_bg", "icon-text-fit": "both", "icon-text-fit-padding": [1, 2, 1, 2], 'text-field': ['get', 'idthr'], 'text-size': 14, 'text-allow-overlap': true, 'text-rotation-alignment': 'map', 'icon-rotation-alignment': 'map' },
|
|
1919
1919
|
paint: { 'text-color': '#ffffff', "icon-color": C.threshold },
|
|
1920
1920
|
},
|
|
1921
1921
|
{ id: 'amm-stand', type: 'circle', source: sourceId, 'source-layer': 'amm-stand', minzoom: 12, paint: { 'circle-color': C.stand, 'circle-radius': 1.5 } },
|
|
@@ -7430,6 +7430,7 @@ function getAviationBaseStyle(opts) {
|
|
|
7430
7430
|
{ id: "v2", url: `${spriteBase}/sprites/sprite-v2` },
|
|
7431
7431
|
{ id: "vor", url: `${spriteBase}/sprites/sprite-vor` },
|
|
7432
7432
|
{ id: "runway", url: `${spriteBase}/sprites/sprite-runway` },
|
|
7433
|
+
{ id: "stretch", url: `${spriteBase}/sprites/sprite-stretch` },
|
|
7433
7434
|
],
|
|
7434
7435
|
sources: {
|
|
7435
7436
|
land: { type: "geojson", data: { type: "FeatureCollection", features: [] } },
|
|
@@ -7960,7 +7961,7 @@ function buildLayers(themeId = 'light') {
|
|
|
7960
7961
|
{
|
|
7961
7962
|
id: 'airline_label', type: 'symbol', source: sourceId, 'source-layer': 'segment', minzoom: 6,
|
|
7962
7963
|
layout: {
|
|
7963
|
-
"icon-image": ["case", ["all", ["has", "TXT_DESIG"], ["!=", ["get", "TXT_DESIG"], ""], ["!=", ["get", "TXT_DESIG"], " "], ["!=", ["get", "TXT_DESIG"], null]], "segment-both", ["all", ["has", "TXT_DESIG_FORWARD"]], "segment-right", ["all", ["has", "TXT_DESIG_BACKWARD"]], "segment-left", "segment-both"],
|
|
7964
|
+
"icon-image": ["case", ["all", ["has", "TXT_DESIG"], ["!=", ["get", "TXT_DESIG"], ""], ["!=", ["get", "TXT_DESIG"], " "], ["!=", ["get", "TXT_DESIG"], null]], "stretch:segment-both", ["all", ["has", "TXT_DESIG_FORWARD"]], "stretch:segment-right", ["all", ["has", "TXT_DESIG_BACKWARD"]], "stretch:segment-left", "stretch:segment-both"],
|
|
7964
7965
|
"icon-anchor": "center", "symbol-placement": "line", "icon-text-fit": "width", "icon-size": 1,
|
|
7965
7966
|
"text-allow-overlap": false, "icon-allow-overlap": false, "text-optional": false,
|
|
7966
7967
|
"text-anchor": "center", "text-justify": "center", "text-line-height": 1.3, "text-letter-spacing": 0.1,
|
|
@@ -7978,7 +7979,7 @@ function buildLayers(themeId = 'light') {
|
|
|
7978
7979
|
["case", ["all", ["has", "TXT_DESIG_HIGH"], ["!=", ["get", "TXT_DESIG_HIGH"], ""]], ["get", "TXT_DESIG_HIGH"], ["all", ["has", "TXT_DESIG_FORWARD"], ["!=", ["get", "TXT_DESIG_FORWARD"], ""]], ["get", "TXT_DESIG_FORWARD"], ["all", ["has", "TXT_DESIG_BACKWARD"], ["!=", ["get", "TXT_DESIG_BACKWARD"], ""]], ["get", "TXT_DESIG_BACKWARD"], "-"], { "font-scale": 0.95, "text-color": T.alDist }
|
|
7979
7980
|
]
|
|
7980
7981
|
],
|
|
7981
|
-
"text-size": ["interpolate", ["linear"], ["zoom"], 6, 9, 10, 10],
|
|
7982
|
+
"text-size": ["interpolate", ["linear"], ["zoom"], 6.5, 9, 10, 10],
|
|
7982
7983
|
"icon-text-fit-padding": [0, 3, 0, 3],
|
|
7983
7984
|
},
|
|
7984
7985
|
paint: {
|
|
@@ -8003,15 +8004,25 @@ function buildLayers(themeId = 'light') {
|
|
|
8003
8004
|
paint: { 'text-color': T.segment, ...T.radialHalo },
|
|
8004
8005
|
},
|
|
8005
8006
|
{
|
|
8006
|
-
id: 'airport', type: 'symbol', source: sourceId, minzoom:
|
|
8007
|
-
|
|
8007
|
+
id: 'airport', type: 'symbol', source: sourceId, minzoom: 2, 'source-layer': 'airport',
|
|
8008
|
+
// 4级前就显示大型机场+中型,5级后全部显示
|
|
8009
|
+
filter:
|
|
8010
|
+
['case',
|
|
8011
|
+
['<=', ['zoom'], 3], ['<=', ['get', 'level'], 1], // zoom ≤3,只显示 level=1(大型)
|
|
8012
|
+
['<=', ['zoom'], 4], ['<=', ['get', 'level'], 2], // zoom ≤4,显示 level≤2(大型+中型)
|
|
8013
|
+
['<=', ['zoom'], 5], ['<=', ['get', 'level'], 3], // zoom ≤5,显示 level≤3(大型+中型+小型)
|
|
8014
|
+
true // zoom >5,全部显示
|
|
8015
|
+
],
|
|
8008
8016
|
layout: {
|
|
8009
|
-
"icon-image": ["case", ["==", ["get", "CODE_TYPE_MIL_OPS"], "MIL"], "airport-mil", ["==", ["get", "CODE_TYPE_MIL_OPS"], "MILEXT"], "airport-milext", "airport-civ"],
|
|
8017
|
+
"icon-image": ["case", ["==", ["get", "CODE_TYPE_MIL_OPS"], "MIL"], "airport-mil", ["==", ["get", "CODE_TYPE_MIL_OPS"], "MILEXT"], "airport-milext", "airport-civ"],
|
|
8018
|
+
"icon-size": ["interpolate", ["linear"], ["zoom"], 3, 0.4, 4, 0.5, 10, 0.7],
|
|
8019
|
+
"symbol-z-order": "viewport-y",
|
|
8020
|
+
"text-field": ["get", "codeId"],
|
|
8010
8021
|
"text-letter-spacing": 0.05,
|
|
8011
8022
|
'text-field': ['get', 'CODE_ID'],
|
|
8012
8023
|
"text-anchor": "bottom",
|
|
8013
8024
|
"text-justify": "center",
|
|
8014
|
-
"text-size": ["interpolate", ["linear"], ["zoom"], 4, 0, 5, 10, 9,
|
|
8025
|
+
"text-size": ["interpolate", ["linear"], ["zoom"], 4, 0, 5, 10, 9, 11],
|
|
8015
8026
|
"text-offset": [
|
|
8016
8027
|
"interpolate", ["linear"], ["zoom"],
|
|
8017
8028
|
5, ["literal", [0, -0.8]],
|
|
@@ -8023,7 +8034,7 @@ function buildLayers(themeId = 'light') {
|
|
|
8023
8034
|
"text-allow-overlap": true,
|
|
8024
8035
|
"text-ignore-placement": true,
|
|
8025
8036
|
"visibility": "none",
|
|
8026
|
-
"icon-size": ["interpolate", ["linear"], ["zoom"], 5, 0.
|
|
8037
|
+
"icon-size": ["interpolate", ["linear"], ["zoom"], 5, 0.7, 9, 1.2, 12, 1.3]
|
|
8027
8038
|
},
|
|
8028
8039
|
paint: {
|
|
8029
8040
|
'icon-color': ['case', ['has', 'has_amm'], '#4B2D6E', T.airport],
|
|
@@ -8039,8 +8050,17 @@ function buildLayers(themeId = 'light') {
|
|
|
8039
8050
|
// keeps the strip aligned to the ground as the map rotates. The `runway-strip`
|
|
8040
8051
|
// sprite is supplied by the host sprite sheet.
|
|
8041
8052
|
{
|
|
8042
|
-
id: 'airport-runway', type: 'symbol', source: sourceId, minzoom:
|
|
8043
|
-
filter: [
|
|
8053
|
+
id: 'airport-runway', type: 'symbol', source: sourceId, minzoom: 2, 'source-layer': 'airport',
|
|
8054
|
+
filter: [
|
|
8055
|
+
'all',
|
|
8056
|
+
['has', 'RWY_BRG1'],
|
|
8057
|
+
['case',
|
|
8058
|
+
['<=', ['zoom'], 3], ['<=', ['get', 'level'], 1],
|
|
8059
|
+
['<=', ['zoom'], 4], ['<=', ['get', 'level'], 2],
|
|
8060
|
+
['<=', ['zoom'], 5], ['<=', ['get', 'level'], 3],
|
|
8061
|
+
true
|
|
8062
|
+
]
|
|
8063
|
+
],
|
|
8044
8064
|
layout: {
|
|
8045
8065
|
'icon-image': 'runway:runway-strip',
|
|
8046
8066
|
'icon-rotate': ['get', 'RWY_BRG1'],
|
|
@@ -8052,12 +8072,21 @@ function buildLayers(themeId = 'light') {
|
|
|
8052
8072
|
},
|
|
8053
8073
|
paint: {
|
|
8054
8074
|
"icon-color": T.airport,
|
|
8055
|
-
"icon-opacity": ["interpolate", ["linear"], ["zoom"], 2, 0.
|
|
8075
|
+
"icon-opacity": ["interpolate", ["linear"], ["zoom"], 2, 0.65, 3, 0.85, 5, 0.9, 9, 1, 11, 0.2],
|
|
8056
8076
|
},
|
|
8057
8077
|
},
|
|
8058
8078
|
{
|
|
8059
|
-
id: 'airport-runway-cross', type: 'symbol', source: sourceId, minzoom:
|
|
8060
|
-
filter: [
|
|
8079
|
+
id: 'airport-runway-cross', type: 'symbol', source: sourceId, minzoom: 2, 'source-layer': 'airport',
|
|
8080
|
+
filter: [
|
|
8081
|
+
'all',
|
|
8082
|
+
['has', 'RWY_BRG2'],
|
|
8083
|
+
['case',
|
|
8084
|
+
['<=', ['zoom'], 3], ['<=', ['get', 'level'], 1],
|
|
8085
|
+
['<=', ['zoom'], 4], ['<=', ['get', 'level'], 2],
|
|
8086
|
+
['<=', ['zoom'], 5], ['<=', ['get', 'level'], 3],
|
|
8087
|
+
true
|
|
8088
|
+
]
|
|
8089
|
+
],
|
|
8061
8090
|
layout: {
|
|
8062
8091
|
'icon-image': 'runway:runway-strip',
|
|
8063
8092
|
'icon-rotate': ['get', 'RWY_BRG2'],
|
|
@@ -8069,7 +8098,7 @@ function buildLayers(themeId = 'light') {
|
|
|
8069
8098
|
},
|
|
8070
8099
|
paint: {
|
|
8071
8100
|
"icon-color": T.airport,
|
|
8072
|
-
"icon-opacity": ["interpolate", ["linear"], ["zoom"], 2, 0.
|
|
8101
|
+
"icon-opacity": ["interpolate", ["linear"], ["zoom"], 2, 0.65, 3, 0.85, 5, 0.9, 9, 1, 11, 0.2],
|
|
8073
8102
|
},
|
|
8074
8103
|
},
|
|
8075
8104
|
{
|
|
@@ -8151,11 +8180,11 @@ function buildLayers(themeId = 'light') {
|
|
|
8151
8180
|
'text-color': T.waypoint,
|
|
8152
8181
|
"icon-halo-color": "rgba(0,0,0,0)",
|
|
8153
8182
|
"icon-halo-width": 0,
|
|
8154
|
-
"icon-opacity": ["interpolate", ["linear"], ["zoom"], 6, 0.5, 12, 1, 15, 0.2],
|
|
8183
|
+
"icon-opacity": ["interpolate", ["linear"], ["zoom"], 6.5, 0.5, 12, 1, 15, 0.2],
|
|
8155
8184
|
"text-halo-color": T.halo,
|
|
8156
8185
|
"text-halo-width": 1,
|
|
8157
8186
|
"text-halo-blur": 0,
|
|
8158
|
-
"text-opacity": ["interpolate", ["linear"], ["zoom"], 6, 1, 12, 0.9, 15, 0.15],
|
|
8187
|
+
"text-opacity": ["interpolate", ["linear"], ["zoom"], 6.49, 0, 6.5, 1, 12, 0.9, 15, 0.15],
|
|
8159
8188
|
},
|
|
8160
8189
|
},
|
|
8161
8190
|
{
|