| | |
| | | getSpaceTime, |
| | | } from "@/api/index.js"; |
| | | import { getImg } from "@/static/tool.js"; |
| | | import L from "leaflet"; |
| | | import "leaflet.chinatmsproviders"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | }; |
| | | }); |
| | | // 时空地图 |
| | | loadBMap("1NJdwrI1CfT6lrykVhDkmWgsO6O2bjQK").then(() => { |
| | | this.spaceTime(data); |
| | | }); |
| | | this.initMap(data[0]); |
| | | // loadBMap("1NJdwrI1CfT6lrykVhDkmWgsO6O2bjQK").then(() => { |
| | | // this.spaceTime(data); |
| | | // }); |
| | | }); |
| | | }, |
| | | |
| | | initMap(markerList) { |
| | | var map = L.map("spaceTime", { |
| | | preferCanvas: true, |
| | | attributionControl: false, |
| | | }).setView([markerList.value[1], markerList.value[0]], 13); |
| | | L.tileLayer |
| | | .chinaProvider("TianDiTu.Normal.Map", { |
| | | key: "76bc34ead7e30e663a4eded8aeaf5860", |
| | | maxZoom: 18, |
| | | minZoom: 3, |
| | | }) |
| | | .addTo(map); |
| | | let icon = L.divIcon({ |
| | | html: "<div class='map-circle-name ripple'></div>", |
| | | iconSize: [80, 80], |
| | | className: "map-circle", |
| | | }); |
| | | this.map = map; |
| | | const temp_mark = L.marker([markerList.value[1], markerList.value[0]], { |
| | | icon: icon, |
| | | }).addTo(map); |
| | | }, |
| | | // 放大地图跳转 |
| | | fangdaClick(index) { |
| | | if (index == 1) { |
| | |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | |
| | | // const data = [ |
| | | // { |
| | | // name: "海门", |
| | | // value: [121.15, 31.89] |
| | | // }, |
| | | // { |
| | | // name: "鄂尔多斯", |
| | | // value: [109.781327, 39.608266] |
| | | // }, |
| | | // { |
| | | // name: "招远", |
| | | // value: [120.38, 37.35] |
| | | // }, |
| | | // { |
| | | // name: "舟山", |
| | | // value: [122.207216, 29.985295] |
| | | // }, |
| | | // { |
| | | // name: "齐齐哈尔", |
| | | // value: [123.97, 47.33] |
| | | // } |
| | | // ]; |
| | | option = { |
| | | title: { |
| | | text: "", |
| | |
| | | .BoxRight .box-card { |
| | | margin-bottom: 0.2rem !important; |
| | | } |
| | | ::v-deep .map-circle-name { |
| | | width: 20px; |
| | | height: 20px; |
| | | border-radius: 50%; |
| | | background-color: rgb(222, 142, 102); |
| | | } |
| | | ::v-deep .ripple { |
| | | border-radius: 50%; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | ::v-deep .ripple::before { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | width: 150%; /* Ensure it covers the entire parent */ |
| | | height: 150%; |
| | | background: rgba(255, 255, 255, 0.5); |
| | | border-radius: 50%; |
| | | transform: translate(-50%, -50%) scale(1); |
| | | animation: ripple-animation 1s infinite linear; |
| | | } |
| | | |
| | | @keyframes ripple-animation { |
| | | to { |
| | | transform: translate(-50%, -50%) scale(0); |
| | | opacity: 0; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <script> |
| | | import { loadBMap } from "@/static/map.js"; |
| | | import L from "leaflet"; |
| | | import "leaflet.chinatmsproviders"; |
| | | |
| | | import * as echarts from "echarts"; |
| | | import "echarts/extension/bmap/bmap"; |
| | | import "leaflet.chinatmsproviders"; |
| | | import { getRetrieval, getDynasty } from "@/api/index.js"; |
| | | export default { |
| | | data() { |