maplair 4.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2804 -0
- package/LICENSE +27 -0
- package/README.md +40 -0
- package/dist/esm/Maplair.js +71 -0
- package/dist/esm/Maplair.js.map +1 -0
- package/dist/esm/_virtual/_rolldown/runtime.js +13 -0
- package/dist/esm/control/AttributionControl.js +79 -0
- package/dist/esm/control/AttributionControl.js.map +1 -0
- package/dist/esm/control/Control.js +81 -0
- package/dist/esm/control/Control.js.map +1 -0
- package/dist/esm/control/LayersControl.js +220 -0
- package/dist/esm/control/LayersControl.js.map +1 -0
- package/dist/esm/control/ScaleControl.js +72 -0
- package/dist/esm/control/ScaleControl.js.map +1 -0
- package/dist/esm/control/ZoomControl.js +86 -0
- package/dist/esm/control/ZoomControl.js.map +1 -0
- package/dist/esm/core/Browser.js +31 -0
- package/dist/esm/core/Browser.js.map +1 -0
- package/dist/esm/core/Class.js +52 -0
- package/dist/esm/core/Class.js.map +1 -0
- package/dist/esm/core/Events.js +149 -0
- package/dist/esm/core/Events.js.map +1 -0
- package/dist/esm/core/Handler.js +32 -0
- package/dist/esm/core/Handler.js.map +1 -0
- package/dist/esm/core/I18n.js +36 -0
- package/dist/esm/core/I18n.js.map +1 -0
- package/dist/esm/core/Util.js +71 -0
- package/dist/esm/core/Util.js.map +1 -0
- package/dist/esm/dom/DomEvent.DoubleTap.js +74 -0
- package/dist/esm/dom/DomEvent.DoubleTap.js.map +1 -0
- package/dist/esm/dom/DomEvent.PointerEvents.js +46 -0
- package/dist/esm/dom/DomEvent.PointerEvents.js.map +1 -0
- package/dist/esm/dom/DomEvent.js +135 -0
- package/dist/esm/dom/DomEvent.js.map +1 -0
- package/dist/esm/dom/DomUtil.js +107 -0
- package/dist/esm/dom/DomUtil.js.map +1 -0
- package/dist/esm/dom/Draggable.js +107 -0
- package/dist/esm/dom/Draggable.js.map +1 -0
- package/dist/esm/dom/PosAnimation.js +56 -0
- package/dist/esm/dom/PosAnimation.js.map +1 -0
- package/dist/esm/geo/LatLng.js +65 -0
- package/dist/esm/geo/LatLng.js.map +1 -0
- package/dist/esm/geo/LatLngBounds.js +114 -0
- package/dist/esm/geo/LatLngBounds.js.map +1 -0
- package/dist/esm/geo/crs/CRS.js +51 -0
- package/dist/esm/geo/crs/CRS.js.map +1 -0
- package/dist/esm/geo/crs/EPSG3395.js +16 -0
- package/dist/esm/geo/crs/EPSG3395.js.map +1 -0
- package/dist/esm/geo/crs/EPSG3857.js +19 -0
- package/dist/esm/geo/crs/EPSG3857.js.map +1 -0
- package/dist/esm/geo/crs/EPSG4326.js +13 -0
- package/dist/esm/geo/crs/EPSG4326.js.map +1 -0
- package/dist/esm/geo/crs/EarthCRS.js +14 -0
- package/dist/esm/geo/crs/EarthCRS.js.map +1 -0
- package/dist/esm/geo/crs/SimpleCRS.js +23 -0
- package/dist/esm/geo/crs/SimpleCRS.js.map +1 -0
- package/dist/esm/geo/projection/Projection.LonLat.js +19 -0
- package/dist/esm/geo/projection/Projection.LonLat.js.map +1 -0
- package/dist/esm/geo/projection/Projection.Mercator.js +33 -0
- package/dist/esm/geo/projection/Projection.Mercator.js.map +1 -0
- package/dist/esm/geo/projection/Projection.SphericalMercator.js +27 -0
- package/dist/esm/geo/projection/Projection.SphericalMercator.js.map +1 -0
- package/dist/esm/geo/projection/index.js +14 -0
- package/dist/esm/geo/projection/index.js.map +1 -0
- package/dist/esm/geometry/Bounds.js +91 -0
- package/dist/esm/geometry/Bounds.js.map +1 -0
- package/dist/esm/geometry/LineUtil.js +169 -0
- package/dist/esm/geometry/LineUtil.js.map +1 -0
- package/dist/esm/geometry/Point.js +119 -0
- package/dist/esm/geometry/Point.js.map +1 -0
- package/dist/esm/geometry/PolyUtil.js +89 -0
- package/dist/esm/geometry/PolyUtil.js.map +1 -0
- package/dist/esm/geometry/Transformation.js +34 -0
- package/dist/esm/geometry/Transformation.js.map +1 -0
- package/dist/esm/layer/BlanketOverlay.js +87 -0
- package/dist/esm/layer/BlanketOverlay.js.map +1 -0
- package/dist/esm/layer/DivOverlay.js +192 -0
- package/dist/esm/layer/DivOverlay.js.map +1 -0
- package/dist/esm/layer/FeatureGroup.js +40 -0
- package/dist/esm/layer/FeatureGroup.js.map +1 -0
- package/dist/esm/layer/GeoJSON.js +192 -0
- package/dist/esm/layer/GeoJSON.js.map +1 -0
- package/dist/esm/layer/ImageOverlay.js +140 -0
- package/dist/esm/layer/ImageOverlay.js.map +1 -0
- package/dist/esm/layer/Layer.js +119 -0
- package/dist/esm/layer/Layer.js.map +1 -0
- package/dist/esm/layer/LayerGroup.js +58 -0
- package/dist/esm/layer/LayerGroup.js.map +1 -0
- package/dist/esm/layer/Popup.js +224 -0
- package/dist/esm/layer/Popup.js.map +1 -0
- package/dist/esm/layer/SVGOverlay.js +21 -0
- package/dist/esm/layer/SVGOverlay.js.map +1 -0
- package/dist/esm/layer/Tooltip.js +228 -0
- package/dist/esm/layer/Tooltip.js.map +1 -0
- package/dist/esm/layer/VideoOverlay.js +54 -0
- package/dist/esm/layer/VideoOverlay.js.map +1 -0
- package/dist/esm/layer/marker/DefaultIcon.js +50 -0
- package/dist/esm/layer/marker/DefaultIcon.js.map +1 -0
- package/dist/esm/layer/marker/DivIcon.js +37 -0
- package/dist/esm/layer/marker/DivIcon.js.map +1 -0
- package/dist/esm/layer/marker/Icon.js +65 -0
- package/dist/esm/layer/marker/Icon.js.map +1 -0
- package/dist/esm/layer/marker/Marker.Drag.js +77 -0
- package/dist/esm/layer/marker/Marker.Drag.js.map +1 -0
- package/dist/esm/layer/marker/Marker.js +235 -0
- package/dist/esm/layer/marker/Marker.js.map +1 -0
- package/dist/esm/layer/tile/GridLayer.js +447 -0
- package/dist/esm/layer/tile/GridLayer.js.map +1 -0
- package/dist/esm/layer/tile/TileLayer.js +139 -0
- package/dist/esm/layer/tile/TileLayer.js.map +1 -0
- package/dist/esm/layer/tile/WMSTileLayer.js +68 -0
- package/dist/esm/layer/tile/WMSTileLayer.js.map +1 -0
- package/dist/esm/layer/vector/Canvas.js +292 -0
- package/dist/esm/layer/vector/Canvas.js.map +1 -0
- package/dist/esm/layer/vector/Circle.js +35 -0
- package/dist/esm/layer/vector/Circle.js.map +1 -0
- package/dist/esm/layer/vector/CircleMarker.js +69 -0
- package/dist/esm/layer/vector/CircleMarker.js.map +1 -0
- package/dist/esm/layer/vector/Path.js +68 -0
- package/dist/esm/layer/vector/Path.js.map +1 -0
- package/dist/esm/layer/vector/Polygon.js +70 -0
- package/dist/esm/layer/vector/Polygon.js.map +1 -0
- package/dist/esm/layer/vector/Polyline.js +152 -0
- package/dist/esm/layer/vector/Polyline.js.map +1 -0
- package/dist/esm/layer/vector/Rectangle.js +25 -0
- package/dist/esm/layer/vector/Rectangle.js.map +1 -0
- package/dist/esm/layer/vector/Renderer.getRenderer.js +31 -0
- package/dist/esm/layer/vector/Renderer.getRenderer.js.map +1 -0
- package/dist/esm/layer/vector/Renderer.js +39 -0
- package/dist/esm/layer/vector/Renderer.js.map +1 -0
- package/dist/esm/layer/vector/SVG.js +115 -0
- package/dist/esm/layer/vector/SVG.js.map +1 -0
- package/dist/esm/map/Map.js +844 -0
- package/dist/esm/map/Map.js.map +1 -0
- package/dist/esm/map/handler/BoxZoomHandler.js +105 -0
- package/dist/esm/map/handler/BoxZoomHandler.js.map +1 -0
- package/dist/esm/map/handler/DoubleClickZoomHandler.js +27 -0
- package/dist/esm/map/handler/DoubleClickZoomHandler.js.map +1 -0
- package/dist/esm/map/handler/DragHandler.js +133 -0
- package/dist/esm/map/handler/DragHandler.js.map +1 -0
- package/dist/esm/map/handler/KeyboardHandler.js +117 -0
- package/dist/esm/map/handler/KeyboardHandler.js.map +1 -0
- package/dist/esm/map/handler/PinchZoomHandler.js +96 -0
- package/dist/esm/map/handler/PinchZoomHandler.js.map +1 -0
- package/dist/esm/map/handler/ScrollWheelZoomHandler.js +50 -0
- package/dist/esm/map/handler/ScrollWheelZoomHandler.js.map +1 -0
- package/dist/esm/map/handler/TapHoldHandler.js +77 -0
- package/dist/esm/map/handler/TapHoldHandler.js.map +1 -0
- package/dist/esm/package.js +6 -0
- package/dist/esm/package.js.map +1 -0
- package/dist/images/layers.svg +1 -0
- package/dist/images/logo.svg +1 -0
- package/dist/images/marker-icon.svg +1 -0
- package/dist/images/marker-shadow.svg +1 -0
- package/dist/maplair-global-src.js +6810 -0
- package/dist/maplair-global-src.js.map +1 -0
- package/dist/maplair-global.js +12 -0
- package/dist/maplair-global.js.map +1 -0
- package/dist/maplair-src.js +6704 -0
- package/dist/maplair-src.js.map +1 -0
- package/dist/maplair.css +730 -0
- package/dist/maplair.js +7 -0
- package/dist/maplair.js.map +1 -0
- package/i18n/cs.json +12 -0
- package/i18n/de.json +12 -0
- package/i18n/en.json +12 -0
- package/i18n/es.json +12 -0
- package/i18n/fr.json +12 -0
- package/i18n/hu.json +12 -0
- package/i18n/it.json +12 -0
- package/i18n/rm.json +12 -0
- package/i18n/sk.json +12 -0
- package/i18n/sl.json +12 -0
- package/package.json +87 -0
- package/src/Maplair.js +24 -0
- package/src/control/AttributionControl.js +147 -0
- package/src/control/Control.js +174 -0
- package/src/control/LayersControl.js +444 -0
- package/src/control/ScaleControl.js +141 -0
- package/src/control/ZoomControl.js +147 -0
- package/src/control/index.js +5 -0
- package/src/core/Browser.js +75 -0
- package/src/core/Class.js +97 -0
- package/src/core/Events.js +334 -0
- package/src/core/Handler.js +59 -0
- package/src/core/I18n.js +76 -0
- package/src/core/Util.js +122 -0
- package/src/core/index.js +8 -0
- package/src/dom/DomEvent.DoubleTap.js +120 -0
- package/src/dom/DomEvent.PointerEvents.js +75 -0
- package/src/dom/DomEvent.js +282 -0
- package/src/dom/DomUtil.js +175 -0
- package/src/dom/Draggable.js +204 -0
- package/src/dom/PosAnimation.js +115 -0
- package/src/dom/index.js +9 -0
- package/src/geo/LatLng.js +163 -0
- package/src/geo/LatLngBounds.js +260 -0
- package/src/geo/crs/CRS.js +143 -0
- package/src/geo/crs/EPSG3395.js +19 -0
- package/src/geo/crs/EPSG3857.js +26 -0
- package/src/geo/crs/EPSG4326.js +21 -0
- package/src/geo/crs/EarthCRS.js +32 -0
- package/src/geo/crs/SimpleCRS.js +35 -0
- package/src/geo/crs/index.js +6 -0
- package/src/geo/index.js +7 -0
- package/src/geo/projection/Projection.LonLat.js +30 -0
- package/src/geo/projection/Projection.Mercator.js +53 -0
- package/src/geo/projection/Projection.SphericalMercator.js +46 -0
- package/src/geo/projection/index.js +26 -0
- package/src/geometry/Bounds.js +222 -0
- package/src/geometry/LineUtil.js +299 -0
- package/src/geometry/Point.js +239 -0
- package/src/geometry/PolyUtil.js +129 -0
- package/src/geometry/Transformation.js +67 -0
- package/src/geometry/index.js +8 -0
- package/src/images/layers.svg +1 -0
- package/src/images/logo.svg +1 -0
- package/src/images/marker-icon.svg +1 -0
- package/src/images/marker-shadow.svg +1 -0
- package/src/layer/BlanketOverlay.js +171 -0
- package/src/layer/DivOverlay.js +353 -0
- package/src/layer/FeatureGroup.js +93 -0
- package/src/layer/GeoJSON.js +432 -0
- package/src/layer/ImageOverlay.js +279 -0
- package/src/layer/Layer.js +273 -0
- package/src/layer/LayerGroup.js +129 -0
- package/src/layer/Popup.js +528 -0
- package/src/layer/SVGOverlay.js +47 -0
- package/src/layer/Tooltip.js +469 -0
- package/src/layer/VideoOverlay.js +111 -0
- package/src/layer/index.js +18 -0
- package/src/layer/marker/DefaultIcon.js +79 -0
- package/src/layer/marker/DivIcon.js +76 -0
- package/src/layer/marker/Icon.js +164 -0
- package/src/layer/marker/Marker.Drag.js +161 -0
- package/src/layer/marker/Marker.js +465 -0
- package/src/layer/marker/index.js +5 -0
- package/src/layer/tile/GridLayer.js +901 -0
- package/src/layer/tile/TileLayer.js +299 -0
- package/src/layer/tile/WMSTileLayer.js +133 -0
- package/src/layer/tile/index.js +3 -0
- package/src/layer/vector/Canvas.js +479 -0
- package/src/layer/vector/Circle.js +87 -0
- package/src/layer/vector/CircleMarker.js +110 -0
- package/src/layer/vector/Path.js +145 -0
- package/src/layer/vector/Polygon.js +160 -0
- package/src/layer/vector/Polyline.js +296 -0
- package/src/layer/vector/Rectangle.js +52 -0
- package/src/layer/vector/Renderer.getRenderer.js +48 -0
- package/src/layer/vector/Renderer.js +75 -0
- package/src/layer/vector/SVG.js +216 -0
- package/src/layer/vector/index.js +10 -0
- package/src/map/Map.js +1830 -0
- package/src/map/handler/BoxZoomHandler.js +156 -0
- package/src/map/handler/DoubleClickZoomHandler.js +62 -0
- package/src/map/handler/DragHandler.js +240 -0
- package/src/map/handler/KeyboardHandler.js +188 -0
- package/src/map/handler/PinchZoomHandler.js +157 -0
- package/src/map/handler/ScrollWheelZoomHandler.js +98 -0
- package/src/map/handler/TapHoldHandler.js +111 -0
- package/src/map/index.js +8 -0
- package/src/maplair.css +730 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Maplair contributors
|
|
4
|
+
Copyright (c) 2010-2026, Volodymyr Agafonkin
|
|
5
|
+
Copyright (c) 2010-2011, CloudMade
|
|
6
|
+
All rights reserved.
|
|
7
|
+
|
|
8
|
+
Redistribution and use in source and binary forms, with or without
|
|
9
|
+
modification, are permitted provided that the following conditions are met:
|
|
10
|
+
|
|
11
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
12
|
+
list of conditions and the following disclaimer.
|
|
13
|
+
|
|
14
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
15
|
+
this list of conditions and the following disclaimer in the documentation
|
|
16
|
+
and/or other materials provided with the distribution.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
19
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
20
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
22
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
24
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
25
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
26
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<img width="600" src="src/images/logo.svg" alt="Maplair" />
|
|
2
|
+
|
|
3
|
+
Maplair is the leading open-source JavaScript library for **building powerful interactive maps**.
|
|
4
|
+
|
|
5
|
+
Weighing just about 40 kB of gzipped JS plus 3.2 kB of gzipped CSS code, it has all the mapping [features][] most developers ever need.
|
|
6
|
+
|
|
7
|
+
Maplair is designed with *simplicity*, *performance* and *usability* in mind.
|
|
8
|
+
It works efficiently across all major desktop and mobile platforms out of the box,
|
|
9
|
+
taking advantage of modern browser features while being accessible on older ones too.
|
|
10
|
+
It can be extended with a huge amount of [plugins][],
|
|
11
|
+
has a beautiful, easy to use and [well-documented][] API
|
|
12
|
+
and a simple, readable [source code][] that is a joy to [contribute][] to.
|
|
13
|
+
|
|
14
|
+
For more info, docs and tutorials, check out the [official website][].<br>
|
|
15
|
+
For **Maplair downloads** (including the built main version), check out the [download page][].
|
|
16
|
+
|
|
17
|
+
We're happy to meet new contributors.
|
|
18
|
+
If you want to **get involved** with Maplair development, check out the [contribution guide][contribute].
|
|
19
|
+
Let's make the best mapping library that will ever exist,
|
|
20
|
+
and push the limits of what's possible with online maps!
|
|
21
|
+
|
|
22
|
+
## Authors
|
|
23
|
+
|
|
24
|
+
Maplair is a fork of [Leaflet](https://leafletjs.com), created in 2010 by [Volodymyr Agafonkin](https://agafonkin.com).
|
|
25
|
+
Major contributors include Iván Sánchez Ortega, Dave Leaver, Yohan Boniface, Jon Koops,
|
|
26
|
+
Florian Bischof, Per Liedman, John Firebaugh and Simon Legner,
|
|
27
|
+
along with [hundreds of other contributors][contributors].
|
|
28
|
+
|
|
29
|
+
[](https://github.com/maplair/maplair/actions/workflows/main.yml)
|
|
30
|
+
|
|
31
|
+
[contributors]: https://github.com/maplair/maplair/graphs/contributors
|
|
32
|
+
[features]: https://maplair.org/#features
|
|
33
|
+
[plugins]: https://maplair.org/plugins.html
|
|
34
|
+
[well-documented]: https://maplair.org/reference.html "Maplair API reference"
|
|
35
|
+
[source code]: https://github.com/maplair/maplair "Maplair GitHub repository"
|
|
36
|
+
[hosted on GitHub]: https://github.com/maplair/maplair
|
|
37
|
+
[contribute]: https://github.com/maplair/maplair/blob/main/CONTRIBUTING.md "A guide to contributing to Maplair"
|
|
38
|
+
[official website]: https://maplair.org
|
|
39
|
+
[download page]: https://maplair.org/download.html
|
|
40
|
+
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { version as version$1 } from "./package.js";
|
|
2
|
+
import { Util_exports } from "./core/Util.js";
|
|
3
|
+
import { Class } from "./core/Class.js";
|
|
4
|
+
import { Point } from "./geometry/Point.js";
|
|
5
|
+
import Browser_default from "./core/Browser.js";
|
|
6
|
+
import { DomEvent_exports } from "./dom/DomEvent.js";
|
|
7
|
+
import { DomUtil_exports } from "./dom/DomUtil.js";
|
|
8
|
+
import { Control } from "./control/Control.js";
|
|
9
|
+
import { I18n } from "./core/I18n.js";
|
|
10
|
+
import { AttributionControl } from "./control/AttributionControl.js";
|
|
11
|
+
import { LayersControl } from "./control/LayersControl.js";
|
|
12
|
+
import { ScaleControl } from "./control/ScaleControl.js";
|
|
13
|
+
import { ZoomControl } from "./control/ZoomControl.js";
|
|
14
|
+
import { Evented } from "./core/Events.js";
|
|
15
|
+
import { Handler } from "./core/Handler.js";
|
|
16
|
+
import { PosAnimation } from "./dom/PosAnimation.js";
|
|
17
|
+
import { Draggable } from "./dom/Draggable.js";
|
|
18
|
+
import { Bounds } from "./geometry/Bounds.js";
|
|
19
|
+
import { Transformation } from "./geometry/Transformation.js";
|
|
20
|
+
import { LatLngBounds } from "./geo/LatLngBounds.js";
|
|
21
|
+
import { CRS } from "./geo/crs/CRS.js";
|
|
22
|
+
import { EarthCRS } from "./geo/crs/EarthCRS.js";
|
|
23
|
+
import { LatLng } from "./geo/LatLng.js";
|
|
24
|
+
import { PolyUtil_exports } from "./geometry/PolyUtil.js";
|
|
25
|
+
import { LineUtil_exports } from "./geometry/LineUtil.js";
|
|
26
|
+
import { projection_exports } from "./geo/projection/index.js";
|
|
27
|
+
import { EPSG3395 } from "./geo/crs/EPSG3395.js";
|
|
28
|
+
import { EPSG3857, EPSG900913 } from "./geo/crs/EPSG3857.js";
|
|
29
|
+
import { EPSG4326 } from "./geo/crs/EPSG4326.js";
|
|
30
|
+
import { SimpleCRS } from "./geo/crs/SimpleCRS.js";
|
|
31
|
+
import { Layer } from "./layer/Layer.js";
|
|
32
|
+
import { LayerGroup } from "./layer/LayerGroup.js";
|
|
33
|
+
import { FeatureGroup } from "./layer/FeatureGroup.js";
|
|
34
|
+
import { Icon } from "./layer/marker/Icon.js";
|
|
35
|
+
import { DefaultIcon } from "./layer/marker/DefaultIcon.js";
|
|
36
|
+
import { Marker } from "./layer/marker/Marker.js";
|
|
37
|
+
import { Path } from "./layer/vector/Path.js";
|
|
38
|
+
import { CircleMarker } from "./layer/vector/CircleMarker.js";
|
|
39
|
+
import { Circle } from "./layer/vector/Circle.js";
|
|
40
|
+
import { Polyline } from "./layer/vector/Polyline.js";
|
|
41
|
+
import { Polygon } from "./layer/vector/Polygon.js";
|
|
42
|
+
import { GeoJSON } from "./layer/GeoJSON.js";
|
|
43
|
+
import { BlanketOverlay } from "./layer/BlanketOverlay.js";
|
|
44
|
+
import { ImageOverlay } from "./layer/ImageOverlay.js";
|
|
45
|
+
import { VideoOverlay } from "./layer/VideoOverlay.js";
|
|
46
|
+
import { SVGOverlay } from "./layer/SVGOverlay.js";
|
|
47
|
+
import { DivOverlay } from "./layer/DivOverlay.js";
|
|
48
|
+
import { Popup } from "./layer/Popup.js";
|
|
49
|
+
import { Tooltip } from "./layer/Tooltip.js";
|
|
50
|
+
import { DivIcon } from "./layer/marker/DivIcon.js";
|
|
51
|
+
import { GridLayer } from "./layer/tile/GridLayer.js";
|
|
52
|
+
import { TileLayer } from "./layer/tile/TileLayer.js";
|
|
53
|
+
import { WMSTileLayer } from "./layer/tile/WMSTileLayer.js";
|
|
54
|
+
import { Renderer } from "./layer/vector/Renderer.js";
|
|
55
|
+
import { Canvas } from "./layer/vector/Canvas.js";
|
|
56
|
+
import { SVG } from "./layer/vector/SVG.js";
|
|
57
|
+
import { Rectangle } from "./layer/vector/Rectangle.js";
|
|
58
|
+
import { BoxZoomHandler } from "./map/handler/BoxZoomHandler.js";
|
|
59
|
+
import { DoubleClickZoomHandler } from "./map/handler/DoubleClickZoomHandler.js";
|
|
60
|
+
import { DragHandler } from "./map/handler/DragHandler.js";
|
|
61
|
+
import { KeyboardHandler } from "./map/handler/KeyboardHandler.js";
|
|
62
|
+
import { PinchZoomHandler } from "./map/handler/PinchZoomHandler.js";
|
|
63
|
+
import { ScrollWheelZoomHandler } from "./map/handler/ScrollWheelZoomHandler.js";
|
|
64
|
+
import { TapHoldHandler } from "./map/handler/TapHoldHandler.js";
|
|
65
|
+
import { Map, MaplairMap } from "./map/Map.js";
|
|
66
|
+
//#region src/Maplair.js
|
|
67
|
+
const version = version$1;
|
|
68
|
+
//#endregion
|
|
69
|
+
export { AttributionControl, BlanketOverlay, Bounds, BoxZoomHandler, Browser_default as Browser, CRS, Canvas, Circle, CircleMarker, Class, Control, DefaultIcon, DivIcon, DivOverlay, DomEvent_exports as DomEvent, DomUtil_exports as DomUtil, DoubleClickZoomHandler, DragHandler, Draggable, EPSG3395, EPSG3857, EPSG4326, EPSG900913, EarthCRS, Evented, FeatureGroup, GeoJSON, GridLayer, Handler, I18n, Icon, ImageOverlay, KeyboardHandler, LatLng, LatLngBounds, Layer, LayerGroup, LayersControl, LineUtil_exports as LineUtil, Map, MaplairMap, Marker, Path, PinchZoomHandler, Point, PolyUtil_exports as PolyUtil, Polygon, Polyline, Popup, PosAnimation, projection_exports as Projection, Rectangle, Renderer, SVG, SVGOverlay, ScaleControl, ScrollWheelZoomHandler, SimpleCRS, TapHoldHandler, TileLayer, Tooltip, Transformation, Util_exports as Util, VideoOverlay, WMSTileLayer, ZoomControl, version };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=Maplair.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Maplair.js","names":["pkg.version"],"sources":["../../src/Maplair.js"],"sourcesContent":["import pkg from '../package.json' with {type: 'json'};\nexport const version = pkg.version;\n\n// control\nexport * from './control/index.js';\n\n// core\nexport * from './core/index.js';\n\n// dom\nexport * from './dom/index.js';\n\n// geometry\nexport * from './geometry/index.js';\n\n// geo\nexport * from './geo/index.js';\n\n// layer\nexport * from './layer/index.js';\n\n// map\nexport * from './map/index.js';\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAa,UAAUA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { disableClickPropagation } from "../dom/DomEvent.js";
|
|
2
|
+
import { create } from "../dom/DomUtil.js";
|
|
3
|
+
import { Control } from "./Control.js";
|
|
4
|
+
import { I18n } from "../core/I18n.js";
|
|
5
|
+
//#region src/control/AttributionControl.js
|
|
6
|
+
const mapleLeaf = "<span aria-hidden=\"true\" class=\"maplair-attribution-leaf\">🍁</span>";
|
|
7
|
+
var AttributionControl = class AttributionControl extends Control {
|
|
8
|
+
static {
|
|
9
|
+
this.setDefaultOptions({
|
|
10
|
+
position: "bottomright",
|
|
11
|
+
prefix: null
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
constructor(options) {
|
|
15
|
+
super(options);
|
|
16
|
+
if (this.options.prefix === null) {
|
|
17
|
+
const title = I18n.translate("A JavaScript library for interactive maps");
|
|
18
|
+
this.options.prefix = `<a target="_blank" href="https://maplair.org" title="${title}">${mapleLeaf}Maplair</a>`;
|
|
19
|
+
}
|
|
20
|
+
this._attributions = {};
|
|
21
|
+
this.callInitHooks(AttributionControl);
|
|
22
|
+
}
|
|
23
|
+
onAdd(map) {
|
|
24
|
+
map.attributionControl = this;
|
|
25
|
+
this._container = create("div", "maplair-control-attribution");
|
|
26
|
+
disableClickPropagation(this._container);
|
|
27
|
+
for (const layer of Object.values(map._layers)) if (layer.getAttribution) this.addAttribution(layer.getAttribution());
|
|
28
|
+
this._update();
|
|
29
|
+
map.on("layeradd", this._addAttribution, this);
|
|
30
|
+
return this._container;
|
|
31
|
+
}
|
|
32
|
+
onRemove(map) {
|
|
33
|
+
map.off("layeradd", this._addAttribution, this);
|
|
34
|
+
}
|
|
35
|
+
_addAttribution(ev) {
|
|
36
|
+
if (ev.layer.getAttribution) {
|
|
37
|
+
this.addAttribution(ev.layer.getAttribution());
|
|
38
|
+
ev.layer.once("remove", () => this.removeAttribution(ev.layer.getAttribution()));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
setPrefix(prefix) {
|
|
42
|
+
this.options.prefix = prefix;
|
|
43
|
+
this._update();
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
addAttribution(text) {
|
|
47
|
+
if (!text) return this;
|
|
48
|
+
if (!this._attributions[text]) this._attributions[text] = 0;
|
|
49
|
+
this._attributions[text]++;
|
|
50
|
+
this._update();
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
removeAttribution(text) {
|
|
54
|
+
if (!text) return this;
|
|
55
|
+
if (this._attributions[text]) {
|
|
56
|
+
this._attributions[text]--;
|
|
57
|
+
this._update();
|
|
58
|
+
}
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
_update() {
|
|
62
|
+
if (!this._map) return;
|
|
63
|
+
const attribs = Object.keys(this._attributions).filter((i) => this._attributions[i]);
|
|
64
|
+
const prefixAndAttribs = [];
|
|
65
|
+
if (this.options.prefix) prefixAndAttribs.push(this.options.prefix);
|
|
66
|
+
if (attribs.length) prefixAndAttribs.push(attribs.join(", "));
|
|
67
|
+
this._container.innerHTML = prefixAndAttribs.join(" <span aria-hidden=\"true\">|</span> ");
|
|
68
|
+
}
|
|
69
|
+
static register(MaplairMap) {
|
|
70
|
+
MaplairMap.mergeOptions({ attributionControl: true });
|
|
71
|
+
MaplairMap.addInitHook(function() {
|
|
72
|
+
if (this.options.attributionControl) new AttributionControl().addTo(this);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
export { AttributionControl };
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=AttributionControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttributionControl.js","names":["DomUtil.create"],"sources":["../../../src/control/AttributionControl.js"],"sourcesContent":["\nimport {Control} from './Control.js';\nimport * as DomEvent from '../dom/DomEvent.js';\nimport * as DomUtil from '../dom/DomUtil.js';\nimport {I18n} from '../core/I18n.js';\n\nconst mapleLeaf = '<span aria-hidden=\"true\" class=\"maplair-attribution-leaf\">🍁</span>';\n\n/*\n * @class AttributionControl\n * @inherits Control\n *\n * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control.\n */\n\n// @namespace AttributionControl\n// @constructor AttributionControl(options: AttributionControl options)\n// Creates an attribution control.\nexport class AttributionControl extends Control {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka AttributionControl options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option position: String = 'bottomright'\n\t\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\n\t\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\n\t\t\tposition: 'bottomright',\n\n\t\t\t// @option prefix: String|false = 'Maplair'\n\t\t\t// The HTML text shown before the attributions. Pass `false` to disable.\n\t\t\tprefix: null\n\t\t});\n\t}\n\n\tconstructor(options) {\n\t\tsuper(options);\n\t\tif (this.options.prefix === null) {\n\t\t\tconst title = I18n.translate('A JavaScript library for interactive maps');\n\t\t\tthis.options.prefix = `<a target=\"_blank\" href=\"https://maplair.org\" title=\"${title}\">${mapleLeaf}Maplair</a>`;\n\t\t}\n\n\t\tthis._attributions = {};\n\n\t\tthis.callInitHooks(AttributionControl);\n\t}\n\n\tonAdd(map) {\n\t\tmap.attributionControl = this;\n\t\tthis._container = DomUtil.create('div', 'maplair-control-attribution');\n\t\tDomEvent.disableClickPropagation(this._container);\n\n\t\t// TODO ugly, refactor\n\t\tfor (const layer of Object.values(map._layers)) {\n\t\t\tif (layer.getAttribution) {\n\t\t\t\tthis.addAttribution(layer.getAttribution());\n\t\t\t}\n\t\t}\n\n\t\tthis._update();\n\n\t\tmap.on('layeradd', this._addAttribution, this);\n\n\t\treturn this._container;\n\t}\n\n\tonRemove(map) {\n\t\tmap.off('layeradd', this._addAttribution, this);\n\t}\n\n\t_addAttribution(ev) {\n\t\tif (ev.layer.getAttribution) {\n\t\t\tthis.addAttribution(ev.layer.getAttribution());\n\t\t\tev.layer.once('remove', () => this.removeAttribution(ev.layer.getAttribution()));\n\t\t}\n\t}\n\n\t// @method setPrefix(prefix: String|false): this\n\t// The HTML text shown before the attributions. Pass `false` to disable.\n\tsetPrefix(prefix) {\n\t\tthis.options.prefix = prefix;\n\t\tthis._update();\n\t\treturn this;\n\t}\n\n\t// @method addAttribution(text: String): this\n\t// Adds an attribution text (e.g. `'© OpenStreetMap contributors'`).\n\taddAttribution(text) {\n\t\tif (!text) { return this; }\n\n\t\tif (!this._attributions[text]) {\n\t\t\tthis._attributions[text] = 0;\n\t\t}\n\t\tthis._attributions[text]++;\n\n\t\tthis._update();\n\n\t\treturn this;\n\t}\n\n\t// @method removeAttribution(text: String): this\n\t// Removes an attribution text.\n\tremoveAttribution(text) {\n\t\tif (!text) { return this; }\n\n\t\tif (this._attributions[text]) {\n\t\t\tthis._attributions[text]--;\n\t\t\tthis._update();\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t_update() {\n\t\tif (!this._map) { return; }\n\n\t\tconst attribs = Object.keys(this._attributions).filter(i => this._attributions[i]);\n\n\t\tconst prefixAndAttribs = [];\n\n\t\tif (this.options.prefix) {\n\t\t\tprefixAndAttribs.push(this.options.prefix);\n\t\t}\n\t\tif (attribs.length) {\n\t\t\tprefixAndAttribs.push(attribs.join(', '));\n\t\t}\n\n\t\tthis._container.innerHTML = prefixAndAttribs.join(' <span aria-hidden=\"true\">|</span> ');\n\t}\n\n\t// Registers this default feature on the map class, called by `MaplairMap` itself.\n\tstatic register(MaplairMap) {\n\t\t// @namespace MaplairMap\n\t\t// @section Control options\n\t\t// @option attributionControl: Boolean = true\n\t\t// Whether a [attribution control](#control-attribution) is added to the map by default.\n\t\tMaplairMap.mergeOptions({\n\t\t\tattributionControl: true\n\t\t});\n\n\t\tMaplairMap.addInitHook(function () {\n\t\t\tif (this.options.attributionControl) {\n\t\t\t\tnew AttributionControl().addTo(this);\n\t\t\t}\n\t\t});\n\t}\n}\n"],"mappings":";;;;;AAMA,MAAM,YAAY;AAYlB,IAAa,qBAAb,MAAa,2BAA2B,QAAQ;CAE/C;EAGC,KAAK,kBAAkB;GAItB,UAAU;GAIV,QAAQ;EACT,CAAC;CACF;CAEA,YAAY,SAAS;EACpB,MAAM,OAAO;EACb,IAAI,KAAK,QAAQ,WAAW,MAAM;GACjC,MAAM,QAAQ,KAAK,UAAU,2CAA2C;GACxE,KAAK,QAAQ,SAAS,wDAAwD,MAAM,IAAI,UAAU;EACnG;EAEA,KAAK,gBAAgB,CAAC;EAEtB,KAAK,cAAc,kBAAkB;CACtC;CAEA,MAAM,KAAK;EACV,IAAI,qBAAqB;EACzB,KAAK,aAAaA,OAAe,OAAO,6BAA6B;EACrE,wBAAiC,KAAK,UAAU;EAGhD,KAAK,MAAM,SAAS,OAAO,OAAO,IAAI,OAAO,GAC5C,IAAI,MAAM,gBACT,KAAK,eAAe,MAAM,eAAe,CAAC;EAI5C,KAAK,QAAQ;EAEb,IAAI,GAAG,YAAY,KAAK,iBAAiB,IAAI;EAE7C,OAAO,KAAK;CACb;CAEA,SAAS,KAAK;EACb,IAAI,IAAI,YAAY,KAAK,iBAAiB,IAAI;CAC/C;CAEA,gBAAgB,IAAI;EACnB,IAAI,GAAG,MAAM,gBAAgB;GAC5B,KAAK,eAAe,GAAG,MAAM,eAAe,CAAC;GAC7C,GAAG,MAAM,KAAK,gBAAgB,KAAK,kBAAkB,GAAG,MAAM,eAAe,CAAC,CAAC;EAChF;CACD;CAIA,UAAU,QAAQ;EACjB,KAAK,QAAQ,SAAS;EACtB,KAAK,QAAQ;EACb,OAAO;CACR;CAIA,eAAe,MAAM;EACpB,IAAI,CAAC,MAAQ,OAAO;EAEpB,IAAI,CAAC,KAAK,cAAc,OACvB,KAAK,cAAc,QAAQ;EAE5B,KAAK,cAAc,KAAK;EAExB,KAAK,QAAQ;EAEb,OAAO;CACR;CAIA,kBAAkB,MAAM;EACvB,IAAI,CAAC,MAAQ,OAAO;EAEpB,IAAI,KAAK,cAAc,OAAO;GAC7B,KAAK,cAAc,KAAK;GACxB,KAAK,QAAQ;EACd;EAEA,OAAO;CACR;CAEA,UAAU;EACT,IAAI,CAAC,KAAK,MAAQ;EAElB,MAAM,UAAU,OAAO,KAAK,KAAK,aAAa,CAAC,CAAC,QAAO,MAAK,KAAK,cAAc,EAAE;EAEjF,MAAM,mBAAmB,CAAC;EAE1B,IAAI,KAAK,QAAQ,QAChB,iBAAiB,KAAK,KAAK,QAAQ,MAAM;EAE1C,IAAI,QAAQ,QACX,iBAAiB,KAAK,QAAQ,KAAK,IAAI,CAAC;EAGzC,KAAK,WAAW,YAAY,iBAAiB,KAAK,uCAAqC;CACxF;CAGA,OAAO,SAAS,YAAY;EAK3B,WAAW,aAAa,EACvB,oBAAoB,KACrB,CAAC;EAED,WAAW,YAAY,WAAY;GAClC,IAAI,KAAK,QAAQ,oBAChB,IAAI,mBAAmB,CAAC,CAAC,MAAM,IAAI;EAErC,CAAC;CACF;AACD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { setOptions } from "../core/Util.js";
|
|
2
|
+
import { Class } from "../core/Class.js";
|
|
3
|
+
import { create } from "../dom/DomUtil.js";
|
|
4
|
+
//#region src/control/Control.js
|
|
5
|
+
var Control = class Control extends Class {
|
|
6
|
+
static {
|
|
7
|
+
this.setDefaultOptions({ position: "topright" });
|
|
8
|
+
}
|
|
9
|
+
constructor(options) {
|
|
10
|
+
super();
|
|
11
|
+
setOptions(this, options);
|
|
12
|
+
this.callInitHooks(Control);
|
|
13
|
+
}
|
|
14
|
+
getPosition() {
|
|
15
|
+
return this.options.position;
|
|
16
|
+
}
|
|
17
|
+
setPosition(position) {
|
|
18
|
+
const map = this._map;
|
|
19
|
+
map?.removeControl(this);
|
|
20
|
+
this.options.position = position;
|
|
21
|
+
map?.addControl(this);
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
getContainer() {
|
|
25
|
+
return this._container;
|
|
26
|
+
}
|
|
27
|
+
addTo(map) {
|
|
28
|
+
this.remove();
|
|
29
|
+
this._map = map;
|
|
30
|
+
const container = this._container = this.onAdd(map), pos = this.getPosition(), corner = map._controlCorners[pos];
|
|
31
|
+
container.classList.add("maplair-control");
|
|
32
|
+
if (pos.includes("bottom")) corner.insertBefore(container, corner.firstChild);
|
|
33
|
+
else corner.appendChild(container);
|
|
34
|
+
this._map.on("unload", this.remove, this);
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
remove() {
|
|
38
|
+
if (!this._map) return this;
|
|
39
|
+
this._container.remove();
|
|
40
|
+
if (this.onRemove) this.onRemove(this._map);
|
|
41
|
+
this._map.off("unload", this.remove, this);
|
|
42
|
+
this._map = null;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
_refocusOnMap(e) {
|
|
46
|
+
if (this._map && e && !(e.screenX === 0 && e.screenY === 0)) this._map.getContainer().focus();
|
|
47
|
+
}
|
|
48
|
+
static register(MaplairMap) {
|
|
49
|
+
MaplairMap.include({
|
|
50
|
+
addControl(control) {
|
|
51
|
+
control.addTo(this);
|
|
52
|
+
return this;
|
|
53
|
+
},
|
|
54
|
+
removeControl(control) {
|
|
55
|
+
control.remove();
|
|
56
|
+
return this;
|
|
57
|
+
},
|
|
58
|
+
_initControlPos() {
|
|
59
|
+
const corners = this._controlCorners = {}, l = "maplair-", container = this._controlContainer = create("div", `${l}control-container`, this._container);
|
|
60
|
+
function createCorner(vSide, hSide) {
|
|
61
|
+
const className = `${l + vSide} ${l}${hSide}`;
|
|
62
|
+
corners[vSide + hSide] = create("div", className, container);
|
|
63
|
+
}
|
|
64
|
+
createCorner("top", "left");
|
|
65
|
+
createCorner("top", "right");
|
|
66
|
+
createCorner("bottom", "left");
|
|
67
|
+
createCorner("bottom", "right");
|
|
68
|
+
},
|
|
69
|
+
_clearControlPos() {
|
|
70
|
+
for (const c of Object.values(this._controlCorners)) c.remove();
|
|
71
|
+
this._controlContainer.remove();
|
|
72
|
+
delete this._controlCorners;
|
|
73
|
+
delete this._controlContainer;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
export { Control };
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=Control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Control.js","names":["DomUtil.create"],"sources":["../../../src/control/Control.js"],"sourcesContent":["\nimport {Class} from '../core/Class.js';\nimport * as Util from '../core/Util.js';\nimport * as DomUtil from '../dom/DomUtil.js';\n\n/*\n * @class Control\n * @inherits Class\n *\n * Control is a base class for implementing map controls. Handles positioning.\n * All other controls extend from this class.\n */\n\nexport class Control extends Class {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka Control Options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option position: String = 'topright'\n\t\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\n\t\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\n\t\t\tposition: 'topright'\n\t\t});\n\t}\n\n\tconstructor(options) {\n\t\tsuper();\n\t\tUtil.setOptions(this, options);\n\n\t\tthis.callInitHooks(Control);\n\t}\n\n\t/* @section\n\t * Classes extending Control will inherit the following methods:\n\t *\n\t * @method getPosition: string\n\t * Returns the position of the control.\n\t */\n\tgetPosition() {\n\t\treturn this.options.position;\n\t}\n\n\t// @method setPosition(position: string): this\n\t// Sets the position of the control.\n\tsetPosition(position) {\n\t\tconst map = this._map;\n\n\t\tmap?.removeControl(this);\n\n\t\tthis.options.position = position;\n\n\t\tmap?.addControl(this);\n\n\t\treturn this;\n\t}\n\n\t// @method getContainer: HTMLElement\n\t// Returns the HTMLElement that contains the control.\n\tgetContainer() {\n\t\treturn this._container;\n\t}\n\n\t// @method addTo(map: MaplairMap): this\n\t// Adds the control to the given map.\n\taddTo(map) {\n\t\tthis.remove();\n\t\tthis._map = map;\n\n\t\tconst container = this._container = this.onAdd(map),\n\t\tpos = this.getPosition(),\n\t\tcorner = map._controlCorners[pos];\n\n\t\tcontainer.classList.add('maplair-control');\n\n\t\tif (pos.includes('bottom')) {\n\t\t\tcorner.insertBefore(container, corner.firstChild);\n\t\t} else {\n\t\t\tcorner.appendChild(container);\n\t\t}\n\n\t\tthis._map.on('unload', this.remove, this);\n\n\t\treturn this;\n\t}\n\n\t// @method remove: this\n\t// Removes the control from the map it is currently active on.\n\tremove() {\n\t\tif (!this._map) {\n\t\t\treturn this;\n\t\t}\n\n\t\tthis._container.remove();\n\n\t\tif (this.onRemove) {\n\t\t\tthis.onRemove(this._map);\n\t\t}\n\n\t\tthis._map.off('unload', this.remove, this);\n\t\tthis._map = null;\n\n\t\treturn this;\n\t}\n\n\t_refocusOnMap(e) {\n\t\t// We exclude keyboard-click event to keep the focus on the control for accessibility.\n\t\t// The position of keyboard-click events are x=0 and y=0.\n\t\tif (this._map && e && !(e.screenX === 0 && e.screenY === 0)) {\n\t\t\tthis._map.getContainer().focus();\n\t\t}\n\t}\n\n\t// Registers this default feature on the map class, called by `MaplairMap` itself.\n\tstatic register(MaplairMap) {\n\t\t/* @namespace MaplairMap\n\t\t * @section Methods for Layers and Controls\n\t\t */\n\t\tMaplairMap.include({\n\t\t\t// @method addControl(control: Control): this\n\t\t\t// Adds the given control to the map\n\t\t\taddControl(control) {\n\t\t\t\tcontrol.addTo(this);\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// @method removeControl(control: Control): this\n\t\t\t// Removes the given control from the map\n\t\t\tremoveControl(control) {\n\t\t\t\tcontrol.remove();\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t_initControlPos() {\n\t\t\t\tconst corners = this._controlCorners = {},\n\t\t\t\tl = 'maplair-',\n\t\t\t\tcontainer = this._controlContainer = DomUtil.create('div', `${l}control-container`, this._container);\n\n\t\t\t\tfunction createCorner(vSide, hSide) {\n\t\t\t\t\tconst className = `${l + vSide} ${l}${hSide}`;\n\n\t\t\t\t\tcorners[vSide + hSide] = DomUtil.create('div', className, container);\n\t\t\t\t}\n\n\t\t\t\tcreateCorner('top', 'left');\n\t\t\t\tcreateCorner('top', 'right');\n\t\t\t\tcreateCorner('bottom', 'left');\n\t\t\t\tcreateCorner('bottom', 'right');\n\t\t\t},\n\n\t\t\t_clearControlPos() {\n\t\t\t\tfor (const c of Object.values(this._controlCorners)) {\n\t\t\t\t\tc.remove();\n\t\t\t\t}\n\t\t\t\tthis._controlContainer.remove();\n\t\t\t\tdelete this._controlCorners;\n\t\t\t\tdelete this._controlContainer;\n\t\t\t}\n\t\t});\n\t}\n}\n\n/* @namespace Control\n * @section Extension methods\n * @uninheritable\n *\n * Every control should extend from `Control` and (re-)implement the following methods.\n *\n * @method onAdd(map: MaplairMap): HTMLElement\n * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo).\n *\n * @method onRemove(map: MaplairMap)\n * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove).\n */\n"],"mappings":";;;;AAaA,IAAa,UAAb,MAAa,gBAAgB,MAAM;CAElC;EAGC,KAAK,kBAAkB,EAItB,UAAU,WACX,CAAC;CACF;CAEA,YAAY,SAAS;EACpB,MAAM;EACN,WAAgB,MAAM,OAAO;EAE7B,KAAK,cAAc,OAAO;CAC3B;CAQA,cAAc;EACb,OAAO,KAAK,QAAQ;CACrB;CAIA,YAAY,UAAU;EACrB,MAAM,MAAM,KAAK;EAEjB,KAAK,cAAc,IAAI;EAEvB,KAAK,QAAQ,WAAW;EAExB,KAAK,WAAW,IAAI;EAEpB,OAAO;CACR;CAIA,eAAe;EACd,OAAO,KAAK;CACb;CAIA,MAAM,KAAK;EACV,KAAK,OAAO;EACZ,KAAK,OAAO;EAEZ,MAAM,YAAY,KAAK,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AEV,KAAK,kBAAkB,OAAO;IAC9B,OAAO,KAAK;IACZ,OAAO,KAAK;GACb;EACD,CAAC;CACF;AACD"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { stamp } from "../core/Util.js";
|
|
2
|
+
import { disableClickPropagation, disableScrollPropagation, off, on, preventDefault } from "../dom/DomEvent.js";
|
|
3
|
+
import { create } from "../dom/DomUtil.js";
|
|
4
|
+
import { Control } from "./Control.js";
|
|
5
|
+
import { I18n } from "../core/I18n.js";
|
|
6
|
+
//#region src/control/LayersControl.js
|
|
7
|
+
var LayersControl = class LayersControl extends Control {
|
|
8
|
+
static {
|
|
9
|
+
this.setDefaultOptions({
|
|
10
|
+
collapsed: true,
|
|
11
|
+
collapseDelay: 0,
|
|
12
|
+
position: "topright",
|
|
13
|
+
autoZIndex: true,
|
|
14
|
+
hideSingleBase: false,
|
|
15
|
+
sortLayers: false,
|
|
16
|
+
sortFunction(layerA, layerB, nameA, nameB) {
|
|
17
|
+
return nameA < nameB ? -1 : nameB < nameA ? 1 : 0;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
constructor(baseLayers, overlays, options) {
|
|
22
|
+
super(options);
|
|
23
|
+
this._layerControlInputs = [];
|
|
24
|
+
this._layers = [];
|
|
25
|
+
this._lastZIndex = 0;
|
|
26
|
+
this._handlingClick = false;
|
|
27
|
+
this._preventClick = false;
|
|
28
|
+
for (const [name, layer] of Object.entries(baseLayers ?? {})) this._addLayer(layer, name);
|
|
29
|
+
for (const [name, layer] of Object.entries(overlays ?? {})) this._addLayer(layer, name, true);
|
|
30
|
+
this.callInitHooks(LayersControl);
|
|
31
|
+
}
|
|
32
|
+
onAdd(map) {
|
|
33
|
+
this._initLayout();
|
|
34
|
+
this._update();
|
|
35
|
+
this._map = map;
|
|
36
|
+
map.on("zoomend", this._checkDisabledLayers, this);
|
|
37
|
+
for (const layer of this._layers) layer.layer.on("add remove", this._onLayerChange, this);
|
|
38
|
+
if (!this.options.collapsed) map.on("resize", this._expandIfNotCollapsed, this);
|
|
39
|
+
return this._container;
|
|
40
|
+
}
|
|
41
|
+
addTo(map) {
|
|
42
|
+
super.addTo(map);
|
|
43
|
+
return this._expandIfNotCollapsed();
|
|
44
|
+
}
|
|
45
|
+
onRemove() {
|
|
46
|
+
this._map.off("zoomend", this._checkDisabledLayers, this);
|
|
47
|
+
for (const layer of this._layers) layer.layer.off("add remove", this._onLayerChange, this);
|
|
48
|
+
this._map.off("resize", this._expandIfNotCollapsed, this);
|
|
49
|
+
}
|
|
50
|
+
addBaseLayer(layer, name) {
|
|
51
|
+
this._addLayer(layer, name);
|
|
52
|
+
return this._map ? this._update() : this;
|
|
53
|
+
}
|
|
54
|
+
addOverlay(layer, name) {
|
|
55
|
+
this._addLayer(layer, name, true);
|
|
56
|
+
return this._map ? this._update() : this;
|
|
57
|
+
}
|
|
58
|
+
removeLayer(layer) {
|
|
59
|
+
layer.off("add remove", this._onLayerChange, this);
|
|
60
|
+
const obj = this._getLayer(stamp(layer));
|
|
61
|
+
if (obj) this._layers.splice(this._layers.indexOf(obj), 1);
|
|
62
|
+
return this._map ? this._update() : this;
|
|
63
|
+
}
|
|
64
|
+
expand() {
|
|
65
|
+
clearTimeout(this._collapseDelayTimeout);
|
|
66
|
+
this._container.classList.add("maplair-control-layers-expanded");
|
|
67
|
+
this._section.style.height = null;
|
|
68
|
+
const acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);
|
|
69
|
+
if (acceptableHeight < this._section.clientHeight) {
|
|
70
|
+
this._section.classList.add("maplair-control-layers-scrollbar");
|
|
71
|
+
this._section.style.height = `${acceptableHeight}px`;
|
|
72
|
+
} else this._section.classList.remove("maplair-control-layers-scrollbar");
|
|
73
|
+
this._checkDisabledLayers();
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
collapse(ev) {
|
|
77
|
+
if (!ev || !((ev.type === "pointerleave" || ev.type === "pointerout") && ev.pointerType === "touch")) {
|
|
78
|
+
if (this.options.collapseDelay > 0) {
|
|
79
|
+
this._collapseDelayTimeout = setTimeout(() => {
|
|
80
|
+
this._container.classList.remove("maplair-control-layers-expanded");
|
|
81
|
+
}, this.options.collapseDelay);
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
this._container.classList.remove("maplair-control-layers-expanded");
|
|
85
|
+
}
|
|
86
|
+
return this;
|
|
87
|
+
}
|
|
88
|
+
_initLayout() {
|
|
89
|
+
const className = "maplair-control-layers", container = this._container = create("div", className), collapsed = this.options.collapsed;
|
|
90
|
+
disableClickPropagation(container);
|
|
91
|
+
disableScrollPropagation(container);
|
|
92
|
+
const section = this._section = create("fieldset", `${className}-list`);
|
|
93
|
+
if (collapsed) {
|
|
94
|
+
this._map.on("click", this.collapse, this);
|
|
95
|
+
on(container, {
|
|
96
|
+
pointerenter: this._expandSafely,
|
|
97
|
+
pointerleave: this.collapse
|
|
98
|
+
}, this);
|
|
99
|
+
}
|
|
100
|
+
const link = this._layersLink = create("a", `${className}-toggle`, container);
|
|
101
|
+
link.href = "#";
|
|
102
|
+
link.title = I18n.translate("Layers");
|
|
103
|
+
link.setAttribute("role", "button");
|
|
104
|
+
on(link, {
|
|
105
|
+
keydown(e) {
|
|
106
|
+
if (e.code === "Enter") this._expandSafely();
|
|
107
|
+
},
|
|
108
|
+
click(e) {
|
|
109
|
+
e.preventDefault();
|
|
110
|
+
this._expandSafely();
|
|
111
|
+
}
|
|
112
|
+
}, this);
|
|
113
|
+
if (!collapsed) this.expand();
|
|
114
|
+
this._baseLayersList = create("div", `${className}-base`, section);
|
|
115
|
+
this._separator = create("div", `${className}-separator`, section);
|
|
116
|
+
this._overlaysList = create("div", `${className}-overlays`, section);
|
|
117
|
+
container.appendChild(section);
|
|
118
|
+
}
|
|
119
|
+
_getLayer(id) {
|
|
120
|
+
for (const layer of this._layers) if (layer && stamp(layer.layer) === id) return layer;
|
|
121
|
+
}
|
|
122
|
+
_addLayer(layer, name, overlay) {
|
|
123
|
+
if (this._map) layer.on("add remove", this._onLayerChange, this);
|
|
124
|
+
this._layers.push({
|
|
125
|
+
layer,
|
|
126
|
+
name,
|
|
127
|
+
overlay
|
|
128
|
+
});
|
|
129
|
+
if (this.options.sortLayers) this._layers.sort(((a, b) => this.options.sortFunction(a.layer, b.layer, a.name, b.name)));
|
|
130
|
+
if (this.options.autoZIndex && layer.setZIndex) {
|
|
131
|
+
this._lastZIndex++;
|
|
132
|
+
layer.setZIndex(this._lastZIndex);
|
|
133
|
+
}
|
|
134
|
+
this._expandIfNotCollapsed();
|
|
135
|
+
}
|
|
136
|
+
_update() {
|
|
137
|
+
if (!this._container) return this;
|
|
138
|
+
this._baseLayersList.replaceChildren();
|
|
139
|
+
this._overlaysList.replaceChildren();
|
|
140
|
+
this._layerControlInputs = [];
|
|
141
|
+
let baseLayersPresent, overlaysPresent, baseLayersCount = 0;
|
|
142
|
+
for (const obj of this._layers) {
|
|
143
|
+
this._addItem(obj);
|
|
144
|
+
overlaysPresent ||= obj.overlay;
|
|
145
|
+
baseLayersPresent ||= !obj.overlay;
|
|
146
|
+
baseLayersCount += !obj.overlay ? 1 : 0;
|
|
147
|
+
}
|
|
148
|
+
if (this.options.hideSingleBase) {
|
|
149
|
+
baseLayersPresent = baseLayersPresent && baseLayersCount > 1;
|
|
150
|
+
this._baseLayersList.style.display = baseLayersPresent ? "" : "none";
|
|
151
|
+
}
|
|
152
|
+
this._separator.style.display = overlaysPresent && baseLayersPresent ? "" : "none";
|
|
153
|
+
return this;
|
|
154
|
+
}
|
|
155
|
+
_onLayerChange(e) {
|
|
156
|
+
if (!this._handlingClick) this._update();
|
|
157
|
+
const obj = this._getLayer(stamp(e.target));
|
|
158
|
+
const type = obj.overlay ? e.type === "add" ? "overlayadd" : "overlayremove" : e.type === "add" ? "baselayerchange" : null;
|
|
159
|
+
if (type) this._map.fire(type, obj);
|
|
160
|
+
}
|
|
161
|
+
_addItem(obj) {
|
|
162
|
+
const label = document.createElement("label"), checked = this._map.hasLayer(obj.layer);
|
|
163
|
+
const input = document.createElement("input");
|
|
164
|
+
input.type = obj.overlay ? "checkbox" : "radio";
|
|
165
|
+
input.className = "maplair-control-layers-selector";
|
|
166
|
+
input.defaultChecked = checked;
|
|
167
|
+
if (!obj.overlay) input.name = `maplair-base-layers_${stamp(this)}`;
|
|
168
|
+
this._layerControlInputs.push(input);
|
|
169
|
+
input.layerId = stamp(obj.layer);
|
|
170
|
+
on(input, "click", this._onInputClick, this);
|
|
171
|
+
const name = document.createElement("span");
|
|
172
|
+
name.innerHTML = ` ${obj.name}`;
|
|
173
|
+
const holder = document.createElement("span");
|
|
174
|
+
label.appendChild(holder);
|
|
175
|
+
holder.appendChild(input);
|
|
176
|
+
holder.appendChild(name);
|
|
177
|
+
(obj.overlay ? this._overlaysList : this._baseLayersList).appendChild(label);
|
|
178
|
+
this._checkDisabledLayers();
|
|
179
|
+
return label;
|
|
180
|
+
}
|
|
181
|
+
_onInputClick(e) {
|
|
182
|
+
if (this._preventClick) return;
|
|
183
|
+
const inputs = this._layerControlInputs, addedLayers = [], removedLayers = [];
|
|
184
|
+
this._handlingClick = true;
|
|
185
|
+
for (const input of inputs) {
|
|
186
|
+
const layer = this._getLayer(input.layerId).layer;
|
|
187
|
+
if (input.checked) addedLayers.push(layer);
|
|
188
|
+
else if (!input.checked) removedLayers.push(layer);
|
|
189
|
+
}
|
|
190
|
+
for (const layer of removedLayers) if (this._map.hasLayer(layer)) this._map.removeLayer(layer);
|
|
191
|
+
for (const layer of addedLayers) if (!this._map.hasLayer(layer)) this._map.addLayer(layer);
|
|
192
|
+
this._handlingClick = false;
|
|
193
|
+
this._refocusOnMap(e);
|
|
194
|
+
}
|
|
195
|
+
_checkDisabledLayers() {
|
|
196
|
+
const inputs = this._layerControlInputs, zoom = this._map.getZoom();
|
|
197
|
+
for (const input of inputs) {
|
|
198
|
+
const layer = this._getLayer(input.layerId).layer;
|
|
199
|
+
input.disabled = layer.options.minZoom !== void 0 && zoom < layer.options.minZoom || layer.options.maxZoom !== void 0 && zoom > layer.options.maxZoom;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
_expandIfNotCollapsed() {
|
|
203
|
+
if (this._map && !this.options.collapsed) this.expand();
|
|
204
|
+
return this;
|
|
205
|
+
}
|
|
206
|
+
_expandSafely() {
|
|
207
|
+
const section = this._section;
|
|
208
|
+
this._preventClick = true;
|
|
209
|
+
on(section, "click", preventDefault);
|
|
210
|
+
this.expand();
|
|
211
|
+
setTimeout(() => {
|
|
212
|
+
off(section, "click", preventDefault);
|
|
213
|
+
this._preventClick = false;
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
//#endregion
|
|
218
|
+
export { LayersControl };
|
|
219
|
+
|
|
220
|
+
//# sourceMappingURL=LayersControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayersControl.js","names":["Util.stamp","DomUtil.create","DomEvent.preventDefault"],"sources":["../../../src/control/LayersControl.js"],"sourcesContent":["\nimport {Control} from './Control.js';\nimport * as Util from '../core/Util.js';\nimport * as DomEvent from '../dom/DomEvent.js';\nimport * as DomUtil from '../dom/DomUtil.js';\nimport {I18n} from '../core/I18n.js';\n\n/*\n * @class LayersControl\n * @inherits Control\n *\n * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](https://maplair.org/examples/layers-control/)). Extends `Control`.\n *\n * @example\n *\n * ```js\n * const baseLayers = {\n * \t\"Mapbox\": mapbox,\n * \t\"OpenStreetMap\": osm\n * };\n *\n * const overlays = {\n * \t\"Marker\": marker,\n * \t\"Roads\": roadsLayer\n * };\n *\n * new LayersControl(baseLayers, overlays).addTo(map);\n * ```\n *\n * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values:\n *\n * ```js\n * {\n * \"<someName1>\": layer1,\n * \"<someName2>\": layer2\n * }\n * ```\n *\n * The layer names can contain HTML, which allows you to add additional styling to the items:\n *\n * ```js\n * {\"<img src='my-layer-icon' /> <span class='my-layer-item'>My Layer</span>\": myLayer}\n * ```\n */\n\n// @constructor LayersControl(baselayers?: Object, overlays?: Object, options?: LayersControl options)\n// Creates a layers control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation.\nexport class LayersControl extends Control {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka LayersControl options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option collapsed: Boolean = true\n\t\t\t// If `true`, the control will be collapsed into an icon and expanded on pointer hover, touch, or keyboard activation.\n\t\t\tcollapsed: true,\n\n\t\t\t// @option collapseDelay: Number = 0\n\t\t\t// Collapse delay in milliseconds. If greater than 0, the control will remain open longer, making it easier to scroll through long layer lists.\n\t\t\tcollapseDelay: 0,\n\n\t\t\tposition: 'topright',\n\n\t\t\t// @option autoZIndex: Boolean = true\n\t\t\t// If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.\n\t\t\tautoZIndex: true,\n\n\t\t\t// @option hideSingleBase: Boolean = false\n\t\t\t// If `true`, the base layers in the control will be hidden when there is only one.\n\t\t\thideSingleBase: false,\n\n\t\t\t// @option sortLayers: Boolean = false\n\t\t\t// Whether to sort the layers. When `false`, layers will keep the order\n\t\t\t// in which they were added to the control.\n\t\t\tsortLayers: false,\n\n\t\t\t// @option sortFunction: Function = *\n\t\t\t// A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\n\t\t\t// that will be used for sorting the layers, when `sortLayers` is `true`.\n\t\t\t// The function receives both the `Layer` instances and their names, as in\n\t\t\t// `sortFunction(layerA, layerB, nameA, nameB)`.\n\t\t\t// By default, it sorts layers alphabetically by their name.\n\t\t\tsortFunction(layerA, layerB, nameA, nameB) {\n\t\t\t\treturn nameA < nameB ? -1 : (nameB < nameA ? 1 : 0);\n\t\t\t}\n\t\t});\n\t}\n\n\tconstructor(baseLayers, overlays, options) {\n\t\tsuper(options);\n\n\t\tthis._layerControlInputs = [];\n\t\tthis._layers = [];\n\t\tthis._lastZIndex = 0;\n\t\tthis._handlingClick = false;\n\t\tthis._preventClick = false;\n\n\t\tfor (const [name, layer] of Object.entries(baseLayers ?? {})) {\n\t\t\tthis._addLayer(layer, name);\n\t\t}\n\n\t\tfor (const [name, layer] of Object.entries(overlays ?? {})) {\n\t\t\tthis._addLayer(layer, name, true);\n\t\t}\n\n\t\tthis.callInitHooks(LayersControl);\n\t}\n\n\tonAdd(map) {\n\t\tthis._initLayout();\n\t\tthis._update();\n\n\t\tthis._map = map;\n\t\tmap.on('zoomend', this._checkDisabledLayers, this);\n\n\t\tfor (const layer of this._layers) {\n\t\t\tlayer.layer.on('add remove', this._onLayerChange, this);\n\t\t}\n\n\t\tif (!this.options.collapsed) {\n\t\t\t// update the height of the container after resizing the window\n\t\t\tmap.on('resize', this._expandIfNotCollapsed, this);\n\t\t}\n\n\t\treturn this._container;\n\t}\n\n\taddTo(map) {\n\t\tsuper.addTo(map);\n\t\t// Trigger expand after Layers Control has been inserted into DOM so that is now has an actual height.\n\t\treturn this._expandIfNotCollapsed();\n\t}\n\n\tonRemove() {\n\t\tthis._map.off('zoomend', this._checkDisabledLayers, this);\n\n\t\tfor (const layer of this._layers) {\n\t\t\tlayer.layer.off('add remove', this._onLayerChange, this);\n\t\t}\n\n\t\tthis._map.off('resize', this._expandIfNotCollapsed, this);\n\t}\n\n\t// @method addBaseLayer(layer: Layer, name: String): this\n\t// Adds a base layer (radio button entry) with the given name to the control.\n\taddBaseLayer(layer, name) {\n\t\tthis._addLayer(layer, name);\n\t\treturn (this._map) ? this._update() : this;\n\t}\n\n\t// @method addOverlay(layer: Layer, name: String): this\n\t// Adds an overlay (checkbox entry) with the given name to the control.\n\taddOverlay(layer, name) {\n\t\tthis._addLayer(layer, name, true);\n\t\treturn (this._map) ? this._update() : this;\n\t}\n\n\t// @method removeLayer(layer: Layer): this\n\t// Remove the given layer from the control.\n\tremoveLayer(layer) {\n\t\tlayer.off('add remove', this._onLayerChange, this);\n\n\t\tconst obj = this._getLayer(Util.stamp(layer));\n\t\tif (obj) {\n\t\t\tthis._layers.splice(this._layers.indexOf(obj), 1);\n\t\t}\n\t\treturn (this._map) ? this._update() : this;\n\t}\n\n\t// @method expand(): this\n\t// Expand the control container if collapsed.\n\texpand() {\n\t\tclearTimeout(this._collapseDelayTimeout);\n\n\t\tthis._container.classList.add('maplair-control-layers-expanded');\n\t\tthis._section.style.height = null;\n\t\tconst acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);\n\t\tif (acceptableHeight < this._section.clientHeight) {\n\t\t\tthis._section.classList.add('maplair-control-layers-scrollbar');\n\t\t\tthis._section.style.height = `${acceptableHeight}px`;\n\t\t} else {\n\t\t\tthis._section.classList.remove('maplair-control-layers-scrollbar');\n\t\t}\n\t\tthis._checkDisabledLayers();\n\t\treturn this;\n\t}\n\n\t// @method collapse(): this\n\t// Collapse the control container if expanded.\n\tcollapse(ev) {\n\t\t// On touch devices `pointerleave` & `pointerout` is fired while clicking on a checkbox.\n\t\t// The control was collapsed instead of adding the layer to the map.\n\t\t// So we allow collapse only if it is not touch.\n\t\tif (!ev || !((ev.type === 'pointerleave' || ev.type === 'pointerout') && ev.pointerType === 'touch')) {\n\t\t\tif (this.options.collapseDelay > 0) {\n\t\t\t\t// Collapse delayed\n\t\t\t\tthis._collapseDelayTimeout = setTimeout(() => {\n\t\t\t\t\tthis._container.classList.remove('maplair-control-layers-expanded');\n\t\t\t\t}, this.options.collapseDelay);\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\t// Collapse immediately\n\t\t\tthis._container.classList.remove('maplair-control-layers-expanded');\n\t\t}\n\t\treturn this;\n\t}\n\n\t_initLayout() {\n\t\tconst className = 'maplair-control-layers',\n\t\tcontainer = this._container = DomUtil.create('div', className),\n\t\tcollapsed = this.options.collapsed;\n\n\t\tDomEvent.disableClickPropagation(container);\n\t\tDomEvent.disableScrollPropagation(container);\n\n\t\tconst section = this._section = DomUtil.create('fieldset', `${className}-list`);\n\n\t\tif (collapsed) {\n\t\t\tthis._map.on('click', this.collapse, this);\n\n\t\t\tDomEvent.on(container, {\n\t\t\t\tpointerenter: this._expandSafely,\n\t\t\t\tpointerleave: this.collapse\n\t\t\t}, this);\n\t\t}\n\n\t\tconst link = this._layersLink = DomUtil.create('a', `${className}-toggle`, container);\n\t\tlink.href = '#';\n\t\tlink.title = I18n.translate('Layers');\n\t\tlink.setAttribute('role', 'button');\n\n\t\tDomEvent.on(link, {\n\t\t\tkeydown(e) {\n\t\t\t\tif (e.code === 'Enter') {\n\t\t\t\t\tthis._expandSafely();\n\t\t\t\t}\n\t\t\t},\n\t\t\t// Certain screen readers intercept the key event and instead send a click event\n\t\t\tclick(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tthis._expandSafely();\n\t\t\t}\n\t\t}, this);\n\n\t\tif (!collapsed) {\n\t\t\tthis.expand();\n\t\t}\n\n\t\tthis._baseLayersList = DomUtil.create('div', `${className}-base`, section);\n\t\tthis._separator = DomUtil.create('div', `${className}-separator`, section);\n\t\tthis._overlaysList = DomUtil.create('div', `${className}-overlays`, section);\n\n\t\tcontainer.appendChild(section);\n\t}\n\n\t_getLayer(id) {\n\t\tfor (const layer of this._layers) {\n\t\t\tif (layer && Util.stamp(layer.layer) === id) {\n\t\t\t\treturn layer;\n\t\t\t}\n\t\t}\n\t}\n\n\t_addLayer(layer, name, overlay) {\n\t\tif (this._map) {\n\t\t\tlayer.on('add remove', this._onLayerChange, this);\n\t\t}\n\n\t\tthis._layers.push({\n\t\t\tlayer,\n\t\t\tname,\n\t\t\toverlay\n\t\t});\n\n\t\tif (this.options.sortLayers) {\n\t\t\tthis._layers.sort(((a, b) => this.options.sortFunction(a.layer, b.layer, a.name, b.name)));\n\t\t}\n\n\t\tif (this.options.autoZIndex && layer.setZIndex) {\n\t\t\tthis._lastZIndex++;\n\t\t\tlayer.setZIndex(this._lastZIndex);\n\t\t}\n\n\t\tthis._expandIfNotCollapsed();\n\t}\n\n\t_update() {\n\t\tif (!this._container) { return this; }\n\n\t\tthis._baseLayersList.replaceChildren();\n\t\tthis._overlaysList.replaceChildren();\n\n\t\tthis._layerControlInputs = [];\n\t\tlet baseLayersPresent, overlaysPresent, baseLayersCount = 0;\n\n\t\tfor (const obj of this._layers) {\n\t\t\tthis._addItem(obj);\n\t\t\toverlaysPresent ||= obj.overlay;\n\t\t\tbaseLayersPresent ||= !obj.overlay;\n\t\t\tbaseLayersCount += !obj.overlay ? 1 : 0;\n\t\t}\n\n\t\t// Hide base layers section if there's only one layer.\n\t\tif (this.options.hideSingleBase) {\n\t\t\tbaseLayersPresent = baseLayersPresent && baseLayersCount > 1;\n\t\t\tthis._baseLayersList.style.display = baseLayersPresent ? '' : 'none';\n\t\t}\n\n\t\tthis._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none';\n\n\t\treturn this;\n\t}\n\n\t_onLayerChange(e) {\n\t\tif (!this._handlingClick) {\n\t\t\tthis._update();\n\t\t}\n\n\t\tconst obj = this._getLayer(Util.stamp(e.target));\n\n\t\t// @namespace MaplairMap\n\t\t// @section Layer events\n\t\t// @event baselayerchange: LayersControlEvent\n\t\t// Fired when the base layer is changed through the [layers control](#control-layers).\n\t\t// @event overlayadd: LayersControlEvent\n\t\t// Fired when an overlay is selected through the [layers control](#control-layers).\n\t\t// @event overlayremove: LayersControlEvent\n\t\t// Fired when an overlay is deselected through the [layers control](#control-layers).\n\t\t// @namespace LayersControl\n\t\tconst type = obj.overlay ?\n\t\t\t(e.type === 'add' ? 'overlayadd' : 'overlayremove') :\n\t\t\t(e.type === 'add' ? 'baselayerchange' : null);\n\n\t\tif (type) {\n\t\t\tthis._map.fire(type, obj);\n\t\t}\n\t}\n\n\t_addItem(obj) {\n\t\tconst label = document.createElement('label'),\n\t\tchecked = this._map.hasLayer(obj.layer);\n\n\t\tconst input = document.createElement('input');\n\t\tinput.type = obj.overlay ? 'checkbox' : 'radio';\n\t\tinput.className = 'maplair-control-layers-selector';\n\t\tinput.defaultChecked = checked;\n\t\tif (!obj.overlay) {\n\t\t\tinput.name = `maplair-base-layers_${Util.stamp(this)}`;\n\t\t}\n\n\t\tthis._layerControlInputs.push(input);\n\t\tinput.layerId = Util.stamp(obj.layer);\n\n\t\tDomEvent.on(input, 'click', this._onInputClick, this);\n\n\t\tconst name = document.createElement('span');\n\t\tname.innerHTML = ` ${obj.name}`;\n\n\t\t// Helps from preventing layer control flicker when checkboxes are disabled\n\t\t// https://github.com/Leaflet/Leaflet/issues/2771\n\t\tconst holder = document.createElement('span');\n\n\t\tlabel.appendChild(holder);\n\t\tholder.appendChild(input);\n\t\tholder.appendChild(name);\n\n\t\tconst container = obj.overlay ? this._overlaysList : this._baseLayersList;\n\t\tcontainer.appendChild(label);\n\n\t\tthis._checkDisabledLayers();\n\t\treturn label;\n\t}\n\n\t_onInputClick(e) {\n\t\t// expanding the control on mobile with a click can cause adding a layer - we don't want this\n\t\tif (this._preventClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst inputs = this._layerControlInputs,\n\t\taddedLayers = [],\n\t\tremovedLayers = [];\n\n\t\tthis._handlingClick = true;\n\n\t\tfor (const input of inputs) {\n\t\t\tconst layer = this._getLayer(input.layerId).layer;\n\n\t\t\tif (input.checked) {\n\t\t\t\taddedLayers.push(layer);\n\t\t\t} else if (!input.checked) {\n\t\t\t\tremovedLayers.push(layer);\n\t\t\t}\n\t\t}\n\n\t\t// Bugfix issue 2318: Should remove all old layers before readding new ones\n\t\tfor (const layer of removedLayers) {\n\t\t\tif (this._map.hasLayer(layer)) {\n\t\t\t\tthis._map.removeLayer(layer);\n\t\t\t}\n\t\t}\n\t\tfor (const layer of addedLayers) {\n\t\t\tif (!this._map.hasLayer(layer)) {\n\t\t\t\tthis._map.addLayer(layer);\n\t\t\t}\n\t\t}\n\n\t\tthis._handlingClick = false;\n\n\t\tthis._refocusOnMap(e);\n\t}\n\n\t_checkDisabledLayers() {\n\t\tconst inputs = this._layerControlInputs,\n\t\tzoom = this._map.getZoom();\n\n\t\tfor (const input of inputs) {\n\t\t\tconst layer = this._getLayer(input.layerId).layer;\n\t\t\tinput.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) ||\n\t\t\t (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom);\n\n\t\t}\n\t}\n\n\t_expandIfNotCollapsed() {\n\t\tif (this._map && !this.options.collapsed) {\n\t\t\tthis.expand();\n\t\t}\n\t\treturn this;\n\t}\n\n\t_expandSafely() {\n\t\tconst section = this._section;\n\t\tthis._preventClick = true;\n\t\tDomEvent.on(section, 'click', DomEvent.preventDefault);\n\t\tthis.expand();\n\t\tsetTimeout(() => {\n\t\t\tDomEvent.off(section, 'click', DomEvent.preventDefault);\n\t\t\tthis._preventClick = false;\n\t\t});\n\t}\n\n}\n"],"mappings":";;;;;;AA+CA,IAAa,gBAAb,MAAa,sBAAsB,QAAQ;CAE1C;EAGC,KAAK,kBAAkB;GAGtB,WAAW;GAIX,eAAe;GAEf,UAAU;GAIV,YAAY;GAIZ,gBAAgB;GAKhB,YAAY;GAQZ,aAAa,QAAQ,QAAQ,OAAO,OAAO;IAC1C,OAAO,QAAQ,QAAQ,KAAM,QAAQ,QAAQ,IAAI;GAClD;EACD,CAAC;CACF;CAEA,YAAY,YAAY,UAAU,SAAS;EAC1C,MAAM,OAAO;EAEb,KAAK,sBAAsB,CAAC;EAC5B,KAAK,UAAU,CAAC;EAChB,KAAK,cAAc;EACnB,KAAK,iBAAiB;EACtB,KAAK,gBAAgB;EAErB,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,cAAc,CAAC,CAAC,GAC1D,KAAK,UAAU,OAAO,IAAI;EAG3B,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,YAAY,CAAC,CAAC,GACxD,KAAK,UAAU,OAAO,MAAM,IAAI;EAGjC,KAAK,cAAc,aAAa;CACjC;CAEA,MAAM,KAAK;EACV,KAAK,YAAY;EACjB,KAAK,QAAQ;EAEb,KAA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