potato-map3d-ui2 0.0.20 → 0.0.21
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/dist/map3d-ui2.es.js +4 -1
- package/dist/map3d-ui2.umd.js +4 -1
- package/package.json +1 -1
package/dist/map3d-ui2.es.js
CHANGED
@@ -745,6 +745,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
745
745
|
const map = getMap({ mapId: props.mapId });
|
746
746
|
map.basemap = name;
|
747
747
|
}
|
748
|
+
function getImageUrl(url) {
|
749
|
+
return new URL(url, import.meta.url).href;
|
750
|
+
}
|
748
751
|
return (_ctx, _cache) => {
|
749
752
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
750
753
|
createElementVNode("div", {
|
@@ -785,7 +788,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
785
788
|
onClick: ($event) => selectBaseMap(item.name)
|
786
789
|
}, [
|
787
790
|
createElementVNode("img", {
|
788
|
-
src: item.icon,
|
791
|
+
src: getImageUrl(item.icon),
|
789
792
|
style: { "height": "60px", "width": "60px", "border-radius": "4px" }
|
790
793
|
}, null, 8, _hoisted_4$1),
|
791
794
|
createElementVNode("div", {
|
package/dist/map3d-ui2.umd.js
CHANGED
@@ -748,6 +748,9 @@
|
|
748
748
|
const map = getMap({ mapId: props.mapId });
|
749
749
|
map.basemap = name;
|
750
750
|
}
|
751
|
+
function getImageUrl(url) {
|
752
|
+
return new URL(url, typeof document === "undefined" && typeof location === "undefined" ? require("url").pathToFileURL(__filename).href : typeof document === "undefined" ? location.href : document.currentScript && document.currentScript.src || new URL("map3d-ui2.umd.js", document.baseURI).href).href;
|
753
|
+
}
|
751
754
|
return (_ctx, _cache) => {
|
752
755
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
|
753
756
|
vue.createElementVNode("div", {
|
@@ -788,7 +791,7 @@
|
|
788
791
|
onClick: ($event) => selectBaseMap(item.name)
|
789
792
|
}, [
|
790
793
|
vue.createElementVNode("img", {
|
791
|
-
src: item.icon,
|
794
|
+
src: getImageUrl(item.icon),
|
792
795
|
style: { "height": "60px", "width": "60px", "border-radius": "4px" }
|
793
796
|
}, null, 8, _hoisted_4$1),
|
794
797
|
vue.createElementVNode("div", {
|