Namespace for the Leaflet map: setup, map options and the live map data request instance.
Classes
Namespaces
Members
-
static layerOffWarningTemplate :String
-
Warning shown in the portal details panel when some standard layers are turned off
-
static osmAttributionTemplate :String
-
Attribution string for the OpenStreetMap/CartoDB base layers
Methods
-
static setup()
-
Initializes the Leaflet map and configures various map layers and event listeners. This function is responsible for setting up the base map, including the default basemap tiles (CartoDB, Default Ingress Map, Google Maps), and configuring the map's properties such as center, zoom, bounds, and renderer options. It also clears the 'Loading, please wait' message from the map container.
Important functionalities:
- Adds dummy divs to Leaflet control areas to accommodate IITC UI elements.
- Creates and adds base layers and overlays to the map.
- Configures event listeners for map movements, including aborting pending requests and refreshing map data.
- Manages cookies for map position and zoom level.
- Handles the 'iitcLoaded' hook to set the initial map view and evaluate URL parameters for portal selection.