portal_marker

This file contains the code related to creating and updating portal markers on the map.

Methods

inner createMarker(latlng, data) → {L.circleMarker}

Creates a new portal marker on the map.

Parameters:
Name Type Description
latlng L.LatLng

The latitude and longitude where the marker will be placed.

data Object

The IITC-specific entity data to be stored in the marker options.

Returns:
L.circleMarker -

A Leaflet circle marker representing the portal.

inner getMarkerStyleOptions(details) → {Object}

Determines the style options for a portal marker based on its details.

Parameters:
Name Type Description
details Object

Details of the portal, including team and level.

Returns:
Object -

Style options for the portal marker.

inner portalMarkerScale() → {number}

Calculates the scale of portal markers based on the current zoom level of the map.

Returns:
number -

The scale factor for portal markers.

inner setMarkerStyle(marker, selected)

Sets the style of a portal marker, including options for when the portal is selected.

Parameters:
Name Type Description
marker L.circleMarker

The portal marker whose style will be set.

selected boolean

Indicates if the portal is selected.