IITC.portal.display

Namespace that renders portal details in the sidebar and highlights the selected portal on the map.

Namespaces

tools

Members

static artifactFragmentsTemplate :String

Template of the artifact shards note

static artifactTargetTemplate :String

Template of the artifact target portal note

static ellipsisLabelTemplate :String

Template of a label that truncates with an ellipsis (e.g. "attack frequency", "force amplifier")

static linkDetailsTemplate :String

Template of the container that holds the portal links (permalink, scanner, map links)

static loadingStatusTemplate :String

Template shown while full portal details are still loading

static modsWrapperTemplate :String

Template wrapping the portal mods block

static moveToPortalIconTemplate :String

Template of the "move to portal" icon shown next to the portal title

static randDetailsTemplate :String

Template wrapping the #randdetails table (owner, range, links, fields, shielding, energy, AP, hacks)

Methods

static getMiscDetails(guid, d) → {string}

Gets miscellaneous details for a specified portal.

Parameters:
Name Type Description
guid string

The GUID of the portal.

d Object

The portal detail object containing various properties of the portal.

Returns:
string -

HTML string representing the miscellaneous details of the portal.

Generates a permalink URL based on the specified latitude and longitude and additional options.

Parameters:
Name Type Attributes Description
latlng L.LatLng | Array.<number> <optional>

The latitude and longitude for the permalink. Can be omitted to create mapview-only permalink.

options Object <optional>

Additional options for permalink generation.

Properties
Name Type Attributes Description
includeMapView boolean <optional>

Include current map view in the permalink.

fullURL boolean <optional>

Generate a fully qualified URL (default: relative link).

Returns:
string -

The generated permalink URL.

Creates a link to open a specific portal in Ingress Prime.

It is using Firebase's Dynamic Links feature. https://firebase.google.com/docs/dynamic-links/create-manually

Parameters:
Name Type Description
guid string

The globally unique identifier of the portal.

lat number

The latitude of the portal.

lng number

The longitude of the portal.

Returns:
string -

The Ingress Prime link for the portal

static rangeLinkClick()

Changes the coordinates and map scale to show the range for portal links.

static renderDetails(guid, forceSelectopt)

Selects a portal, refresh its data and renders the details of the portal in the sidebar.

Parameters:
Name Type Attributes Default Description
guid string | null

The globally unique identifier of the portal to display details for.

forceSelect boolean <optional>
false

If true, forces the portal to be selected even if it's already the current portal.

static renderToSidebar(portal)

Renders the details of a portal in the sidebar.

Parameters:
Name Type Description
portal L.PortalMarker

The portal marker object holding portal details.

static renderUrl(lat, lng, title, guid)

Generates and displays URLs related to the portal. This includes a permalink for the portal, a link for Ingress Prime, and links to alternative maps. Function is overwritten in app.js

Parameters:
Name Type Description
lat number

The latitude of the portal.

lng number

The longitude of the portal.

title string

The title of the portal.

guid string

The GUID of the portal.

static resetScroll()

Resets the scroll position of the sidebar when a new portal is selected.

static select(guid) → {boolean}

Highlights the selected portal on the map and clears the highlight from the previously selected portal.

Parameters:
Name Type Description
guid string

The GUID of the portal to select.

Returns:
boolean -

True if the same portal is re-selected (just an update), false if a different portal is selected.

static setIndicators(p)

The function adds circles indicating the hack range and link range of the portal. If the portal object are null, the indicators are removed.

Parameters:
Name Type Description
p Object

The portal object for which to set the indicators.