aviation-chart 2.0.20 → 2.0.22

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.d.ts CHANGED
@@ -1258,7 +1258,7 @@ declare namespace CHART_THEMES {
1258
1258
  let label: string;
1259
1259
  let background: string;
1260
1260
  }
1261
- namespace dark {
1261
+ namespace standard {
1262
1262
  let id_1: string;
1263
1263
  export { id_1 as id };
1264
1264
  let label_1: string;
@@ -1266,7 +1266,7 @@ declare namespace CHART_THEMES {
1266
1266
  let background_1: string;
1267
1267
  export { background_1 as background };
1268
1268
  }
1269
- namespace dusk {
1269
+ namespace dark {
1270
1270
  let id_2: string;
1271
1271
  export { id_2 as id };
1272
1272
  let label_2: string;
@@ -1274,7 +1274,7 @@ declare namespace CHART_THEMES {
1274
1274
  let background_2: string;
1275
1275
  export { background_2 as background };
1276
1276
  }
1277
- namespace sectional {
1277
+ namespace dusk {
1278
1278
  let id_3: string;
1279
1279
  export { id_3 as id };
1280
1280
  let label_3: string;
@@ -1282,6 +1282,14 @@ declare namespace CHART_THEMES {
1282
1282
  let background_3: string;
1283
1283
  export { background_3 as background };
1284
1284
  }
1285
+ namespace sectional {
1286
+ let id_4: string;
1287
+ export { id_4 as id };
1288
+ let label_4: string;
1289
+ export { label_4 as label };
1290
+ let background_4: string;
1291
+ export { background_4 as background };
1292
+ }
1285
1293
  }
1286
1294
  declare namespace LAYER_GROUPS {
1287
1295
  export let adiz: string[];
@@ -9767,15 +9767,15 @@ const THEME_TOKENS = {
9767
9767
  land: '#F2F5F9',
9768
9768
  halo: '#ffffff',
9769
9769
  boundaryPattern: 'normal:national-border-light',
9770
- adizLine: null, // light 不给 adiz 线描色(仅用 pattern)
9771
- adizLabel: '#6600cc',
9772
9770
  airspaceStroke: '#6F7E68',
9773
9771
  restrictedFill: '#FAD7A0',
9772
+ restrictedFillPattern: "",
9774
9773
  restrictedStrokeLine: '#f6bf65',
9775
9774
  restrictedStroke: '#D35400', // 限制区标注文字色(ICAO 导出/图例用)
9776
9775
  controlledStroke: '#10B981',
9777
9776
  controlledFill: '#10B981',
9778
9777
  segment: '#1C2526',
9778
+ segmentWith: ['interpolate', ['linear'], ['zoom'], 6, 0.2, 8, 0.8],
9779
9779
  segmentRemark: '#E8A020', // HAS_REMARK 航段
9780
9780
  airport: '#006400', // 机场图标色
9781
9781
  airportamm: "#4B2D6E", // AMM 机场
@@ -9787,6 +9787,7 @@ const THEME_TOKENS = {
9787
9787
  ndbIcon: 'v2:ndb-normal', // 图标按主题不同(正常)
9788
9788
  ndb: '#0066CC',
9789
9789
  waypoint: '#1C2526',
9790
+ airlinePointIcon: ['case', ['==', ['get', 'report_type'], 'C'], 'waypoint-compusory', 'waypoint'],
9790
9791
  // airline_label format 内嵌文字色
9791
9792
  alBase: '#ffffff', alDist: '#3E4759', alRnp: '#E8A020',
9792
9793
  // halo 片段:light 多数标注无 halo → 空对象
@@ -9804,8 +9805,6 @@ const THEME_TOKENS = {
9804
9805
  land: '#0A111A',
9805
9806
  halo: '#0f172a',
9806
9807
  boundaryPattern: 'normal:national-border-dark',
9807
- adizLine: '#a855f7',
9808
- adizLabel: '#c084fc',
9809
9808
  airspaceStroke: '#18C29C',
9810
9809
  restrictedFill: ['case', ['==', ['get', 'CODE_TYPE'], 'P'], '#ef4444', ['==', ['get', 'CODE_TYPE'], 'D'], '#f97316', '#ef4444'],
9811
9810
  restrictedStrokeLine: '#CC7722',
@@ -9813,6 +9812,7 @@ const THEME_TOKENS = {
9813
9812
  controlledStroke: '#22C55E',
9814
9813
  controlledFill: '#22C55E',
9815
9814
  segment: '#40C4FF',
9815
+ segmentWith: ['interpolate', ['linear'], ['zoom'], 6, 0.2, 8, 0.8],
9816
9816
  segmentRemark: '#fbbf24',
9817
9817
  airport: '#73ccdd',
9818
9818
  airportamm: "#c084fc", // AMM 机场
@@ -9824,6 +9824,7 @@ const THEME_TOKENS = {
9824
9824
  ndbIcon: 'ndb-inway',
9825
9825
  ndb: '#62d6ef',
9826
9826
  waypoint: '#74cdde',
9827
+ airlinePointIcon: ['case', ['==', ['get', 'report_type'], 'C'], 'waypoint-compusory', 'waypoint'],
9827
9828
  alBase: '#0f172a', alDist: '#cbd5e1', alRnp: '#FFFFFF',
9828
9829
  sideHalo: { 'text-halo-color': '#0f172a', 'text-halo-width': 1 },
9829
9830
  centerHalo: { 'text-halo-color': '#0f172a', 'text-halo-width': 1.5 },
@@ -9842,15 +9843,15 @@ const THEME_TOKENS = {
9842
9843
  land: '#22303F',
9843
9844
  halo: '#16212c',
9844
9845
  boundaryPattern: 'normal:national-border-dusk',
9845
- adizLine: '#c77dff',
9846
- adizLabel: '#e0aaff',
9847
9846
  airspaceStroke: '#7fb3d5',
9848
9847
  restrictedFill: '#e67e22',
9848
+ restrictedFillPattern: "",
9849
9849
  restrictedStrokeLine: '#e59866',
9850
9850
  restrictedStroke: '#e59866',
9851
9851
  controlledStroke: '#52c9a3',
9852
9852
  controlledFill: '#52c9a3',
9853
9853
  segment: '#8fa8c7',
9854
+ segmentWith: ['interpolate', ['linear'], ['zoom'], 6, 0.2, 8, 0.8],
9854
9855
  segmentRemark: '#f4c542',
9855
9856
  airport: '#7fd1ae',
9856
9857
  airportamm: "#6C3483", // AMM 机场
@@ -9862,6 +9863,7 @@ const THEME_TOKENS = {
9862
9863
  ndbIcon: 'ndb-inway',
9863
9864
  ndb: '#7ec8e3',
9864
9865
  waypoint: '#a9c6d8',
9866
+ airlinePointIcon: ['case', ['==', ['get', 'report_type'], 'C'], 'waypoint-compusory', 'waypoint'],
9865
9867
  alBase: '#1B2838', alDist: '#b8c9d9', alRnp: '#f4c542',
9866
9868
  sideHalo: { 'text-halo-color': '#1B2838', 'text-halo-width': 1 },
9867
9869
  centerHalo: { 'text-halo-color': '#1B2838', 'text-halo-width': 1.5 },
@@ -9881,15 +9883,15 @@ const THEME_TOKENS = {
9881
9883
  land: '#F7F5EC',
9882
9884
  halo: '#F2EFE6',
9883
9885
  boundaryPattern: 'normal:national-border',
9884
- adizLine: '#8e44ad',
9885
- adizLabel: '#8e44ad',
9886
9886
  airspaceStroke: '#2E5C8A',
9887
9887
  restrictedFill: '#E8A33D',
9888
+ restrictedFillPattern: "",
9888
9889
  restrictedStrokeLine: '#C0392B',
9889
9890
  restrictedStroke: '#C0392B',
9890
9891
  controlledStroke: '#2E5C8A',
9891
9892
  controlledFill: '#2E5C8A',
9892
9893
  segment: '#34495E',
9894
+ segmentWith: ['interpolate', ['linear'], ['zoom'], 6, 0.2, 8, 0.8],
9893
9895
  segmentRemark: '#D68910',
9894
9896
  airport: '#B03060',
9895
9897
  airportamm: "#6C3483", // AMM 机场
@@ -9901,6 +9903,7 @@ const THEME_TOKENS = {
9901
9903
  ndbIcon: 'v2:ndb-normal',
9902
9904
  ndb: '#8B5A2B',
9903
9905
  waypoint: '#2C3E50',
9906
+ airlinePointIcon: ['case', ['==', ['get', 'report_type'], 'C'], 'waypoint-compusory', 'waypoint'],
9904
9907
  alBase: '#F2EFE6', alDist: '#5D6D7E', alRnp: '#D68910',
9905
9908
  sideHalo: { 'text-halo-color': '#F2EFE6', 'text-halo-width': 1 },
9906
9909
  centerHalo: { 'text-halo-color': '#F2EFE6', 'text-halo-width': 1.5 },
@@ -9911,6 +9914,48 @@ const THEME_TOKENS = {
9911
9914
  alHalo: { 'text-halo-color': '#F2EFE6', 'text-halo-width': 0.5 },
9912
9915
  ndbHalo: { 'text-halo-color': '#F2EFE6', 'text-halo-width': 1 },
9913
9916
  },
9917
+ // 标准版
9918
+ standard: {
9919
+ background: '#C8DCE8',
9920
+ land: '#F2F5F9',
9921
+ halo: '#ffffff',
9922
+ boundaryPattern: 'normal:national-border-light',
9923
+ airspaceStroke: '#6F7E68',
9924
+ restrictedFill: 'transparent',
9925
+ restrictedFillPattern: "normal:passline-restricted-fill",
9926
+ restrictedStrokeLine: '#7E524D',
9927
+ restrictedStrokeLineWidth:1.2,
9928
+ restrictedStroke: '#D35400', // 限制区标注文字色(ICAO 导出/图例用)
9929
+ controlledStroke: "#88918038",
9930
+ controlledFill: '#C7CEC056',
9931
+ segment: '#1C2526',
9932
+ segmentWith: ['interpolate', ['linear'], ['zoom'], 6, 1.9, 10, 2.2],
9933
+ segmentRemark: '#E8A020', // HAS_REMARK 航段
9934
+ airport: '#006400', // 机场图标色
9935
+ airportamm: "#4B2D6E", // AMM 机场
9936
+ airportText: '#006400', // 机场文字色(非 AMM)
9937
+ runway: '#006400',
9938
+ vorDial: '#0b417a',
9939
+ vorNormal: '#3874cb',
9940
+ vor: '#00008B',
9941
+ ndbIcon: 'v2:ndb-normal', // 图标按主题不同(正常)
9942
+ ndb: '#0066CC',
9943
+ waypoint: '#1C2526',
9944
+ airlinePointIcon: ['case', ['==', ['get', 'report_type'], 'C'], 'designate_point_inway', 'designate_point_notinway'],
9945
+ airlinePointIconSize: 0.65,
9946
+ waypointOpacity: ["interpolate", ["linear"], ["zoom"], 6.5, 1, 12, 1, 15, 0.2],
9947
+ // airline_label format 内嵌文字色
9948
+ alBase: '#ffffff', alDist: '#3E4759', alRnp: '#E8A020',
9949
+ // halo 片段:light 多数标注无 halo → 空对象
9950
+ sideHalo: {},
9951
+ centerHalo: {},
9952
+ restrictedHalo: {},
9953
+ controlledHalo: {},
9954
+ radialHalo: {},
9955
+ runwayHalo: { 'text-halo-width': 1 },
9956
+ alHalo: { 'text-halo-color': '#ffffff', 'text-halo-width': 0.1 },
9957
+ ndbHalo: { 'text-halo-color': '#ffffff', 'text-halo-width': 0.5, 'text-halo-blur': 1 },
9958
+ },
9914
9959
  };
9915
9960
 
9916
9961
  function buildLayers(themeId = 'light') {
@@ -9926,24 +9971,10 @@ function buildLayers(themeId = 'light') {
9926
9971
  "id": "boundary", "type": "line", "source": "boundary", "minzoom": 0,
9927
9972
  "paint": {
9928
9973
  "line-width": ["interpolate", ["linear"], ["zoom"], 0, 1, 7, 4],
9929
- "line-opacity": ["interpolate", ["linear"], ["zoom"], 0, 1, 2, 0.9],
9974
+ "line-opacity": 1,
9930
9975
  "line-pattern": T.boundaryPattern,
9931
9976
  }
9932
9977
  },
9933
- {
9934
- id: 'adiz-line', type: 'line', source: sourceId, 'source-layer': 'adiz', minzoom: 3,
9935
- layout: { 'line-cap': 'round', 'line-join': 'round' },
9936
- paint: {
9937
- ...(T.adizLine ? { 'line-color': T.adizLine } : {}),
9938
- 'line-width': 4, "line-pattern": "normal:adiz",
9939
- 'line-opacity': ['interpolate', ['linear'], ['zoom'], 3, 0.6, 8, 0.4],
9940
- },
9941
- },
9942
- {
9943
- id: 'adiz-label', type: 'symbol', source: sourceId, 'source-layer': 'adiz-centroid', minzoom: 3,
9944
- layout: { 'text-field': ['coalesce', ['get', 'TXT_NAME'], ['get', 'CODE_ID']], 'text-size': 10, 'text-max-width': 10, 'symbol-placement': 'point' },
9945
- paint: { 'text-color': T.adizLabel, 'text-halo-color': T.halo, 'text-halo-width': 1.5 },
9946
- },
9947
9978
  {
9948
9979
  id: 'airspaceLayer', type: 'line', source: sourceId, 'source-layer': 'fir', minzoom: 2,
9949
9980
  paint: { "line-color": T.airspaceStroke, "line-opacity": ["interpolate", ["linear"], ["zoom"], 2, 0, 2.7, 0.8, 9, 0.8, 10, 0.5], "line-width": 0.5, 'line-dasharray': [4.2, 4] }
@@ -9976,12 +10007,13 @@ function buildLayers(themeId = 'light') {
9976
10007
  id: 'restrictedLayer', type: 'fill', source: sourceId, 'source-layer': 'restricted-fill', minzoom: 4,
9977
10008
  paint: {
9978
10009
  'fill-color': T.restrictedFill,
10010
+ "fill-pattern": T.restrictedFillPattern,
9979
10011
  'fill-opacity': ["interpolate", ["linear"], ["zoom"], 10, 0.15, 11.5, 0],
9980
10012
  },
9981
10013
  },
9982
10014
  {
9983
10015
  id: 'restrictedLayer_stroke', type: 'line', source: sourceId, 'source-layer': 'restricted',
9984
- paint: { 'line-color': T.restrictedStrokeLine, 'line-width': 1, "line-dasharray": [2, 2], "line-opacity": ['interpolate', ['linear'], ['zoom'], 4, 0.5, 8, 1] },
10016
+ paint: { 'line-color': T.restrictedStrokeLine, 'line-width': T.restrictedStrokeLineWidth || 1, "line-dasharray": [2, 2], "line-opacity": ['interpolate', ['linear'], ['zoom'], 4, 0.5, 8, 1] },
9985
10017
  },
9986
10018
  {
9987
10019
  id: 'restricted_line_label', type: 'symbol', source: sourceId, 'source-layer': 'restricted', minzoom: 6,
@@ -10008,7 +10040,7 @@ function buildLayers(themeId = 'light') {
10008
10040
  id: 'airline', type: 'line', source: sourceId, 'source-layer': 'segment', minzoom: 6,
10009
10041
  paint: {
10010
10042
  'line-color': ['case', ['==', ['get', 'HAS_REMARK'], 1], T.segmentRemark, T.segment],
10011
- 'line-width': ['interpolate', ['linear'], ['zoom'], 6, 0.2, 8, 0.8],
10043
+ 'line-width': T.segmentWith,
10012
10044
  "line-blur": 0,
10013
10045
  "line-opacity": ["interpolate", ["linear"], ["zoom"], 6, 0.5, 7, 1, 8, 1, 12, 0.8, 15, 0.2],
10014
10046
  }
@@ -10238,7 +10270,8 @@ function buildLayers(themeId = 'light') {
10238
10270
  {
10239
10271
  id: 'airline_point', type: 'symbol', source: sourceId, 'source-layer': 'waypoint', minzoom: 6,
10240
10272
  layout: {
10241
- 'icon-image': ['case', ['==', ['get', 'report_type'], 'C'], 'waypoint-compusory', 'waypoint'], 'icon-size': 0.6,
10273
+ 'icon-image': T.airlinePointIcon,
10274
+ 'icon-size': T.airlinePointIconSize || 0.6,
10242
10275
  'icon-allow-overlap': true,
10243
10276
  'icon-ignore-placement': true,
10244
10277
  'text-field': ['get', 'CODE_ID'],
@@ -10252,7 +10285,7 @@ function buildLayers(themeId = 'light') {
10252
10285
  'text-color': T.waypoint,
10253
10286
  "icon-halo-color": "rgba(0,0,0,0)",
10254
10287
  "icon-halo-width": 0,
10255
- "icon-opacity": ["interpolate", ["linear"], ["zoom"], 6.5, 0.5, 12, 1, 15, 0.2],
10288
+ "icon-opacity": T.waypointOpacity || ["interpolate", ["linear"], ["zoom"], 6.5, 0.5, 12, 1, 15, 0.2],
10256
10289
  "text-halo-color": T.halo,
10257
10290
  "text-halo-width": 1,
10258
10291
  "text-halo-blur": 0,
@@ -10275,6 +10308,7 @@ function buildLayers(themeId = 'light') {
10275
10308
  // 加主题 = 在 THEME_TOKENS 增加一张 token 表 + 在此登记。
10276
10309
  const CHART_THEMES = {
10277
10310
  light: { id: 'light', label: '日间', background: '#C8DCE8' },
10311
+ standard: { id: 'standard', label: 'Pro风格', background: '#C8DCE8' },
10278
10312
  dark: { id: 'dark', label: '夜间', background: '#000000' },
10279
10313
  dusk: { id: 'dusk', label: '暮光', background: '#1B2838' },
10280
10314
  sectional: { id: 'sectional', label: 'ForeFlight 风格', background: '#DCEAEF' },
@@ -10438,10 +10472,10 @@ class MapSDK {
10438
10472
  const authHeaders = apiKey
10439
10473
  ? { "X-Api-Key": apiKey }
10440
10474
  : {};
10441
- const landPromise = fetchGzJson(`${this._chartApiUrl}/topjson/land.topojson.gz`, authHeaders).catch((err) => {
10475
+ const landPromise = fetchGzJson(`${this._chartApiUrl}/topjson/land.topojson`, authHeaders).catch((err) => {
10442
10476
  return null;
10443
10477
  });
10444
- const boundaryPromise = fetchGzJson(`${this._chartApiUrl}/topjson/boundary.topojson.gz`, authHeaders).catch((err) => {
10478
+ const boundaryPromise = fetchGzJson(`${this._chartApiUrl}/topjson/boundary.topojson`, authHeaders).catch((err) => {
10445
10479
  return null;
10446
10480
  });
10447
10481
  this.map.on("load", async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aviation-chart",
3
- "version": "2.0.20",
3
+ "version": "2.0.22",
4
4
  "description": "KunYu aviation map SDK",
5
5
  "main": "dist/nav-sdk.esm.js",
6
6
  "module": "dist/nav-sdk.esm.js",