galaxy map.Function.getGalaxyMapMarker - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / galaxy-map / getGalaxyMapMarker

Function: getGalaxyMapMarker()

getGalaxyMapMarker(symbol): GalaxyMapMarker | null

Defined in: src/galaxy-map/markers.ts:86

Find a marker by its symbol.

Parameters

symbol

string

A marker symbol in any casing, with optional surrounding whitespace.

Returns

GalaxyMapMarker | null

The marker, or null when no marker carries that symbol.

Throws

If symbol is present and not a string. A nullish symbol is a miss, answered the way an unrecognised one is.

Example

import { getGalaxyMapMarker } from '@elite-dangerous-almanac/core/galaxy-map/markers';

getGalaxyMapMarker('front-line')?.color;      // -> '#9418FF'
getGalaxyMapMarker('front-line')?.frameColor; // -> '#4A00B5'
getGalaxyMapMarker('no-such-marker');         // -> null
⚠️ **GitHub.com Fallback** ⚠️