aviation-chart 2.0.1 → 2.0.2

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
@@ -1293,8 +1293,6 @@ declare namespace LAYER_GROUPS {
1293
1293
  export { ndb_1 as ndb };
1294
1294
  let airport_1: string[];
1295
1295
  export { airport_1 as airport };
1296
- let runway_1: string[];
1297
- export { runway_1 as runway };
1298
1296
  }
1299
1297
  declare namespace LAYER_LABELS {
1300
1298
  let adiz_1: string;
@@ -1315,8 +1313,6 @@ declare namespace LAYER_LABELS {
1315
1313
  export { ndb_2 as ndb };
1316
1314
  let airport_2: string;
1317
1315
  export { airport_2 as airport };
1318
- let runway_2: string;
1319
- export { runway_2 as runway };
1320
1316
  }
1321
1317
 
1322
1318
  export { API, MapSDK as AviationChart, BuiltInLayer, CHART_THEMES, Circle, CircleOptions, ClusteringConfig, DEFAULT_LAYER_VISIBILITY, DrawPlugin, EnhancedMarker, EnhancedPolygon, ErrorHandler, ErrorManager, EventListener, FeatureType, GROUP_ALIASES, GeoJSONCollection, GeoJSONFeature, GeoJSONManager, GeometryFeature, GeometryParams, GlobalConfigManager, HookCallback, HookContext, HookRegistry, IGeoJSONManager, ILayerManager, IMapSDK, IPlugin, LAYER_GROUPS, LAYER_LABELS, LODConfig, LayerConfig, LayerManager, LineType, MapEvent, MapSDK, MapSDKOptions, MarkerOptions, MeasurePlugin, NOTAM, PerformanceManager, PluginManager, PolygonOptions, Polyline, PolylineOptions, SDKError, SearchParams, SearchResultItem, StrokeLineType, StyleConfig, TYPEMAP, Text, TextOptions, WindFrame, WindManager, WindOptions, MapSDK as default, getFeatureGeometry, getPeriods, globalConfig, searchFeatures };
@@ -1980,8 +1980,7 @@ const TYPEMAP = {
1980
1980
  restricted: ["restrictedLayer", "restrictedLayer_stroke", "restricted_line_label"],
1981
1981
  vor: ["vor_icon", "vor_icon_dial", "vor_label"],
1982
1982
  ndb: ["ndb_icon"],
1983
- airport: ["airport"],
1984
- runway: ["runway-line", "runway-line-amm", "runway-label"],
1983
+ airport: ["airport", "airport-runway", "airport-runway-cross"],
1985
1984
  adiz: ["adiz-line", "adiz-label"],
1986
1985
  waypointOffAirway: ["waypoint-off-airway-symbol"],
1987
1986
  amm: getChartAMMLayerIds(),
@@ -1999,7 +1998,6 @@ const DEFAULT_LAYER_VISIBILITY = {
1999
1998
  vor: true,
2000
1999
  ndb: true,
2001
2000
  airport: true,
2002
- runway: false,
2003
2001
  adiz: false,
2004
2002
  waypointOffAirway: false,
2005
2003
  amm: true,
@@ -7428,6 +7426,7 @@ function getAviationBaseStyle(opts) {
7428
7426
  { id: "default", url: `${spriteBase}/sprites/sprite` },
7429
7427
  { id: "v2", url: `${spriteBase}/sprites/sprite-v2` },
7430
7428
  { id: "vor", url: `${spriteBase}/sprites/sprite-vor` },
7429
+ { id: "runway", url: `${spriteBase}/sprites/sprite-runway` },
7431
7430
  ],
7432
7431
  sources: {
7433
7432
  land: { type: "geojson", data: { type: "FeatureCollection", features: [] } },
@@ -7933,36 +7932,42 @@ function buildLayers(themeId = 'light') {
7933
7932
  "text-opacity": ["interpolate", ["linear"], ["zoom"], 4, 0.95, 5, 1, 9, 1, 11, 0.2],
7934
7933
  },
7935
7934
  },
7935
+ // Runway-orientation strip: a small mark rotated to the true bearing of the
7936
+ // airport's longest runway (RWY_BRG1). Airports with a crossing runway get a
7937
+ // second strip (RWY_BRG2). Both ride the 'airport' source-layer point, so the
7938
+ // strip sits at the airport symbol's center. `icon-rotation-alignment: map`
7939
+ // keeps the strip aligned to the ground as the map rotates. The `runway-strip`
7940
+ // sprite is supplied by the host sprite sheet.
7936
7941
  {
7937
- id: 'runway-line', type: 'line', source: sourceId, 'source-layer': 'runway',
7938
- filter: ['!', ['has', 'has_amm']], minzoom: 4, maxzoom: 11,
7939
- paint: {
7940
- 'line-color': T.runway,
7941
- 'line-width': ['interpolate', ['linear'], ['zoom'], 4, 1, 13, 10],
7942
+ id: 'airport-runway', type: 'symbol', source: sourceId, minzoom: 2, 'source-layer': 'airport',
7943
+ filter: ['all', ['has', 'RWY_BRG1'], ['case', ['<', ['zoom'], 6], ['==', ['get', 'level'], 1], true]],
7944
+ layout: {
7945
+ 'icon-image': 'runway:runway-strip',
7946
+ 'icon-rotate': ['get', 'RWY_BRG1'],
7947
+ 'icon-rotation-alignment': 'map',
7948
+ 'icon-size': ['interpolate', ['linear'], ['zoom'], 5, 0.6, 9, 1.2, 12, 1.3],
7949
+ 'icon-allow-overlap': true,
7950
+ 'icon-ignore-placement': true,
7951
+ 'visibility': 'none',
7942
7952
  },
7943
- },
7944
- {
7945
- id: 'runway-line-amm', type: 'line', source: sourceId, 'source-layer': 'runway',
7946
- filter: ['has', 'has_amm'], minzoom: 4, maxzoom: 11,
7947
7953
  paint: {
7948
- 'line-color': T.runway,
7949
- 'line-width': ['interpolate', ['linear'], ['zoom'], 4, 1, 10, 4],
7950
- 'line-opacity': ['interpolate', ['linear'], ['zoom'], 10.5, 1, 11, 0],
7954
+ 'icon-opacity': ['interpolate', ['linear'], ['zoom'], 5, 0.6, 9, 1, 12, 1],
7951
7955
  },
7952
7956
  },
7953
7957
  {
7954
- id: 'runway-label', type: 'symbol', source: sourceId, 'source-layer': 'runway', minzoom: 10,
7958
+ id: 'airport-runway-cross', type: 'symbol', source: sourceId, minzoom: 2, 'source-layer': 'airport',
7959
+ filter: ['all', ['has', 'RWY_BRG2'], ['case', ['<', ['zoom'], 6], ['==', ['get', 'level'], 1], true]],
7955
7960
  layout: {
7956
- 'text-field': ['concat', ['to-string', ['get', 'VAL_LEN']], '×', ['to-string', ['get', 'VAL_WID']], 'm'],
7957
- 'text-size': 10,
7958
- 'symbol-placement': 'line-center',
7959
- 'text-rotation-alignment': 'map',
7960
- 'text-optional': true,
7961
+ 'icon-image': 'runway:runway-strip',
7962
+ 'icon-rotate': ['get', 'RWY_BRG2'],
7963
+ 'icon-rotation-alignment': 'map',
7964
+ 'icon-size': ['interpolate', ['linear'], ['zoom'], 5, 0.6, 9, 1.2, 12, 1.3],
7965
+ 'icon-allow-overlap': true,
7966
+ 'icon-ignore-placement': true,
7967
+ 'visibility': 'none',
7961
7968
  },
7962
7969
  paint: {
7963
- 'text-color': T.runway,
7964
- ...T.runwayHalo,
7965
- 'text-opacity': ['interpolate', ['linear'], ['zoom'], 10.5, 1, 11, 0],
7970
+ 'icon-opacity': ['interpolate', ['linear'], ['zoom'], 5, 0.6, 9, 1, 12, 1],
7966
7971
  },
7967
7972
  },
7968
7973
  {
@@ -8082,8 +8087,7 @@ const LAYER_GROUPS = {
8082
8087
  waypointOffAirway: ['waypoint-off-airway-symbol'],
8083
8088
  vor: ['vor_icon_dial', 'vor_label', 'vor_icon'],
8084
8089
  ndb: ['ndb_icon'],
8085
- airport: ['airport'],
8086
- runway: ['runway-line', 'runway-line-amm', 'runway-label'],
8090
+ airport: ['airport', 'airport-runway', 'airport-runway-cross'],
8087
8091
  };
8088
8092
 
8089
8093
  const LAYER_LABELS = {
@@ -8096,7 +8100,6 @@ const LAYER_LABELS = {
8096
8100
  vor: 'VOR',
8097
8101
  ndb: 'NDB',
8098
8102
  airport: '机场',
8099
- runway: '跑道',
8100
8103
  };
8101
8104
 
8102
8105
  class WindManager {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aviation-chart",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "KunYu aviation map SDK",
5
5
  "main": "dist/nav-sdk.esm.js",
6
6
  "module": "dist/nav-sdk.esm.js",