11<script setup lang="ts">
22import { ref , onMounted } from ' vue'
33import { Map , View } from ' ol'
4+ import { ScaleLine } from ' ol/control'
45import DataCabinet from ' ./DataCabinet.vue'
56import GlobalFeedbackWidget from ' ./GlobalFeedbackWidget.vue'
6- import MapLegend from ' ./MapLegend.vue'
77import ProcessingResults from ' ./ProcessingResults.vue'
88import PropertiesDisplay from ' ./PropertiesDisplay.vue'
99import createLabelLayer from ' ../layers/Label-Layer'
@@ -89,6 +89,8 @@ onMounted(async () => {
8989 updateLayers ()
9090
9191 addMapClickHandler (map .value as Map , areaValues .value )
92+ // Add scale bar
93+ map .value .addControl (new ScaleLine ())
9294 // Setup permalink functionality
9395 setupPermalink (map )
9496 }
@@ -114,8 +116,6 @@ defineExpose({
114116 />
115117
116118 <GlobalFeedbackWidget v-if =" map && settings.mode === 'global'" />
117-
118- <MapLegend />
119119 </div >
120120
121121 <!-- Properties Box -->
@@ -227,6 +227,17 @@ defineExpose({
227227 overflow-y : auto ;
228228}
229229
230+ :deep(.ol-zoom ),
231+ :deep(.ol-attribution ),
232+ :deep(.ol-scale-line ) {
233+ --ol-background-color : black ;
234+ --ol-accent-background-color : #333333 ;
235+ --ol-subtle-background-color : rgba (128 , 128 , 128 , 0.25 );
236+ --ol-partial-background-color : rgba (0 , 0 , 0 , 0.75 );
237+ --ol-foreground-color : #eeeeee ;
238+ --ol-subtle-foreground-color : #aaaaaa ;
239+ }
240+
230241:deep(.ol-zoom ) {
231242 top : unset ;
232243 right : unset ;
@@ -235,41 +246,31 @@ defineExpose({
235246 z-index : 10000 ;
236247}
237248
238- :deep(.ol-attribution ) {
249+ :deep(.ol-scale-line ) {
239250 top : unset ;
240251 right : unset ;
241252 bottom : 1rem ;
242- left : calc (2rem + 10px );
253+ left : 3rem ;
254+ z-index : 2000 ;
255+ }
256+
257+ :deep(.ol-attribution ) {
258+ top : unset ;
259+ right : unset ;
260+ bottom : calc (4rem );
261+ left : 1rem ;
243262 z-index : 10000 ;
244263 flex-direction : row ;
245- max-width : 90 vw ;
264+ max-width : 30 vw ;
246265 align-items : end ;
266+ text-align : left ;
247267}
248268
249269:deep(.ol-attribution button ) {
250270 order : -1 ;
251271}
252272
253- :deep(.ol-zoom button ),
254- :deep(.ol-attribution button ) {
255- background-color : rgba (0 , 0 , 0 , 0.8 );
256- color : #fff ;
257- }
258-
259- :deep(.ol-zoom button :hover ),
260- :deep(.ol-attribution button :hover ) {
261- background-color : rgba (0 , 0 , 0 , 1 );
262- color : #fff ;
263- }
264-
265273:deep(.ol-attribution ul ) {
266- color : #000 ;
267274 font-size : 0.875rem ;
268- text-shadow : none ;
269- }
270-
271- :deep(.ol-attribution ul li a ) {
272- color : #000 ;
273- text-decoration : underline ;
274275}
275276 </style >
0 commit comments