<template>
|
<div id="container" :style="height"></div>
|
</template>
|
|
<script setup>
|
import { onMounted, inject } from 'vue'
|
import { createMap } from '@/utils/map/index'
|
// import { createMap } from '@/utils/map/baseMap'
|
|
const mapHeight = inject('mapHeight')
|
|
const height = 'height:' + mapHeight
|
|
onMounted(() => {
|
// 高德地图初始化
|
createMap('container')
|
})
|
</script>
|
<style>
|
#container {
|
position: relative;
|
width: 100%;
|
/* height: calc(var(--fy-body-height) / 2); */
|
/* min-height: var(--screen-min-height);
|
min-width: var(--screen-min-width); */
|
z-index: 0px;
|
}
|
|
/* 去除高德地图的固定版号图标 */
|
.amap-logo {
|
display: none;
|
opacity: 0 !important;
|
}
|
.amap-copyright {
|
display: none;
|
opacity: 0 !important;
|
}
|
|
.amap-marker-label {
|
font-size: 13px;
|
text-align: center;
|
color: white;
|
background-color: transparent;
|
text-shadow: black 2px 2px 2px;
|
border-radius: 2px;
|
border: 0px;
|
padding: 4px;
|
}
|
</style>
|