Manages the overlay of additional images (ornaments) on portals, such as beacons, frackers, and anomaly markers.
Added as part of the Ingress #Helios in 2014, ornaments are additional image overlays for portals.
currently there are 6 known types of ornaments: ap$x$suffix
cluster portals
(without suffix)volatile portals
(_v)meeting points
(_start)finish points
(_end)
Beacons and Frackers were introduced at the launch of the Ingress ingame store on November 1st, 2015
Beacons
(pe$TAG - $NAME) ie:peNIA - NIANTIC
Frackers
('peFRACK') (there are 7 different colors for each of them)
Ornament IDs are dynamic. NIANTIC might change them at any time without prior notice. New ornamnent IDs found on the map will be recorded and saved to knownOrnaments from which the Ornaments dialog will be filled with checked checkboxes. To exclude a set of ornaments, even if they have not yet shown up on the map, the user can add an entry to excludedOrnaments, which will compared (startsWith) to all known and future IDs. example: "ap" to exclude all Ornaments for anomalies (ap1, ap2, ap2_v)
Members
-
static excludedOrnaments
-
List of ornaments to be excluded.
Properties:
Name Type Description excludedOrnaments
Array.<string> Patterns to be excluded from display.
-
static icon
-
Object holding optional definitions for ornaments and beacons. The icon object holds optional definitions for the ornaments an beacons. The object shall be filled from a plugin
'ornamentID' : { name: 'meaningful name', // shows up in dialog layer: 'name for the Layer', // shows up in layerchooser, optional, if not set // ornament will be in "Ornaments" url: 'url', // from which the image will be taken, optional, // 84x84px is default, if not set, stock images will be // used offset: [dx,dy], // optional, shift the ornament vertically or horizontally by // dx (vertical)and dy )horizontal. // [0, 0.5] to place right above the portal. // default is [0, 0] to center opacity: 0..1 // optional, default is 0.6 }
Properties:
Name Type Description icon
object The icon object for ornaments and beacons.
-
static knownOrnaments
-
List of known ornaments.
Properties:
Name Type Description knownOrnaments
object Object tracking known ornaments.
-
static, constant OVERLAY_OPACITY :number
-
Default opacity for ornament.
-
static, constant OVERLAY_SIZE :number
-
Default size for ornament.
Methods
-
static addPortal(portal)
-
Adds ornament overlays to the specified portal.
Parameters:
Name Type Description portal
object The portal to which ornaments are added.
-
static createLayer(layerID)
-
Creates a new layer for a given ornament ID.
Parameters:
Name Type Description layerID
string The ID for the new layer.
-
static initOrnaments()
-
Initializes known ornaments.
-
static load()
-
Loads ornament data from localStorage.
-
static onChangeHandler()
-
Handles changes in ornament options and updates the map accordingly.
-
static ornamentsList() → {string}
-
Generates a list of ornaments for display in the options dialog.
Returns:
string -HTML string representing the list of ornaments.
-
static ornamentsOpt()
-
Opens the dialog for ornament options, allowing users to manage ornament visibility.
-
static processInput()
-
Processes input data for managing ornaments.
-
static reload()
-
Reloads all ornaments on the map.
-
static removePortal(portal)
-
Removes ornament overlays from the specified portal.
Parameters:
Name Type Description portal
object The portal from which ornaments are removed.
-
static replaceOL()
-
Replaces the content of the ornaments list in the dialog.
-
static save()
-
Saves the current ornament configuration to localStorage.
-
static setup()
-
Sets up the ornament layer and necessary event handlers.