<template>
  <div style="position: relative;height: 100%;width: 100%;">
    <MapShipHistoricalSail ref="mapShipHistoricalSail" @handleOpenShipHistoricalTrack="handleOpenShipHistoricalTrack" />
    <MapShipHistoricalTrack ref="mapShipHistoricalTrack" @handleCloseShipHistoricalTrack="handleCloseShipHistoricalTrack" style="position: absolute;inset: 0;z-index: 2;" v-if="showShipHistoricalTrack" />
  </div>
</template>

<script setup name="Map">
import MapShipHistoricalSail from "@/components/Map/ShipHistoricalSail/index";
import MapShipHistoricalTrack from "@/components/Map/ShipHistoricalTrack/index";
const { proxy } = getCurrentInstance(); // 获取实例中的proxy

const showShipHistoricalTrack = ref(false);

const handleOpenShipHistoricalTrack = () => {
  //// console.log(showShipHistoricalTrack.value)
  showShipHistoricalTrack.value = true;
};

const handleCloseShipHistoricalTrack = () => {
  //// console.log(showShipHistoricalTrack.value)
  showShipHistoricalTrack.value = false;
};

</script>
