Render()

new Render()

Manages rendering of map data (portals, links, fields) into Leaflet.

Methods

static window.Render#addPortalToMapLayer(portal)

Adds a portal to the visible map layer.

Parameters:
Name Type Description
portal Object

The portal object to add to the map layer.

static window.Render#bringPortalsToFront()

Brings portal markers to the front of the map view, ensuring they are rendered above links and fields.

static window.Render#clearFieldsOutsideBounds(bounds)

Clears fields that are outside the specified bounds.

Parameters:
Name Type Description
bounds L.LatLngBounds

The bounds to check against for field removal.

static window.Render#clearLinksOutsideBounds(bounds)

Clears links that are outside the specified bounds.

Parameters:
Name Type Description
bounds L.LatLngBounds

The bounds to check against for link removal.

static window.Render#clearPortalsOutsideBounds(bounds)

Clears portals outside the specified bounds.

Parameters:
Name Type Description
bounds L.LatLngBounds

The bounds to check against.

static window.Render#createFieldEntity(ent)

Creates a field entity from the provided game entity data.

Parameters:
Name Type Description
ent Array

An array representing the game entity.

static window.Render#createLinkEntity(ent)

Creates a link entity from the provided game entity data.

Parameters:
Name Type Description
ent Array

An array representing the game entity.

static window.Render#createPlaceholderPortalEntity(guid, latE6, lngE6, team, timestampopt)

Creates a placeholder portal entity. This is used when the portal is not fully loaded, but its existence is known from links/fields.

Parameters:
Name Type Attributes Description
guid string

The globally unique identifier of the portal.

latE6 number

The latitude of the portal in E6 format.

lngE6 number

The longitude of the portal in E6 format.

team string

The team faction of the portal.

timestamp number <optional>

The timestamp of the portal data.

static window.Render#createPortalEntity(ent, details)

Creates a portal entity from the provided game entity data. If the portal already exists and the new data is more recent, it replaces the existing data.

Parameters:
Name Type Description
ent Array

An array representing the game entity.

details string

Detail level expected in window.decodeArray.portal (e.g., 'core', 'summary').

static window.Render#deleteEntity(guid)

Deletes an entity (portal, link, or field) from the map based on its GUID.

Parameters:
Name Type Description
guid string

The globally unique identifier of the entity to delete.

static window.Render#deleteFieldEntity(guid)

Deletes a field entity from the map based on its GUID.

Parameters:
Name Type Description
guid string

The globally unique identifier of the field to delete.

static window.Render#deleteLinkEntity(guid)

Deletes a link entity from the map based on its GUID.

Parameters:
Name Type Description
guid string

The globally unique identifier of the link to delete.

static window.Render#deletePortalEntity(guid)

Deletes a portal entity from the map based on its GUID.

Parameters:
Name Type Description
guid string

The globally unique identifier of the portal to delete.

static window.Render#endRenderPass()

Ends a render pass. This includes cleanup and processing of any remaining data. Called when the render is considered complete.

static window.Render#processDeletedGameEntityGuids(deleted)

Processes deleted game entity GUIDs and removes them from the map.

Parameters:
Name Type Description
deleted Array

Array of deleted game entity GUIDs.

static window.Render#processGameEntities(entities, details)

Processes game entities (fields, links, portals) and creates them on the map.

Parameters:
Name Type Description
entities Array

Array of game entities.

details string

Details for the window.decodeArray.portal function.

static window.Render#processTileData(tiledata)

Processes tile data including deleted entity GUIDs and game entities.

Parameters:
Name Type Description
tiledata Object

Data for a specific map tile.

static window.Render#removePortalFromMapLayer(portal)

Removes a portal from the visible map layer.

Parameters:
Name Type Description
portal Object

The portal object to remove from the map layer.

static window.Render#rescalePortalMarkers()

Rescales portal markers based on the current map zoom level.

static window.Render#startRenderPass(bounds)

Initiates a render pass. It's called at the start of making a batch of data requests to the servers.

Parameters:
Name Type Description
bounds L.LatLngBounds

The bounds within which the render pass will occur.