| | |
| | | <div class="baseMapSwitching"> |
| | | <div class="baseMapSwitchingTitle"> |
| | | <div class="tileLeft"> |
| | | <div class="titleImg"> |
| | | <div class="titleImg" @click="setCloseBaseMap"> |
| | | <ArrowLeft /> |
| | | </div> |
| | | <div class="titleLable">投影图层管理</div> |
| | |
| | | import projection from "@/assets/js/Map/projectionServer"; |
| | | |
| | | import olMap from "@/assets/js/Map/olMap"; |
| | | const emits = defineEmits(["setCloseBaseMap"]); |
| | | let list = ref([]); |
| | | const activceIndex = ref(); |
| | | const setProjectionLayerChange = (res) => { |
| | |
| | | projection.extent = [-90, -90, 90, 90]; |
| | | } |
| | | // olMap.initMap(); |
| | | |
| | | olMap.addTreeData(res, projection); |
| | | activceIndex.value = res.id; |
| | | // store.state.restLayer = true; |
| | |
| | | return res; |
| | | } |
| | | }); |
| | | list.value = result.reverse(); |
| | | var val = result.sort(function (a, b) { |
| | | return a.orderNum - b.orderNum; |
| | | }); |
| | | list.value = val; |
| | | setProjectionLayerChange(list.value[0]); |
| | | // if (!activceIndex.value) { |
| | | // setProjectionLayerChange(list.value[0]); |
| | | // } |
| | | }; |
| | | getProjectionLayer(); |
| | | const setCloseBaseMap = () => { |
| | | emits("setCloseBaseMap", false); |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |