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
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { setOptions } from "../../core/Util.js";
|
|
2
|
+
import { Point } from "../../geometry/Point.js";
|
|
3
|
+
import { off, on } from "../../dom/DomEvent.js";
|
|
4
|
+
import { setPosition } from "../../dom/DomUtil.js";
|
|
5
|
+
import { LatLng } from "../../geo/LatLng.js";
|
|
6
|
+
import { Layer } from "../Layer.js";
|
|
7
|
+
import { DefaultIcon } from "./DefaultIcon.js";
|
|
8
|
+
import { MarkerDrag } from "./Marker.Drag.js";
|
|
9
|
+
//#region src/layer/marker/Marker.js
|
|
10
|
+
var Marker = class Marker extends Layer {
|
|
11
|
+
static {
|
|
12
|
+
this.setDefaultOptions({
|
|
13
|
+
icon: new DefaultIcon(),
|
|
14
|
+
interactive: true,
|
|
15
|
+
keyboard: true,
|
|
16
|
+
title: "",
|
|
17
|
+
alt: "Marker",
|
|
18
|
+
zIndexOffset: 0,
|
|
19
|
+
opacity: 1,
|
|
20
|
+
riseOnHover: false,
|
|
21
|
+
riseOffset: 250,
|
|
22
|
+
pane: "markerPane",
|
|
23
|
+
shadowPane: "shadowPane",
|
|
24
|
+
shadow: true,
|
|
25
|
+
bubblingPointerEvents: false,
|
|
26
|
+
autoPanOnFocus: true,
|
|
27
|
+
draggable: false,
|
|
28
|
+
autoPan: false,
|
|
29
|
+
autoPanPadding: [50, 50],
|
|
30
|
+
autoPanSpeed: 10
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
constructor(latlng, options) {
|
|
34
|
+
super();
|
|
35
|
+
setOptions(this, options);
|
|
36
|
+
this._latlng = new LatLng(latlng);
|
|
37
|
+
this.callInitHooks(Marker);
|
|
38
|
+
}
|
|
39
|
+
onAdd(map) {
|
|
40
|
+
this._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation;
|
|
41
|
+
if (this._zoomAnimated) map.on("zoomanim", this._animateZoom, this);
|
|
42
|
+
this._initIcon();
|
|
43
|
+
this.update();
|
|
44
|
+
if (map.options.markerCulling) this._updateCulling();
|
|
45
|
+
}
|
|
46
|
+
onRemove(map) {
|
|
47
|
+
if (this.dragging?.enabled()) {
|
|
48
|
+
this.options.draggable = true;
|
|
49
|
+
this.dragging.removeHooks();
|
|
50
|
+
}
|
|
51
|
+
delete this.dragging;
|
|
52
|
+
if (this._zoomAnimated) map.off("zoomanim", this._animateZoom, this);
|
|
53
|
+
this._removeIcon();
|
|
54
|
+
this._removeShadow();
|
|
55
|
+
this._culled = false;
|
|
56
|
+
}
|
|
57
|
+
getEvents() {
|
|
58
|
+
const events = {
|
|
59
|
+
zoom: this.update,
|
|
60
|
+
viewreset: this.update
|
|
61
|
+
};
|
|
62
|
+
if (this._map?.options.markerCulling) events.moveend = this._updateCulling;
|
|
63
|
+
return events;
|
|
64
|
+
}
|
|
65
|
+
getLatLng() {
|
|
66
|
+
return this._latlng;
|
|
67
|
+
}
|
|
68
|
+
setLatLng(latlng) {
|
|
69
|
+
const oldLatLng = this._latlng;
|
|
70
|
+
this._latlng = new LatLng(latlng);
|
|
71
|
+
if (this._map?.options.markerCulling) this._updateCulling();
|
|
72
|
+
this.update();
|
|
73
|
+
return this.fire("move", {
|
|
74
|
+
oldLatLng,
|
|
75
|
+
latlng: this._latlng
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
setZIndexOffset(offset) {
|
|
79
|
+
this.options.zIndexOffset = offset;
|
|
80
|
+
return this.update();
|
|
81
|
+
}
|
|
82
|
+
getIcon() {
|
|
83
|
+
return this.options.icon;
|
|
84
|
+
}
|
|
85
|
+
setIcon(icon) {
|
|
86
|
+
this.options.icon = icon;
|
|
87
|
+
if (this._map) {
|
|
88
|
+
this._initIcon();
|
|
89
|
+
this.update();
|
|
90
|
+
}
|
|
91
|
+
if (this._popup) this.bindPopup(this._popup, this._popup.options);
|
|
92
|
+
return this;
|
|
93
|
+
}
|
|
94
|
+
getElement() {
|
|
95
|
+
return this._icon;
|
|
96
|
+
}
|
|
97
|
+
update() {
|
|
98
|
+
if (this._icon && this._map && !this._culled) {
|
|
99
|
+
const pos = this._map.latLngToLayerPoint(this._latlng).round();
|
|
100
|
+
this._setPos(pos);
|
|
101
|
+
}
|
|
102
|
+
return this;
|
|
103
|
+
}
|
|
104
|
+
_initIcon() {
|
|
105
|
+
const options = this.options, classToAdd = `maplair-zoom-${this._zoomAnimated ? "animated" : "hide"}`;
|
|
106
|
+
const icon = options.icon.createIcon(this._icon);
|
|
107
|
+
let addIcon = false;
|
|
108
|
+
if (icon !== this._icon) {
|
|
109
|
+
if (this._icon) this._removeIcon();
|
|
110
|
+
addIcon = true;
|
|
111
|
+
if (options.title) icon.title = options.title;
|
|
112
|
+
if (icon.tagName === "IMG") icon.alt = options.alt ?? "";
|
|
113
|
+
}
|
|
114
|
+
icon.classList.add(classToAdd);
|
|
115
|
+
if (options.keyboard) {
|
|
116
|
+
icon.tabIndex = "0";
|
|
117
|
+
icon.setAttribute("role", "button");
|
|
118
|
+
}
|
|
119
|
+
this._icon = icon;
|
|
120
|
+
if (options.riseOnHover) this.on({
|
|
121
|
+
pointerover: this._bringToFront,
|
|
122
|
+
pointerout: this._resetZIndex
|
|
123
|
+
});
|
|
124
|
+
if (this.options.autoPanOnFocus) on(icon, "focus", this._panOnFocus, this);
|
|
125
|
+
const newShadow = options.shadow ? options.icon.createShadow(this._shadow) : null;
|
|
126
|
+
let addShadow = false;
|
|
127
|
+
if (newShadow !== this._shadow) {
|
|
128
|
+
this._removeShadow();
|
|
129
|
+
addShadow = true;
|
|
130
|
+
}
|
|
131
|
+
if (newShadow) {
|
|
132
|
+
newShadow.classList.add(classToAdd);
|
|
133
|
+
newShadow.alt = "";
|
|
134
|
+
}
|
|
135
|
+
this._shadow = newShadow;
|
|
136
|
+
if (options.opacity < 1) this._updateOpacity();
|
|
137
|
+
if (addIcon) this.getPane().appendChild(this._icon);
|
|
138
|
+
this._initInteraction();
|
|
139
|
+
if (newShadow && addShadow) this.getPane(options.shadowPane).appendChild(this._shadow);
|
|
140
|
+
}
|
|
141
|
+
_removeIcon() {
|
|
142
|
+
if (this.options.riseOnHover) this.off({
|
|
143
|
+
pointerover: this._bringToFront,
|
|
144
|
+
pointerout: this._resetZIndex
|
|
145
|
+
});
|
|
146
|
+
if (this.options.autoPanOnFocus) off(this._icon, "focus", this._panOnFocus, this);
|
|
147
|
+
this._icon.remove();
|
|
148
|
+
this.removeInteractiveTarget(this._icon);
|
|
149
|
+
this._icon = null;
|
|
150
|
+
}
|
|
151
|
+
_updateCulling() {
|
|
152
|
+
if (!this._icon || !this._map) return;
|
|
153
|
+
const visible = this._map.getBounds().pad(.5).contains(this._latlng) || !!this.dragging?._draggable?._moving || this._icon.contains(document.activeElement);
|
|
154
|
+
if (visible === !this._culled) return;
|
|
155
|
+
this._culled = !visible;
|
|
156
|
+
if (visible) {
|
|
157
|
+
this.getPane().appendChild(this._icon);
|
|
158
|
+
if (this._shadow) this.getPane(this.options.shadowPane).appendChild(this._shadow);
|
|
159
|
+
this.update();
|
|
160
|
+
} else {
|
|
161
|
+
this._icon.remove();
|
|
162
|
+
this._shadow?.remove();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
_removeShadow() {
|
|
166
|
+
this._shadow?.remove();
|
|
167
|
+
this._shadow = null;
|
|
168
|
+
}
|
|
169
|
+
_setPos(pos) {
|
|
170
|
+
if (this._icon) setPosition(this._icon, pos);
|
|
171
|
+
if (this._shadow) setPosition(this._shadow, pos);
|
|
172
|
+
this._zIndex = pos.y + this.options.zIndexOffset;
|
|
173
|
+
this._resetZIndex();
|
|
174
|
+
}
|
|
175
|
+
_updateZIndex(offset) {
|
|
176
|
+
const zIndex = String(this._zIndex + offset);
|
|
177
|
+
if (this._icon && this._icon.style.zIndex !== zIndex) this._icon.style.zIndex = zIndex;
|
|
178
|
+
}
|
|
179
|
+
_animateZoom(opt) {
|
|
180
|
+
if (this._culled) return;
|
|
181
|
+
const pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();
|
|
182
|
+
this._setPos(pos);
|
|
183
|
+
}
|
|
184
|
+
_initInteraction() {
|
|
185
|
+
if (!this.options.interactive) return;
|
|
186
|
+
this._icon.classList.add("maplair-interactive");
|
|
187
|
+
this.addInteractiveTarget(this._icon);
|
|
188
|
+
if (MarkerDrag) {
|
|
189
|
+
let draggable = this.options.draggable;
|
|
190
|
+
if (this.dragging) {
|
|
191
|
+
draggable = this.dragging.enabled();
|
|
192
|
+
this.dragging.disable();
|
|
193
|
+
}
|
|
194
|
+
this.dragging = new MarkerDrag(this);
|
|
195
|
+
if (draggable) this.dragging.enable();
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
setOpacity(opacity) {
|
|
199
|
+
this.options.opacity = opacity;
|
|
200
|
+
if (this._map) this._updateOpacity();
|
|
201
|
+
return this;
|
|
202
|
+
}
|
|
203
|
+
_updateOpacity() {
|
|
204
|
+
const opacity = this.options.opacity;
|
|
205
|
+
if (this._icon) this._icon.style.opacity = opacity;
|
|
206
|
+
if (this._shadow) this._shadow.style.opacity = opacity;
|
|
207
|
+
}
|
|
208
|
+
_bringToFront() {
|
|
209
|
+
this._updateZIndex(this.options.riseOffset);
|
|
210
|
+
}
|
|
211
|
+
_resetZIndex() {
|
|
212
|
+
this._updateZIndex(0);
|
|
213
|
+
}
|
|
214
|
+
_panOnFocus() {
|
|
215
|
+
const map = this._map;
|
|
216
|
+
if (!map) return;
|
|
217
|
+
const iconOpts = this.options.icon.options;
|
|
218
|
+
const size = iconOpts.iconSize ? new Point(iconOpts.iconSize) : new Point(0, 0);
|
|
219
|
+
const anchor = iconOpts.iconAnchor ? new Point(iconOpts.iconAnchor) : new Point(0, 0);
|
|
220
|
+
map.panInside(this._latlng, {
|
|
221
|
+
paddingTopLeft: anchor,
|
|
222
|
+
paddingBottomRight: size.subtract(anchor)
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
_getPopupAnchor() {
|
|
226
|
+
return this.options.icon.options.popupAnchor;
|
|
227
|
+
}
|
|
228
|
+
_getTooltipAnchor() {
|
|
229
|
+
return this.options.icon.options.tooltipAnchor;
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
//#endregion
|
|
233
|
+
export { Marker };
|
|
234
|
+
|
|
235
|
+
//# sourceMappingURL=Marker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Marker.js","names":[],"sources":["../../../../src/layer/marker/Marker.js"],"sourcesContent":["import {Layer} from '../Layer.js';\nimport {DefaultIcon} from './DefaultIcon.js';\nimport * as Util from '../../core/Util.js';\nimport {LatLng} from '../../geo/LatLng.js';\nimport {Point} from '../../geometry/Point.js';\nimport * as DomUtil from '../../dom/DomUtil.js';\nimport * as DomEvent from '../../dom/DomEvent.js';\nimport {MarkerDrag} from './Marker.Drag.js';\n\n/*\n * @class Marker\n * @inherits Interactive layer\n * Marker is used to display clickable/draggable icons on the map. Extends `Layer`.\n *\n * @example\n *\n * ```js\n * new Marker([50.5, 30.5]).addTo(map);\n * ```\n */\n\n// @constructor Marker(latlng: LatLng, options? : Marker options)\n// Instantiates a Marker object given a geographical point and optionally an options object.\nexport class Marker extends Layer {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka Marker options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option icon: Icon = *\n\t\t\t// Icon instance to use for rendering the marker.\n\t\t\t// See [Icon documentation](#Icon) for details on how to customize the marker icon.\n\t\t\t// If not specified, a common instance of `DefaultIcon` is used.\n\t\t\ticon: new DefaultIcon(),\n\n\t\t\t// Option inherited from \"Interactive layer\" abstract class\n\t\t\tinteractive: true,\n\n\t\t\t// @option keyboard: Boolean = true\n\t\t\t// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.\n\t\t\tkeyboard: true,\n\n\t\t\t// @option title: String = ''\n\t\t\t// Text for the browser tooltip that appear on marker hover (no tooltip by default).\n\t\t\t// [Useful for accessibility](https://maplair.org/examples/accessibility/#markers-must-be-labelled).\n\t\t\ttitle: '',\n\n\t\t\t// @option alt: String = 'Marker'\n\t\t\t// Text for the `alt` attribute of the icon image.\n\t\t\t// [Useful for accessibility](https://maplair.org/examples/accessibility/#markers-must-be-labelled).\n\t\t\talt: 'Marker',\n\n\t\t\t// @option zIndexOffset: Number = 0\n\t\t\t// By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively).\n\t\t\tzIndexOffset: 0,\n\n\t\t\t// @option opacity: Number = 1.0\n\t\t\t// The opacity of the marker.\n\t\t\topacity: 1,\n\n\t\t\t// @option riseOnHover: Boolean = false\n\t\t\t// If `true`, the marker will get on top of others when you hover the pointer over it.\n\t\t\triseOnHover: false,\n\n\t\t\t// @option riseOffset: Number = 250\n\t\t\t// The z-index offset used for the `riseOnHover` feature.\n\t\t\triseOffset: 250,\n\n\t\t\t// @option pane: String = 'markerPane'\n\t\t\t// `Map pane` where the markers icon will be added.\n\t\t\tpane: 'markerPane',\n\n\t\t\t// @option shadowPane: String = 'shadowPane'\n\t\t\t// `Map pane` where the markers shadow will be added.\n\t\t\tshadowPane: 'shadowPane',\n\n\t\t\t// @option shadow: Boolean = true\n\t\t\t// Whether to show the shadow of the marker's icon. Each shadow is an\n\t\t\t// additional element on the page, so disabling shadows noticeably reduces\n\t\t\t// the browser's rendering work when showing many markers (e.g. several\n\t\t\t// thousands), especially while panning and zooming. To disable shadows\n\t\t\t// for all markers, use `Marker.mergeOptions({shadow: false})`.\n\t\t\tshadow: true,\n\n\t\t\t// @option bubblingPointerEvents: Boolean = false\n\t\t\t// When `true`, a pointer event on this marker will trigger the same event on the map\n\t\t\t// (unless [`DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\n\t\t\tbubblingPointerEvents: false,\n\n\t\t\t// @option autoPanOnFocus: Boolean = true\n\t\t\t// When `true`, the map will pan whenever the marker is focused (via\n\t\t\t// e.g. pressing `tab` on the keyboard) to ensure the marker is\n\t\t\t// visible within the map's bounds\n\t\t\tautoPanOnFocus: true,\n\n\t\t\t// @section Draggable marker options\n\t\t\t// @option draggable: Boolean = false\n\t\t\t// Whether the marker is draggable with pointer or not.\n\t\t\tdraggable: false,\n\n\t\t\t// @option autoPan: Boolean = false\n\t\t\t// Whether to pan the map when dragging this marker near its edge or not.\n\t\t\tautoPan: false,\n\n\t\t\t// @option autoPanPadding: Point = Point(50, 50)\n\t\t\t// Distance (in pixels to the left/right and to the top/bottom) of the\n\t\t\t// map edge to start panning the map.\n\t\t\tautoPanPadding: [50, 50],\n\n\t\t\t// @option autoPanSpeed: Number = 10\n\t\t\t// Number of pixels the map should pan by.\n\t\t\tautoPanSpeed: 10\n\t\t});\n\t}\n\n\t/* @section\n\t *\n\t * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods:\n\t */\n\n\tconstructor(latlng, options) {\n\t\tsuper();\n\t\tUtil.setOptions(this, options);\n\t\tthis._latlng = new LatLng(latlng);\n\n\t\tthis.callInitHooks(Marker);\n\t}\n\n\tonAdd(map) {\n\t\tthis._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation;\n\n\t\tif (this._zoomAnimated) {\n\t\t\tmap.on('zoomanim', this._animateZoom, this);\n\t\t}\n\n\t\tthis._initIcon();\n\t\tthis.update();\n\n\t\tif (map.options.markerCulling) {\n\t\t\tthis._updateCulling();\n\t\t}\n\t}\n\n\tonRemove(map) {\n\t\tif (this.dragging?.enabled()) {\n\t\t\tthis.options.draggable = true;\n\t\t\tthis.dragging.removeHooks();\n\t\t}\n\t\tdelete this.dragging;\n\n\t\tif (this._zoomAnimated) {\n\t\t\tmap.off('zoomanim', this._animateZoom, this);\n\t\t}\n\n\t\tthis._removeIcon();\n\t\tthis._removeShadow();\n\t\tthis._culled = false;\n\t}\n\n\tgetEvents() {\n\t\tconst events = {\n\t\t\tzoom: this.update,\n\t\t\tviewreset: this.update\n\t\t};\n\t\tif (this._map?.options.markerCulling) {\n\t\t\tevents.moveend = this._updateCulling;\n\t\t}\n\t\treturn events;\n\t}\n\n\t// @method getLatLng: LatLng\n\t// Returns the current geographical position of the marker.\n\tgetLatLng() {\n\t\treturn this._latlng;\n\t}\n\n\t// @method setLatLng(latlng: LatLng): this\n\t// Changes the marker position to the given point.\n\tsetLatLng(latlng) {\n\t\tconst oldLatLng = this._latlng;\n\t\tthis._latlng = new LatLng(latlng);\n\t\tif (this._map?.options.markerCulling) {\n\t\t\tthis._updateCulling();\n\t\t}\n\t\tthis.update();\n\n\t\t// @event move: Event\n\t\t// Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\n\t\treturn this.fire('move', {oldLatLng, latlng: this._latlng});\n\t}\n\n\t// @method setZIndexOffset(offset: Number): this\n\t// Changes the [zIndex offset](#marker-zindexoffset) of the marker.\n\tsetZIndexOffset(offset) {\n\t\tthis.options.zIndexOffset = offset;\n\t\treturn this.update();\n\t}\n\n\t// @method getIcon: Icon\n\t// Returns the current icon used by the marker\n\tgetIcon() {\n\t\treturn this.options.icon;\n\t}\n\n\t// @method setIcon(icon: Icon): this\n\t// Changes the marker icon.\n\tsetIcon(icon) {\n\n\t\tthis.options.icon = icon;\n\n\t\tif (this._map) {\n\t\t\tthis._initIcon();\n\t\t\tthis.update();\n\t\t}\n\n\t\tif (this._popup) {\n\t\t\tthis.bindPopup(this._popup, this._popup.options);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t// @method getElement(): HTMLElement\n\t// Returns the instance of [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)\n\t// used by Marker layer.\n\tgetElement() {\n\t\treturn this._icon;\n\t}\n\n\tupdate() {\n\n\t\tif (this._icon && this._map && !this._culled) {\n\t\t\tconst pos = this._map.latLngToLayerPoint(this._latlng).round();\n\t\t\tthis._setPos(pos);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t_initIcon() {\n\t\tconst options = this.options,\n\t\tclassToAdd = `maplair-zoom-${this._zoomAnimated ? 'animated' : 'hide'}`;\n\n\t\tconst icon = options.icon.createIcon(this._icon);\n\t\tlet addIcon = false;\n\n\t\t// if we're not reusing the icon, remove the old one and init new one\n\t\tif (icon !== this._icon) {\n\t\t\tif (this._icon) {\n\t\t\t\tthis._removeIcon();\n\t\t\t}\n\t\t\taddIcon = true;\n\n\t\t\tif (options.title) {\n\t\t\t\ticon.title = options.title;\n\t\t\t}\n\n\t\t\tif (icon.tagName === 'IMG') {\n\t\t\t\ticon.alt = options.alt ?? '';\n\t\t\t}\n\t\t}\n\n\t\ticon.classList.add(classToAdd);\n\n\t\tif (options.keyboard) {\n\t\t\ticon.tabIndex = '0';\n\t\t\ticon.setAttribute('role', 'button');\n\t\t}\n\n\t\tthis._icon = icon;\n\n\t\tif (options.riseOnHover) {\n\t\t\tthis.on({\n\t\t\t\tpointerover: this._bringToFront,\n\t\t\t\tpointerout: this._resetZIndex\n\t\t\t});\n\t\t}\n\n\t\tif (this.options.autoPanOnFocus) {\n\t\t\tDomEvent.on(icon, 'focus', this._panOnFocus, this);\n\t\t}\n\n\t\tconst newShadow = options.shadow ? options.icon.createShadow(this._shadow) : null;\n\t\tlet addShadow = false;\n\n\t\tif (newShadow !== this._shadow) {\n\t\t\tthis._removeShadow();\n\t\t\taddShadow = true;\n\t\t}\n\n\t\tif (newShadow) {\n\t\t\tnewShadow.classList.add(classToAdd);\n\t\t\tnewShadow.alt = '';\n\t\t}\n\t\tthis._shadow = newShadow;\n\n\n\t\tif (options.opacity < 1) {\n\t\t\tthis._updateOpacity();\n\t\t}\n\n\n\t\tif (addIcon) {\n\t\t\tthis.getPane().appendChild(this._icon);\n\t\t}\n\t\tthis._initInteraction();\n\t\tif (newShadow && addShadow) {\n\t\t\tthis.getPane(options.shadowPane).appendChild(this._shadow);\n\t\t}\n\t}\n\n\t_removeIcon() {\n\t\tif (this.options.riseOnHover) {\n\t\t\tthis.off({\n\t\t\t\tpointerover: this._bringToFront,\n\t\t\t\tpointerout: this._resetZIndex\n\t\t\t});\n\t\t}\n\n\t\tif (this.options.autoPanOnFocus) {\n\t\t\tDomEvent.off(this._icon, 'focus', this._panOnFocus, this);\n\t\t}\n\n\t\tthis._icon.remove();\n\t\tthis.removeInteractiveTarget(this._icon);\n\n\t\tthis._icon = null;\n\t}\n\n\t// With the map's `markerCulling` option, takes the icon and shadow of a marker\n\t// far outside of the map view off the page (and puts them back when needed),\n\t// so that the browser doesn't need to render, and the marker doesn't need\n\t// to reposition, them while panning and zooming.\n\t_updateCulling() {\n\t\tif (!this._icon || !this._map) { return; }\n\n\t\tconst visible = this._map.getBounds().pad(0.5).contains(this._latlng) ||\n\t\t\t!!this.dragging?._draggable?._moving ||\n\t\t\tthis._icon.contains(document.activeElement);\n\n\t\tif (visible === !this._culled) { return; }\n\t\tthis._culled = !visible;\n\n\t\tif (visible) {\n\t\t\tthis.getPane().appendChild(this._icon);\n\t\t\tif (this._shadow) {\n\t\t\t\tthis.getPane(this.options.shadowPane).appendChild(this._shadow);\n\t\t\t}\n\t\t\tthis.update();\n\t\t} else {\n\t\t\tthis._icon.remove();\n\t\t\tthis._shadow?.remove();\n\t\t}\n\t}\n\n\t_removeShadow() {\n\t\tthis._shadow?.remove();\n\t\tthis._shadow = null;\n\t}\n\n\t_setPos(pos) {\n\n\t\tif (this._icon) {\n\t\t\tDomUtil.setPosition(this._icon, pos);\n\t\t}\n\n\t\tif (this._shadow) {\n\t\t\tDomUtil.setPosition(this._shadow, pos);\n\t\t}\n\n\t\tthis._zIndex = pos.y + this.options.zIndexOffset;\n\n\t\tthis._resetZIndex();\n\t}\n\n\t_updateZIndex(offset) {\n\t\tconst zIndex = String(this._zIndex + offset);\n\t\tif (this._icon && this._icon.style.zIndex !== zIndex) {\n\t\t\tthis._icon.style.zIndex = zIndex;\n\t\t}\n\t}\n\n\t_animateZoom(opt) {\n\t\tif (this._culled) { return; }\n\t\tconst pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();\n\n\t\tthis._setPos(pos);\n\t}\n\n\t_initInteraction() {\n\n\t\tif (!this.options.interactive) { return; }\n\n\t\tthis._icon.classList.add('maplair-interactive');\n\n\t\tthis.addInteractiveTarget(this._icon);\n\n\t\tif (MarkerDrag) {\n\t\t\tlet draggable = this.options.draggable;\n\t\t\tif (this.dragging) {\n\t\t\t\tdraggable = this.dragging.enabled();\n\t\t\t\tthis.dragging.disable();\n\t\t\t}\n\n\t\t\tthis.dragging = new MarkerDrag(this);\n\n\t\t\tif (draggable) {\n\t\t\t\tthis.dragging.enable();\n\t\t\t}\n\t\t}\n\t}\n\n\t// @method setOpacity(opacity: Number): this\n\t// Changes the opacity of the marker.\n\tsetOpacity(opacity) {\n\t\tthis.options.opacity = opacity;\n\t\tif (this._map) {\n\t\t\tthis._updateOpacity();\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t_updateOpacity() {\n\t\tconst opacity = this.options.opacity;\n\n\t\tif (this._icon) {\n\t\t\tthis._icon.style.opacity = opacity;\n\t\t}\n\n\t\tif (this._shadow) {\n\t\t\tthis._shadow.style.opacity = opacity;\n\t\t}\n\t}\n\n\t_bringToFront() {\n\t\tthis._updateZIndex(this.options.riseOffset);\n\t}\n\n\t_resetZIndex() {\n\t\tthis._updateZIndex(0);\n\t}\n\n\t_panOnFocus() {\n\t\tconst map = this._map;\n\t\tif (!map) { return; }\n\n\t\tconst iconOpts = this.options.icon.options;\n\t\tconst size = iconOpts.iconSize ? new Point(iconOpts.iconSize) : new Point(0, 0);\n\t\tconst anchor = iconOpts.iconAnchor ? new Point(iconOpts.iconAnchor) : new Point(0, 0);\n\n\t\tmap.panInside(this._latlng, {\n\t\t\tpaddingTopLeft: anchor,\n\t\t\tpaddingBottomRight: size.subtract(anchor)\n\t\t});\n\t}\n\n\t_getPopupAnchor() {\n\t\treturn this.options.icon.options.popupAnchor;\n\t}\n\n\t_getTooltipAnchor() {\n\t\treturn this.options.icon.options.tooltipAnchor;\n\t}\n}\n"],"mappings":";;;;;;;;;AAuBA,IAAa,SAAb,MAAa,eAAe,MAAM;CAEjC;EAGC,KAAK,kBAAkB;GAKtB,MAAM,IAAI,YAAY;GAGtB,aAAa;GAIb,UAAU;GAKV,OAAO;GAKP,KAAK;GAIL,cAAc;GAId,SAAS;GAIT,aAAa;GAIb,YAAY;GAIZ,MAAM;GAIN,YAAY;GAQZ,QAAQ;GAKR,uBAAuB;GAMvB,gBAAgB;GAKhB,WAAW;GAIX,SAAS;GAKT,gBAAgB,CAAC,IAAI,EAAE;GAIvB,cAAc;EACf,CAAC;CACF;CAOA,YAAY,QAAQ,SAAS;EAC5B,MAAM;EACN,WAAgB,MAAM,OAAO;EAC7B,KAAK,UAAU,IAAI,OAAO,MAAM;EAEhC,KAAK,cAAc,MAAM;CAC1B;CAEA,MAAM,KAAK;EACV,KAAK,gBAAgB,KAAK,iBAAiB,IAAI,QAAQ;EAEvD,IAAI,KAAK,eACR,IAAI,GAAG,YAAY,KAAK,cAAc,IAAI;EAG3C,KAAK,UAAU;EACf,KAAK,OAAO;EAEZ,IAAI,IAAI,QAAQ,eACf,KAAK,eAAe;CAEtB;CAEA,SAAS,KAAK;EACb,IAAI,KAAK,UAAU,QAAQ,GAAG;GAC7B,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