File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<template >
2- <div ref =" mapContainer" class =" geojson-map-viewer" ></div >
2+ <div class =" geojson-map-viewer-wrapper" >
3+ <div ref =" mapContainer" class =" geojson-map-viewer" ></div >
4+ <v-btn
5+ v-if =" fullscreenButton"
6+ class =" fullscreen-btn"
7+ size =" small"
8+ color =" white"
9+ variant =" elevated"
10+ title =" Full screen"
11+ @click =" dialogOpen = true"
12+ >
13+ <v-icon icon =" mdi-fullscreen" ></v-icon >
14+ </v-btn >
15+ <v-dialog v-model =" dialogOpen" >
16+ <v-card >
17+ <v-card-title class =" d-flex align-center" >
18+ Map
19+ <v-spacer />
20+ <v-btn icon =" mdi-close" variant =" text" @click =" dialogOpen = false" />
21+ </v-card-title >
22+ <v-card-text class =" pa-0" style =" height : 75vh " >
23+ <geo-json-map-viewer
24+ v-if =" dialogOpen"
25+ :geojson =" geojson"
26+ :ld-context =" ldContext"
27+ :fullscreen-button =" false"
28+ />
29+ </v-card-text >
30+ </v-card >
31+ </v-dialog >
32+ </div >
333</template >
434
535<script >
@@ -39,6 +69,7 @@ async function loadDeps() {
3969}
4070
4171export default {
72+ name: ' GeoJsonMapViewer' ,
4273 props: {
4374 geojson: {
4475 type: Object ,
@@ -47,12 +78,17 @@ export default {
4778 ldContext: {
4879 type: String ,
4980 required: false ,
50- }
81+ },
82+ fullscreenButton: {
83+ type: Boolean ,
84+ default: true ,
85+ },
5186 },
5287 data () {
5388 return {
5489 map: null ,
5590 geojsonLayer: null ,
91+ dialogOpen: false ,
5692 };
5793 },
5894 async mounted () {
@@ -117,10 +153,31 @@ export default {
117153 </script >
118154
119155<style scoped>
156+ .geojson-map-viewer-wrapper {
157+ position : relative ;
158+ height : 100% ;
159+ width : 100% ;
160+ }
161+
120162.geojson-map-viewer {
121163 height : 100% ;
122164 width : 100% ;
123165}
166+
167+ .fullscreen-btn {
168+ position : absolute ;
169+ top : 8px ;
170+ right : 8px ;
171+ z-index : 1000 ;
172+ opacity : 0.85 ;
173+ min-width : 0 !important ;
174+ padding : 0 !important ;
175+ width : 28px ;
176+ }
177+
178+ .fullscreen-btn :hover {
179+ opacity : 1 ;
180+ }
124181 </style >
125182
126183<style >
@@ -144,7 +201,6 @@ export default {
144201}
145202
146203.leaflet-popup-content .object-property {
147- white-space : nowrap ;
148204 font-weight : 500 ;
149205 color : #555 ;
150206}
You can’t perform that action at this time.
0 commit comments