IITC.map.Renderer()

new Renderer()

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

Members

static FIELD_STYLE :Object

Default style for field polygons

Default style for link polylines

Methods

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.

bringPortalsToFront()

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

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.

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.

clearPortalsOutsideBounds(bounds)

Clears portals outside the specified bounds.

Parameters:
Name Type Description
bounds L.LatLngBounds

The bounds to check against.

createFieldEntity(ent)

Creates a field entity from the provided game entity data.

Parameters:
Name Type Description
ent Array

An array representing the game entity.

createLinkEntity(ent)

Creates a link entity from the provided game entity data.

Parameters:
Name Type Description
ent Array

An array representing the game entity.

createPlaceholderPortalEntity(guid, latE6, lngE6, team, timestampopt, 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 Default 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>
0

Timestamp of the portal data. Defaults to 0 to allow newer data sources to override

timestamp number <optional>

The timestamp of the portal data.

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').

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.

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.

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.

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.

endRenderPass()

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

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.

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.

processTileData(tiledata)

Processes tile data including deleted entity GUIDs and game entities.

Parameters:
Name Type Description
tiledata Object

Data for a specific map tile.

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.

rescalePortalMarkers()

Rescales portal markers based on the current map zoom level.

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.