Main code block that renders the portal details in the sidebar and methods that highlight the portal in the map view.
Methods
-
inner getPortalMiscDetails(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.
-
inner makePrimeLink(guid, lat, lng) → {string}
-
Creates a link to open a specific portal in Ingress Prime.
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
-
inner rangeLinkClick()
-
Changes the coordinates and map scale to show the range for portal links.
-
inner renderPortalDetails(guid)
-
Renders the details of a portal in the sidebar.
Parameters:
Name Type Description guid
string | null The globally unique identifier of the portal to display details for.
-
inner renderPortalUrl(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.
-
inner resetScrollOnNewPortal()
-
Resets the scroll position of the sidebar when a new portal is selected.
-
inner selectPortal(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.
-
inner setPortalIndicators(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.