File tree Expand file tree Collapse file tree 1 file changed +20
-19
lines changed Expand file tree Collapse file tree 1 file changed +20
-19
lines changed Original file line number Diff line number Diff line change 1- import { LatLngBoundsExpression , LatLngTuple } from "leaflet" ;
1+ import { Control , MapOptions } from "leaflet" ;
22
3- interface Map {
4- center : LatLngTuple ;
5- zoom : number ;
6- minZoom : number ;
7- maxZoom : number ;
8- maxBounds : LatLngBoundsExpression ;
9- maxBoundsViscosity : number ;
10- worldCopyJump : boolean ;
11- keyboard : boolean ;
12- zoomControl : boolean ;
13- }
3+ type MapConfig = Required <
4+ Pick <
5+ MapOptions ,
6+ | "center"
7+ | "zoom"
8+ | "minZoom"
9+ | "maxZoom"
10+ | "maxBounds"
11+ | "maxBoundsViscosity"
12+ | "worldCopyJump"
13+ | "keyboard"
14+ | "zoomControl"
15+ >
16+ > ;
1417
15- interface ZoomControl {
16- position ?: "topleft" | "topright" | "bottomleft" | "bottomright" ;
17- }
18+ type ZoomControlConfig = Control . ZoomOptions ;
1819
19- interface FeaturesDisabling {
20+ interface FeaturesDisablingConfig {
2021 isShowLayersSwitcher : boolean ;
2122 isShowZoomControls : boolean ;
2223}
2324
2425export interface Config {
25- MAP : Map ;
26- ZOOM_CONTROL : ZoomControl ;
27- FEATURES_DISABLING : FeaturesDisabling ;
26+ MAP : MapConfig ;
27+ ZOOM_CONTROL : ZoomControlConfig ;
28+ FEATURES_DISABLING : FeaturesDisablingConfig ;
2829}
You can’t perform that action at this time.
0 commit comments