Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.1.2 #685

Merged
merged 25 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
322f518
Version bump
daniluk4000 Jan 27, 2025
c9ebc4d
Update average utilization
daniluk4000 Jan 28, 2025
b3bc9dd
Temp layers update
daniluk4000 Jan 29, 2025
c7ffa4a
chore(deps): Update dependency nuxt to v3.15.4
renovate[bot] Jan 29, 2025
373ff41
Merge pull request #679 from VATSIM-Radar/renovate/patch-nuxt
daniluk4000 Jan 29, 2025
cd00993
chore(deps): Update all non-major dependencies
renovate[bot] Jan 29, 2025
ddb33ff
Merge pull request #677 from VATSIM-Radar/renovate/all-minor-patch
daniluk4000 Jan 29, 2025
31f0052
1.0.1-2
daniluk4000 Jan 31, 2025
c0a39a9
1.0.1-2
daniluk4000 Jan 31, 2025
2c627bf
Removed debug
daniluk4000 Jan 31, 2025
ea37945
Update deps
daniluk4000 Jan 31, 2025
db612d5
Merge remote-tracking branch 'origin/main' into next
daniluk4000 Jan 31, 2025
22ae68a
chore(deps): Update devDependency @nuxt/eslint to v1
renovate[bot] Jan 31, 2025
d485e62
Merge pull request #682 from VATSIM-Radar/renovate/nuxt-eslint-1.x
daniluk4000 Jan 31, 2025
e318676
Update airlines
daniluk4000 Jan 31, 2025
6c99c53
Merge remote-tracking branch 'origin/next' into next
daniluk4000 Jan 31, 2025
357896f
chore(deps): Lockfile Maintenance
renovate[bot] Jan 31, 2025
bf5f5b8
Merge pull request #684 from VATSIM-Radar/renovate/lock-file-maintenance
daniluk4000 Jan 31, 2025
e835f99
Add update popup
daniluk4000 Jan 31, 2025
e02b218
Merge remote-tracking branch 'origin/next' into next
daniluk4000 Jan 31, 2025
6d47fbd
Update version
daniluk4000 Jan 31, 2025
bdda45a
chore(deps): Update dependency idb to ^8.0.2
renovate[bot] Jan 31, 2025
5d9a2ff
Merge pull request #680 from VATSIM-Radar/renovate/all-minor-patch
daniluk4000 Jan 31, 2025
b6ca5dc
chore(deps): Update devDependency @types/node to ^22.13.0
renovate[bot] Jan 31, 2025
cf5e94c
Merge pull request #686 from VATSIM-Radar/renovate/all-minor-patch
daniluk4000 Feb 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/k8s/ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ data:
</div>
<div class="error_text">
VATSIM Radar is most likely updating. This may take a few minutes.<br>
If this issue persists for more than 5 minutes, please visit our <a
If this issue persists for more than 5-10 minutes, please visit our <a
href="https://discord.com/invite/MtFKhMPePe" target="_blank">Discord</a> to get status update.
</div>
<div class="error_image">
Expand Down
2 changes: 1 addition & 1 deletion .config/k8s/main/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ spec:
name: cpu
target:
type: Utilization
averageUtilization: 280
averageUtilization: 270
- type: Resource
resource:
name: memory
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

# [1.0.2-final]

- New map layers, replacing CartoDB, and available in Light and Detailed variants. This layer renders on your device, so if you experience performance issues after this update - switch to Basic layer instead
- Fixed an error when pilot info panel was sometimes not displayed
- Excluded TCAS SIMBRIEF from detecting as virtual airline callsign
- Migrated METAR API to be fetched from VATSIM API
- Satellite layer comeback (works good in USA only). Old Satellite layer was renamed and is still available for paid users. A reminder: if anybody knows decent free satellite layer with no usage limits, I'm all ears
- Improved logic for new VA parse: aircraft will now be considered flying under VA ONLY if listed in [GNG DB](https://gng.aero-nav.com/AERONAV/icao_fhairlines?action=get&oper=grid&_search=false&nd=${Date.now()}&rows=10000&page=1&sidx=icao&sord=asc) or [VR Data](https://github.com/VATSIM-Radar/data/blob/main/custom-data/airlines.json)

# [1.0.1-1]
- New icons from DotWallop (BE9L, C402, RV10, EVOT, PA34, PA44)
- Added model matching (BE9T, EVOP, P8)
Expand Down
27 changes: 0 additions & 27 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,33 +161,6 @@ export default defineNuxtConfig({
'/layers/esri/**': {
proxy: 'https://ibasemaps-api.arcgis.com/**',
},
'/layers/carto/basemaps/**': {
proxy: {
to: 'https://a.basemaps.cartocdn.com/**',
headers: {
Referer: 'https://do-next.vatsim-radar.com/',
Origin: 'https://do-next.vatsim-radar.com',
},
},
},
'/layers/carto/tiles/**': {
proxy: {
to: 'https://tiles.basemaps.cartocdn.com/**',
headers: {
Referer: 'https://do-next.vatsim-radar.com/',
Origin: 'https://do-next.vatsim-radar.com',
},
},
},
'/layers/carto/vector/**': {
proxy: {
to: 'https://tiles-a.basemaps.cartocdn.com/**',
headers: {
Referer: 'https://do-next.vatsim-radar.com/',
Origin: 'https://do-next.vatsim-radar.com',
},
},
},
},
},
devServer: {
Expand Down
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vatsim-radar",
"version": "1.0.1-1",
"version": "1.0.2-final",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -23,7 +23,7 @@
"@influxdata/influxdb-client": "^1.35.0",
"@influxdata/influxdb-client-apis": "^1.35.0",
"@pinia/nuxt": "^0.9.0",
"@prisma/client": "^6.2.1",
"@prisma/client": "^6.3.0",
"@turf/difference": "^7.2.0",
"@turf/great-circle": "^7.2.0",
"@turf/helpers": "^7.2.0",
Expand All @@ -41,7 +41,7 @@
"croner": "^9.0.0",
"deep-equal": "^2.2.3",
"discord.js": "^14.17.3",
"idb": "^8.0.1",
"idb": "^8.0.2",
"ioredis": "^5.4.2",
"jsonwebtoken": "^9.0.2",
"jwks-rsa": "^3.1.0",
Expand All @@ -50,11 +50,12 @@
"marked": "^15.0.6",
"merge-ranges": "^1.0.2",
"metar-taf-parser": "^9.1.1",
"nuxt": "3.15.3",
"ol": "^10.3.1",
"nuxt": "3.15.4",
"ol": "^10.4.0",
"ol-mapbox-style": "^12.4.0",
"pinia": "^2.3.1",
"prisma": "^6.2.1",
"prisma": "^6.3.0",
"protomaps-themes-base": "^4.4.0",
"sharp": "^0.33.5",
"sqlite3": "^5.1.7",
"svgo": "^3.3.2",
Expand All @@ -67,17 +68,17 @@
},
"devDependencies": {
"@navigraph/amdb": "^1.1.0",
"@nuxt/devtools": "^1.7.0",
"@nuxt/eslint": "^0.7.5",
"@nuxt/devtools": "^2.0.0-beta.4",
"@nuxt/eslint": "^1.0.0",
"@nuxtjs/stylelint-module": "^5.2.0",
"@stylistic/eslint-plugin": "^3.0.0",
"@stylistic/eslint-plugin": "^3.0.1",
"@stylistic/stylelint-plugin": "^3.1.1",
"@types/adm-zip": "^0.5.7",
"@types/deep-equal": "^1.0.4",
"@types/geojson": "^7946.0.16",
"@types/jsonwebtoken": "^9.0.8",
"@types/merge-ranges": "^1.0.2",
"@types/node": "^22.10.10",
"@types/node": "^22.13.0",
"@types/ws": "^8.5.14",
"eslint": "^9.19.0",
"fast-xml-parser": "^4.5.1",
Expand Down
130 changes: 98 additions & 32 deletions src/components/map/MapLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type { MapLayoutLayerExternal } from '~/types/map';
import type { ShallowRef } from 'vue';
import type { Map } from 'ol';
import TileLayer from 'ol/layer/Tile';
import type { TileJSON } from 'ol/source';
import { XYZ } from 'ol/source';
import { buildAttributions } from '~/utils/map';
import type { PartialRecord } from '~/types';
Expand All @@ -19,6 +20,7 @@ import { Fill, Style } from 'ol/style';
import VectorImageLayer from 'ol/layer/VectorImage';
import { isVatGlassesActive } from '~/utils/data/vatglasses';
import { isProductionMode } from '~/utils/shared';
import protoWithLabels, { noLabels as protoNoLabels } from 'protomaps-themes-base';

defineSlots<{ default: () => any }>();

Expand All @@ -33,14 +35,29 @@ interface Layer {
url: string;
lightThemeUrl?: string;
vector?: false;
pm?: false;
}

type IVectorLayer = Pick<Layer, 'attribution' | 'url' | 'lightThemeUrl'> & {
vector: true;
pm?: false;
};

type IPMLayer = Pick<Layer, 'attribution' | 'url' | 'lightThemeUrl'> & {
pm: true;
vector?: false;
theme: 'black' | 'dark' | 'grayscale' | 'light' | 'white';
};

const externalLayers: PartialRecord<MapLayoutLayerExternal, Layer | IVectorLayer> = {
Satellite: {
url: `https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}`,
attribution: {
title: 'USGS',
url: 'https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits',
},
},
SatelliteEsri: {
url: `/layers/esri/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}?token=AAPTxy8BH1VEsoebNVZXo8HurDMQfxZXP-jwqkEIQ3jLIZoTUg5nKRlVTBwkT6rjROYxXw0nv2RYA5yv6hZBods45S-mobzoAHIy4R8ZP_kadIqOrU5bJTyqic63SPSS8-EeC1qFvTOFBd2sQtynCOUMdk4YWCR7Jj7C85_hfBAYvFj9lI1jEmCNzQJqyoitGPjNwW-efZ318KR2nhYadO4TEDqT9D53FlaDZffQjSMeKD8.AT1_chWUHHAZ`,
},
OSM: {
Expand All @@ -64,17 +81,19 @@ const externalLayers: PartialRecord<MapLayoutLayerExternal, Layer | IVectorLayer
lightNL = 'clxpykjoh00nj01pcgmrudq8q',
}*/

const layer = computed<Layer | IVectorLayer>(() => {
let layer = store.localSettings.filters?.layers?.layer ?? 'carto';
const isLabels = computed(() => store.localSettings.filters?.layers?.layerLabels ?? true);

if (layer === 'OSM' && store.theme !== 'light') layer = 'carto';
const layer = computed<Layer | IVectorLayer | IPMLayer>(() => {
let layer = store.localSettings.filters?.layers?.layer ?? 'protoData';

if (layer === 'Satellite' && isProductionMode()) {
layer = 'carto';
if (layer === 'OSM' && store.theme !== 'light') layer = 'protoGeneral';

if (layer === 'SatelliteEsri' && isProductionMode()) {
layer = 'protoData';
setUserLocalSettings({
filters: {
layers: {
layer: 'carto',
layer: 'protoData',
},
},
});
Expand All @@ -86,36 +105,45 @@ const layer = computed<Layer | IVectorLayer>(() => {
};
}

if (layer === 'carto' || !(layer in externalLayers)) {
const isLabels = store.localSettings.filters?.layers?.layerLabels ?? true;
const isVector = store.localSettings.filters?.layers?.layerVector ?? false;
if (!(layer in externalLayers)) {
const isGeneral = layer === 'protoGeneral';
const isGrayscale = store.getCurrentTheme === 'default' ? false : store.localSettings.filters?.layers?.layer === 'protoDataGray';

if (!isVector) {
return {
attribution: {
title: 'CartoDB',
url: 'https://cartodb.com/attribution',
},
url: `/layers/carto/basemaps/${ isLabels ? 'dark_all' : 'dark_nolabels' }/{z}/{x}/{y}.png`,
lightThemeUrl: `/layers/carto/basemaps/${ isLabels ? 'light_all' : 'light_nolabels' }/{z}/{x}/{y}.png`,
};
let theme: IPMLayer['theme'];

if (isGeneral) {
theme = store.getCurrentTheme === 'default' ? 'dark' : 'light';
}
else if (isGrayscale) {
theme = 'grayscale';
}
else {
return {
attribution: {
title: 'CartoDB',
url: 'https://cartodb.com/attribution',
},
url: `/api/data/carto/dark-matter${ isLabels ? '' : '-nolabels' }-gl-style`,
lightThemeUrl: `/api/data/carto/positron${ isLabels ? '' : '-nolabels' }-gl-style`,
vector: true,
};
theme = store.getCurrentTheme === 'default' ? 'black' : 'white';
}

return {
attribution: {
title: 'Protomaps',
url: 'https://github.com/protomaps/basemaps',
},
url: '/tiles.json',
pm: true,
theme,
};
}

return externalLayers[layer as MapLayoutLayerExternal]!;
const external = externalLayers[layer as MapLayoutLayerExternal]!;

if (layer === 'Satellite' && isLabels.value) {
return {
...external,
url: external.url.replace('USGSImageryOnly', 'USGSImageryTopo'),
};
}

return external;
});
const layerUrl = computed(() => layer.value.url + layer.value.lightThemeUrl);
const layerUrl = computed(() => layer.value.url + layer.value.lightThemeUrl + ('theme' in layer.value ? layer.value.theme : ''));

const transparencySettings = computed(() => JSON.stringify(store.localSettings.filters?.layers?.transparencySettings ?? '{}'));

Expand All @@ -124,6 +152,7 @@ const opacity = computed(() => {
case 'OSM':
return store.localSettings.filters.layers.transparencySettings?.osm || 0.5;
case 'Satellite':
case 'SatelliteEsri':
return store.localSettings.filters.layers.transparencySettings?.satellite || 0.3;
default:
return 1;
Expand All @@ -133,7 +162,7 @@ const opacity = computed(() => {
const theme = computed(() => store.theme);

const map = inject<ShallowRef<Map | null>>('map')!;
const tileLayer = shallowRef<TileLayer<XYZ> | VectorTileLayer | null>();
const tileLayer = shallowRef<TileLayer<XYZ | TileJSON> | VectorTileLayer | null>();
let attributionLayer: TileLayer<XYZ> | null = null;

useHead(() => ({
Expand Down Expand Up @@ -207,7 +236,9 @@ async function initLayer() {
const json = await $fetch<Record<string, any>>(store.theme === 'light' ? (layer.value.lightThemeUrl || layer.value.url) : layer.value.url);
json.id = url;

json.layers = json.layers.filter((layer: Record<string, any>) => allowedLayers.test(layer.id));
if (json.layers) {
json.layers = json.layers.filter((layer: Record<string, any>) => allowedLayers.test(layer.id));
}

await applyStyle(tileLayer.value, json);

Expand All @@ -222,6 +253,41 @@ async function initLayer() {
return;
}

if (layer.value.pm) {
const glStyle = {
version: 8,
glyphs: 'https://cdn.protomaps.com/fonts/pbf/{fontstack}/{range}.pbf',
sources: {
protomaps: {
type: 'vector',
url: layer.value.url,
},
},
layers: (isLabels.value ? protoWithLabels : protoNoLabels)('protomaps', layer.value.theme, 'en'),
};

tileLayer.value = new VectorTileLayer({
declutter: false,
updateWhileAnimating: false,
updateWhileInteracting: false,
renderMode: 'hybrid',
});

glStyle.layers = glStyle.layers.filter((layer: Record<string, any>) => layer.id !== 'roads_labels_minor' && layer.id !== 'roads_labels_major' && layer.id !== 'water_waterway_label');

await applyStyle(tileLayer.value, glStyle);

attributionLayer = new TileLayer({
source: new XYZ({
attributions: buildAttributions(layer.value.attribution?.title || false, layer.value.attribution?.url ?? ''),
}),
});
map.value?.addLayer(attributionLayer);
map.value?.addLayer(tileLayer.value);

return;
}

tileLayer.value = new TileLayer({
source: new XYZ({
attributions: layer.value.attribution ? buildAttributions(layer.value.attribution.title, layer.value.attribution.url) : undefined,
Expand All @@ -245,7 +311,7 @@ watch(map, val => {

const vatglassesEnabled = isVatGlassesActive();

watch([layerUrl, theme, vatglassesEnabled, transparencySettings], initLayer);
watch([layerUrl, theme, vatglassesEnabled, transparencySettings, isLabels], initLayer);

onBeforeUnmount(() => {
if (tileLayer.value) map.value?.removeLayer(tileLayer.value);
Expand Down
Loading