File tree Expand file tree Collapse file tree 2 files changed +57
-23
lines changed
src/lib/components/data-vis/map Expand file tree Collapse file tree 2 files changed +57
-23
lines changed Original file line number Diff line number Diff line change 10
10
Control ,
11
11
ControlButton ,
12
12
ControlGroup ,
13
- NavigationControl ,
14
- GeolocateControl ,
15
- FullscreenControl ,
16
- ScaleControl ,
17
13
} from " svelte-maplibre" ;
18
14
import { contrastingColor , colorPalette } from " ./colors.ts" ;
19
15
import { hoverStateFilter } from " svelte-maplibre/filters.js" ;
27
23
jenksBreaks ,
28
24
quantileBreaks ,
29
25
} from " ./mapUtils.js" ;
26
+ import NonStandardControls from " ./NonStandardControls.svelte" ;
30
27
31
28
let {
32
29
data,
205
202
{center }
206
203
{zoom }
207
204
>
208
- {#if navigationControl && ! standardControls }
209
- {#key navigationControlPosition }
210
- <NavigationControl position ={navigationControlPosition } />
211
- {/ key }
212
- {/if }
213
- {#if geolocateControl && ! standardControls }
214
- {#key geolocateControlPosition }
215
- <GeolocateControl position ={geolocateControlPosition } />
216
- {/ key }
217
- {/if }
218
- {#if fullscreenControl && ! standardControls }
219
- {#key fullscreenControlPosition }
220
- <FullscreenControl position ={fullscreenControlPosition } />
221
- {/ key }
222
- {/if }
223
- {#if scaleControl && ! standardControls }
224
- {#key { scaleControlPosition , scaleControlUnit }}
225
- <ScaleControl position ={scaleControlPosition } unit ={scaleControlUnit } />
226
- {/ key }
205
+ {#if ! standardControls }
206
+ <NonStandardControls
207
+ {navigationControl }
208
+ {navigationControlPosition }
209
+ {geolocateControl }
210
+ {geolocateControlPosition }
211
+ {fullscreenControl }
212
+ {fullscreenControlPosition }
213
+ {scaleControl }
214
+ {scaleControlPosition }
215
+ {scaleControlUnit }
216
+ />
227
217
{/if }
218
+
228
219
<Control >
229
220
<ControlGroup >
230
221
<button
291
282
/* margin: 10px; */
292
283
width : fit-content ;
293
284
padding : 0px 10px ;
285
+ font-size : 16px ;
294
286
}
295
287
</style >
Original file line number Diff line number Diff line change
1
+ <script lang =" ts" >
2
+ // @ts-nocheck
3
+ import {
4
+ FullscreenControl ,
5
+ GeolocateControl ,
6
+ NavigationControl ,
7
+ ScaleControl ,
8
+ } from " svelte-maplibre" ;
9
+
10
+ let {
11
+ navigationControl,
12
+ navigationControlPosition = " top-left" ,
13
+ geolocateControl,
14
+ geolocateControlPosition = " top-left" ,
15
+ fullscreenControl,
16
+ fullscreenControlPosition = " top-left" ,
17
+ scaleControl,
18
+ scaleControlPosition = " bottom-left" ,
19
+ scaleControlUnit = " metric" ,
20
+ } = $props ();
21
+ </script >
22
+
23
+ {#if navigationControl }
24
+ {#key navigationControlPosition }
25
+ <NavigationControl position ={navigationControlPosition } />
26
+ {/ key }
27
+ {/if }
28
+ {#if geolocateControl }
29
+ {#key geolocateControlPosition }
30
+ <GeolocateControl position ={geolocateControlPosition } />
31
+ {/ key }
32
+ {/if }
33
+ {#if fullscreenControl }
34
+ {#key fullscreenControlPosition }
35
+ <FullscreenControl position ={fullscreenControlPosition } />
36
+ {/ key }
37
+ {/if }
38
+ {#if scaleControl }
39
+ {#key { scaleControlPosition , scaleControlUnit }}
40
+ <ScaleControl position ={scaleControlPosition } unit ={scaleControlUnit } />
41
+ {/ key }
42
+ {/if }
You can’t perform that action at this time.
0 commit comments