Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ html, body {
font-size: 15px;
text-align: center;
line-height: 15px;
font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', 'EmojiOne Mozilla', 'Twemoji Mozilla', 'Segoe UI Symbol', Arial, sans-serif;
}

.airport-icon {
font-size: 20px;
text-align: center;
line-height: 20px;
font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', 'EmojiOne Mozilla', 'Twemoji Mozilla', 'Segoe UI Symbol', Arial, sans-serif;
}

/* Control Box Base Styles */
Expand Down
15 changes: 9 additions & 6 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,18 @@ fetch('data/all_airports.json?cacheBust=' + Date.now())
allAirportsData = airports;

airports.forEach(airport => {
// Choose icon based on airport type
// Choose icon based on airport type with fallback for emoji support
let iconHtml = '🏢'; // Default airport icon
let fallbackText = 'APT'; // Fallback text if emoji doesn't render

if (airport.type === 'Heliport') {
iconHtml = '🚁'; // Heliport icon
fallbackText = 'HELI';
}

// Create custom airport icon
// Create custom airport icon with emoji fallback
const airportIcon = L.divIcon({
html: iconHtml,
html: `<span style="font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', 'EmojiOne Mozilla', 'Twemoji Mozilla', 'Segoe UI Symbol', Arial, sans-serif;">${iconHtml}</span><span style="font-size: 8px; display: block; margin-top: -2px;">${fallbackText}</span>`,
className: 'airport-icon',
iconSize: [20, 20],
iconAnchor: [10, 10]
Expand Down Expand Up @@ -347,7 +350,7 @@ function directToAirport(icao) {

// Create route endpoint markers
const routeIcon = L.divIcon({
html: '📍',
html: '<span style="font-family: \'Apple Color Emoji\', \'Segoe UI Emoji\', \'Noto Color Emoji\', \'Android Emoji\', \'EmojiSymbols\', \'EmojiOne Mozilla\', \'Twemoji Mozilla\', \'Segoe UI Symbol\', Arial, sans-serif;">📍</span>',
className: 'route-marker',
iconSize: [25, 25],
iconAnchor: [12, 25]
Expand Down Expand Up @@ -449,7 +452,7 @@ function drawRoute() {

// Create route endpoint markers
const routeIcon = L.divIcon({
html: '📍',
html: '<span style="font-family: \'Apple Color Emoji\', \'Segoe UI Emoji\', \'Noto Color Emoji\', \'Android Emoji\', \'EmojiSymbols\', \'EmojiOne Mozilla\', \'Twemoji Mozilla\', \'Segoe UI Symbol\', Arial, sans-serif;">📍</span>',
className: 'route-marker',
iconSize: [25, 25],
iconAnchor: [12, 25]
Expand Down Expand Up @@ -571,7 +574,7 @@ function addRouteActionsToPanel(airport) {

// Create a custom aircraft icon for the moving map
const aircraftIcon = L.divIcon({
html: '✈️',
html: '<span style="font-family: \'Apple Color Emoji\', \'Segoe UI Emoji\', \'Noto Color Emoji\', \'Android Emoji\', \'EmojiSymbols\', \'EmojiOne Mozilla\', \'Twemoji Mozilla\', \'Segoe UI Symbol\', Arial, sans-serif;">✈️</span>',
className: 'aircraft-icon',
iconSize: [15, 15],
iconAnchor: [7.5, 7.5]
Expand Down