| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { onMounted, ref,getCurrentInstance } from 'vue'; |
| | | import { onMounted, ref, getCurrentInstance } from 'vue'; |
| | | import AMapLoader from '@amap/amap-jsapi-loader'; |
| | | |
| | | import DialogType1 from './dialog/dialog-type1.vue'; |
| | |
| | | // dialog集合 |
| | | const dialogList = ref({}); |
| | | // 获取当前实例 |
| | | const {ctx} = getCurrentInstance(); |
| | | let ctx = null; |
| | | |
| | | let mapInstance = null; |
| | | let trafficLayer = null;; |
| | |
| | | |
| | | |
| | | onMounted(() => { |
| | | // 获取当前实例 |
| | | ctx = getCurrentInstance().ctx; |
| | | AMapLoader.load({ |
| | | key: "2898109c22191c3969957500934169dc", //申请好的 Web 端开发者 Key,首次调用 load 时必填 |
| | | version: "2.0", //指定要加载的 JS API 的版本,缺省时默认为 1.4.15 |