Namespace for creating, updating and styling portal markers on the map.
Members
-
static, constant scaleSteps :Object
-
Zoom -> scale breakpoints for portal markers as
[minZoom, scale]tiers, checked from the highest zoom down
Methods
-
static create(latlng, data) → {L.PortalMarker}
-
Creates a new portal marker on the map.
Parameters:
Name Type Description latlngL.LatLng The latitude and longitude where the marker will be placed.
dataObject The IITC-specific entity data to be stored in the marker options.
Returns:
L.PortalMarker -A Leaflet circle marker representing the portal.
-
static getStyleOptions(details) → {Object}
-
Determines the style options for a portal marker based on its details.
Parameters:
Name Type Description detailsObject Details of the portal, including team and level.
Returns:
Object -Style options for the portal marker.
-
static scale() → {number}
-
Calculates the scale of portal markers based on the current zoom level of the map.
Returns:
number -The scale factor for portal markers.
-
static setStyle(marker, selected)
-
Sets the style of a portal marker, including options for when the portal is selected.
Parameters:
Name Type Description markerL.PortalMarker The portal marker whose style will be set.
selectedboolean Indicates if the portal is selected.