aviation-chart 2.0.1 → 2.0.3
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 +0 -4
- package/dist/nav-sdk.esm.js +32 -27
- package/package.json +1 -1
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 };
|
package/dist/nav-sdk.esm.js
CHANGED
|
@@ -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,44 @@ 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
|
|
7938
|
-
filter: ['
|
|
7939
|
-
|
|
7940
|
-
'
|
|
7941
|
-
'
|
|
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.3, 9, 0.6, 12, 0.6],
|
|
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
|
-
|
|
7949
|
-
'
|
|
7950
|
-
'line-opacity': ['interpolate', ['linear'], ['zoom'], 10.5, 1, 11, 0],
|
|
7954
|
+
"icon-color": T.airport,
|
|
7955
|
+
'icon-opacity': ['interpolate', ['linear'], ['zoom'], 5, 0.6, 9, 1, 12, 1],
|
|
7951
7956
|
},
|
|
7952
7957
|
},
|
|
7953
7958
|
{
|
|
7954
|
-
id: 'runway-
|
|
7959
|
+
id: 'airport-runway-cross', type: 'symbol', source: sourceId, minzoom: 2, 'source-layer': 'airport',
|
|
7960
|
+
filter: ['all', ['has', 'RWY_BRG2'], ['case', ['<', ['zoom'], 6], ['==', ['get', 'level'], 1], true]],
|
|
7955
7961
|
layout: {
|
|
7956
|
-
'
|
|
7957
|
-
'
|
|
7958
|
-
'
|
|
7959
|
-
'
|
|
7960
|
-
'
|
|
7962
|
+
'icon-image': 'runway:runway-strip',
|
|
7963
|
+
'icon-rotate': ['get', 'RWY_BRG2'],
|
|
7964
|
+
'icon-rotation-alignment': 'map',
|
|
7965
|
+
'icon-size': ['interpolate', ['linear'], ['zoom'], 5, 0.3, 9, 0.6, 12, 0.6],
|
|
7966
|
+
'icon-allow-overlap': true,
|
|
7967
|
+
'icon-ignore-placement': true,
|
|
7968
|
+
'visibility': 'none',
|
|
7961
7969
|
},
|
|
7962
7970
|
paint: {
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
'text-opacity': ['interpolate', ['linear'], ['zoom'], 10.5, 1, 11, 0],
|
|
7971
|
+
"icon-color": T.airport,
|
|
7972
|
+
'icon-opacity': ['interpolate', ['linear'], ['zoom'], 5, 0.6, 9, 1, 12, 1],
|
|
7966
7973
|
},
|
|
7967
7974
|
},
|
|
7968
7975
|
{
|
|
@@ -8082,8 +8089,7 @@ const LAYER_GROUPS = {
|
|
|
8082
8089
|
waypointOffAirway: ['waypoint-off-airway-symbol'],
|
|
8083
8090
|
vor: ['vor_icon_dial', 'vor_label', 'vor_icon'],
|
|
8084
8091
|
ndb: ['ndb_icon'],
|
|
8085
|
-
airport: ['airport'],
|
|
8086
|
-
runway: ['runway-line', 'runway-line-amm', 'runway-label'],
|
|
8092
|
+
airport: ['airport', 'airport-runway', 'airport-runway-cross'],
|
|
8087
8093
|
};
|
|
8088
8094
|
|
|
8089
8095
|
const LAYER_LABELS = {
|
|
@@ -8096,7 +8102,6 @@ const LAYER_LABELS = {
|
|
|
8096
8102
|
vor: 'VOR',
|
|
8097
8103
|
ndb: 'NDB',
|
|
8098
8104
|
airport: '机场',
|
|
8099
|
-
runway: '跑道',
|
|
8100
8105
|
};
|
|
8101
8106
|
|
|
8102
8107
|
class WindManager {
|