feat: wire guide data source and POI focus UI
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { computed, ref, onMounted } from 'vue'
|
||||
|
||||
const isH5 = typeof window !== 'undefined'
|
||||
|
||||
@@ -94,6 +94,19 @@ interface Polygon {
|
||||
zIndex: number
|
||||
}
|
||||
|
||||
interface MapFloor {
|
||||
id: string
|
||||
label: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
activeFloor?: string
|
||||
floors?: MapFloor[]
|
||||
}>(), {
|
||||
activeFloor: '1F',
|
||||
floors: () => [] as MapFloor[]
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
markerClick: [markerId: number]
|
||||
floorChange: [floor: string]
|
||||
@@ -111,15 +124,10 @@ const mapCenter = ref<MapCenter>({
|
||||
const mapScale = ref(17)
|
||||
|
||||
// 当前楼层
|
||||
const currentFloor = ref('1F')
|
||||
const currentFloor = ref(props.activeFloor)
|
||||
|
||||
// 楼层列表
|
||||
const floors = [
|
||||
{ id: '3F', label: '3F' },
|
||||
{ id: '2F', label: '2F' },
|
||||
{ id: '1F', label: '1F' },
|
||||
{ id: 'B1', label: 'B1' }
|
||||
]
|
||||
const floors = computed(() => props.floors)
|
||||
|
||||
// 博物馆建筑围栏(多边形)
|
||||
// 深圳自然博物馆实际建筑轮廓坐标
|
||||
|
||||
Reference in New Issue
Block a user