筛选、导出、弹框优化
This commit is contained in:
51
src/views/visualiz/sound/road/index.vue
Normal file
51
src/views/visualiz/sound/road/index.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Scene } from "@antv/l7";
|
||||
import { Mapbox } from "@antv/l7-maps";
|
||||
// import axios from "axios";
|
||||
// import { GaodeMap } from "@antv/l7-maps";
|
||||
import { CityLayer } from "@antv/l7-district";
|
||||
export default {
|
||||
mounted() {
|
||||
const scene = new Scene({
|
||||
id: "map",
|
||||
map: new Mapbox({
|
||||
center: [108.33, 22.84],
|
||||
pitch: 0,
|
||||
style: "blank",
|
||||
zoom: 3,
|
||||
minZoom: 3,
|
||||
maxZoom: 10,
|
||||
}),
|
||||
});
|
||||
|
||||
scene.on("loaded", () => {
|
||||
new CityLayer(scene, {
|
||||
// data: res,
|
||||
joinBy: ["adcode", "citycode"],
|
||||
adcode: ["450100", "771"],
|
||||
depth: 3,
|
||||
label: {
|
||||
field: "NAME_CHN",
|
||||
textAllowOverlap: false,
|
||||
},
|
||||
|
||||
popup: {
|
||||
enable: true,
|
||||
Html: (props) => {
|
||||
return `<span>${props.NAME_CHN}:</span><span>${props.citycode}</span>`;
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user