olamaps-web-sdk 1.2.0 → 1.4.0
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.
|
@@ -33012,19 +33012,25 @@ class Yx {
|
|
|
33012
33012
|
i.style.position = "absolute", i.style.bottom = "4px", i.style.left = "10px", i.style.zIndex = "1000", i.innerHTML = xg(n), s[r].appendChild(i);
|
|
33013
33013
|
}
|
|
33014
33014
|
}
|
|
33015
|
-
addAttribution() {
|
|
33016
|
-
document.querySelectorAll(".maplibregl-ctrl-bottom-right .maplibregl-ctrl-attrib-inner")?.
|
|
33017
|
-
|
|
33018
|
-
|
|
33019
|
-
|
|
33020
|
-
|
|
33021
|
-
|
|
33022
|
-
|
|
33015
|
+
addAttribution(e) {
|
|
33016
|
+
const s = document.querySelectorAll(".maplibregl-ctrl-bottom-right .maplibregl-ctrl-attrib-inner"), n = e?.style || "";
|
|
33017
|
+
s?.forEach((r) => {
|
|
33018
|
+
const i = r.querySelector("a");
|
|
33019
|
+
i && (i.style.display = "none");
|
|
33020
|
+
const o = "ola-maps-link";
|
|
33021
|
+
if (!r.querySelector(`#${o}`)) {
|
|
33022
|
+
const l = document.createElement("a");
|
|
33023
|
+
l.id = o, l.href = "https://maps.olakrutrim.com/", l.target = "_blank", l.textContent = "Ola Maps ", r.appendChild(l);
|
|
33023
33024
|
}
|
|
33024
|
-
const
|
|
33025
|
-
if (!
|
|
33026
|
-
const
|
|
33027
|
-
|
|
33025
|
+
const a = "osm-link";
|
|
33026
|
+
if (!r.querySelector(`#${a}`)) {
|
|
33027
|
+
const l = document.createElement("a");
|
|
33028
|
+
l.id = a, l.href = "https://www.openstreetmap.org/copyright", l.target = "_blank", l.textContent = "| © OpenStreetMap contributors", r.appendChild(l);
|
|
33029
|
+
}
|
|
33030
|
+
const c = "copernicus-attrib";
|
|
33031
|
+
if (n.includes("default-dark-standard-satellite") && !r.querySelector(`#${c}`)) {
|
|
33032
|
+
const l = document.createElement("span");
|
|
33033
|
+
l.id = c, l.textContent = " | Contains modified Copernicus Sentinel-2 data 2024", r.appendChild(l);
|
|
33028
33034
|
}
|
|
33029
33035
|
});
|
|
33030
33036
|
}
|
|
@@ -33082,7 +33088,7 @@ class Yx {
|
|
|
33082
33088
|
}
|
|
33083
33089
|
},
|
|
33084
33090
|
...e
|
|
33085
|
-
}), this.mode === "3d" && this.add3dLayer(), this.addOlaLogo(e), this.addAttribution();
|
|
33091
|
+
}), this.mode === "3d" && this.add3dLayer(), this.addOlaLogo(e), this.addAttribution({ style: e?.style });
|
|
33086
33092
|
const s = {};
|
|
33087
33093
|
return Object.getOwnPropertyNames(V.Map.prototype).forEach((r) => {
|
|
33088
33094
|
typeof this.olaMaps[r] == "function" && (s[r] = this.olaMaps[r].bind(this.olaMaps));
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ class r {
|
|
|
12
12
|
if (typeof window > "u")
|
|
13
13
|
throw new Error("OlaMaps can only be initialized in a browser environment");
|
|
14
14
|
const [{ OlaMaps: o }, i] = await Promise.all([
|
|
15
|
-
import("./OlaMaps-
|
|
15
|
+
import("./OlaMaps-C83wz36C.js"),
|
|
16
16
|
import("./maplibre-gl-BIFSxk4Y.js").then((a) => a.O)
|
|
17
17
|
]);
|
|
18
18
|
return r.initializeStaticProperties(i), await new o({
|