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 guidstring The GUID of the portal.
dObject 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.
It is using Firebase's Dynamic Links feature. https://firebase.google.com/docs/dynamic-links/create-manually
Parameters:
Name Type Description guidstring The globally unique identifier of the portal.
latnumber The latitude of the portal.
lngnumber 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, forceSelectopt)
-
Selects a portal, refresh its data and renders the details of the portal in the sidebar.
Parameters:
Name Type Attributes Default Description guidstring | null The globally unique identifier of the portal to display details for.
forceSelectboolean <optional>
false If true, forces the portal to be selected even if it's already the current portal.
-
inner renderPortalToSideBar(portal)
-
Renders the details of a portal in the sidebar.
Parameters:
Name Type Description portalL.PortalMarker The portal marker object holding portal details.
-
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.jsParameters:
Name Type Description latnumber The latitude of the portal.
lngnumber The longitude of the portal.
titlestring The title of the portal.
guidstring 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 guidstring 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 pObject The portal object for which to set the indicators.