ublo-lib 1.14.7 → 1.14.9
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { MapContainer, TileLayer } from "react-leaflet";
|
|
2
|
+
import { AttributionControl, MapContainer, TileLayer } from "react-leaflet";
|
|
3
3
|
import { useUbloContext } from "ublo/with-ublo";
|
|
4
4
|
import Button from "dt-design-system/es/button";
|
|
5
5
|
import * as Icons from "dt-design-system/es/icons";
|
|
@@ -67,7 +67,7 @@ export default function EditableMap({
|
|
|
67
67
|
element.setAttribute("data-presets", JSON.stringify(newPresets));
|
|
68
68
|
}
|
|
69
69
|
}, [center, element, isEditing, markers, showSlopes, zoom]);
|
|
70
|
-
const attribution = showSlopes ? '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> & <a href="https://www.opensnowmap.org/">OpenSnowMap</a> contributors' : '© <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors';
|
|
70
|
+
const attribution = showSlopes ? '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> & <a href="https://www.opensnowmap.org/">OpenSnowMap</a> contributors' : '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
|
71
71
|
return _jsxs("div", {
|
|
72
72
|
ref: containerRef,
|
|
73
73
|
className: css.container,
|
|
@@ -78,9 +78,10 @@ export default function EditableMap({
|
|
|
78
78
|
zoom: zoom,
|
|
79
79
|
scrollWheelZoom: scrollWheelZoom,
|
|
80
80
|
className: css.map,
|
|
81
|
+
attributionControl: false,
|
|
81
82
|
children: [_jsx(TileLayer, {
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
attribution: attribution,
|
|
84
|
+
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
84
85
|
}), showSlopes && _jsx(TileLayer, {
|
|
85
86
|
url: "https://tiles.opensnowmap.org/pistes/{z}/{x}/{y}.png"
|
|
86
87
|
}), _jsx(MapEvents, {
|
|
@@ -99,6 +100,9 @@ export default function EditableMap({
|
|
|
99
100
|
iconSet: iconSet,
|
|
100
101
|
isEditing: isEditing
|
|
101
102
|
})
|
|
103
|
+
}), _jsx(AttributionControl, {
|
|
104
|
+
position: "bottomright",
|
|
105
|
+
prefix: ""
|
|
102
106
|
})]
|
|
103
107
|
}), !isEditing && _jsx(FullScreenButton, {
|
|
104
108
|
fullScreen: fullScreen,
|