|
@@ -24,6 +24,14 @@
|
|
|
<!-- </keep-alive> -->
|
|
|
</router-view>
|
|
|
</div>
|
|
|
+
|
|
|
+ <span
|
|
|
+ class="taggle map-type"
|
|
|
+ @click="isStandard = !isStandard"
|
|
|
+ @touchend="isStandard = !isStandard"
|
|
|
+ >
|
|
|
+ <img :src="isStandard ? '/images/satellite.jpg' : '/images/standard.jpg'" />
|
|
|
+ </span>
|
|
|
</ui-editor-layout>
|
|
|
|
|
|
<PwdModel v-if="inputPwd" @close="inputPwd = false" />
|
|
@@ -39,6 +47,14 @@ import { loadPack, needMounts } from "@/utils";
|
|
|
import { ConfigProvider } from "ant-design-vue";
|
|
|
import PwdModel from "@/layout/pwd.vue";
|
|
|
import { config } from "./config";
|
|
|
+import { sdk, sdkLoaded } from "./sdk";
|
|
|
+
|
|
|
+const isStandard = ref(true);
|
|
|
+watchEffect(() => {
|
|
|
+ if (sdkLoaded.value) {
|
|
|
+ sdk.switchMapType(isStandard.value ? "satellite" : "standard");
|
|
|
+ }
|
|
|
+});
|
|
|
|
|
|
const loaded = ref(false);
|
|
|
const inputPwd = ref(false);
|
|
@@ -147,4 +163,34 @@ const layoutStyles = computed(() => {
|
|
|
background-color: #ccc;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.taggle {
|
|
|
+ position: absolute;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #fff;
|
|
|
+ background: rgba(0, 0, 0, 0.2);
|
|
|
+ z-index: 9999999;
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ overflow: hidden;
|
|
|
+ justify-content: center;
|
|
|
+ border-radius: 3px;
|
|
|
+ cursor: pointer;
|
|
|
+
|
|
|
+ &.map-type {
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ top: calc(var(--header-top) + var(--editor-head-height) + 10px);
|
|
|
+ right: calc(var(--editor-toolbox-width) + var(--editor-menu-right) + 10px);
|
|
|
+ width: 42px;
|
|
|
+ height: 42px;
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|