File tree Expand file tree Collapse file tree 3 files changed +63
-64
lines changed
src/components/mapControls Expand file tree Collapse file tree 3 files changed +63
-64
lines changed Original file line number Diff line number Diff line change 1+ <template lang="">
2+ <div v-if =" false" ></div >
3+ </template >
4+
5+ <script setup>
6+ import Zoom from " ol/control/Zoom" ;
7+ import useControl from " @/composables/useControl" ;
8+ import { useAttrs } from " vue" ;
9+
10+ const props = defineProps ({
11+ duration: {
12+ type: Number ,
13+ default: 250 ,
14+ },
15+ className: {
16+ type: String ,
17+ default: " ol-zoom" ,
18+ },
19+ zoomInClassName: {
20+ type: String ,
21+ default: " ol-zoom-in" ,
22+ },
23+ zoomOutClassName: {
24+ type: String ,
25+ default: " ol-zoom-out" ,
26+ },
27+ zoomInLabel: {
28+ type: String ,
29+ default: " +" ,
30+ },
31+ zoomOutLabel: {
32+ type: String ,
33+ default: " -" ,
34+ },
35+ zoomInTipLabel: {
36+ type: String ,
37+ default: " Zoom in" ,
38+ },
39+ zoomOutTipLabel: {
40+ type: String ,
41+ default: " Zoom Out" ,
42+ },
43+ delta: {
44+ type: Number ,
45+ default: 1 ,
46+ },
47+ target: {
48+ type: HTMLElement ,
49+ },
50+ });
51+
52+ const attrs = useAttrs ();
53+ const { control } = useControl (Zoom, props, { attrs });
54+
55+ defineExpose ({
56+ control,
57+ });
58+ </script >
59+
60+ <style lang=""></style >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import OlSwipeControl from "./OlSwipeControl.vue";
1414import OlToggleControl from "./OlToggleControl.vue" ;
1515import OlVideoRecorderControl from "./OlVideoRecorderControl.vue" ;
1616import OlZoneControl from "./OlZoneControl.vue" ;
17- import ZoomControl from "./ZoomControl .vue" ;
17+ import OlZoomControl from "./OlZoomControl .vue" ;
1818import ZoomSliderControl from "./ZoomSliderControl.vue" ;
1919import ZoomToExtentControl from "./ZoomToExtentControl.vue" ;
2020
@@ -30,7 +30,7 @@ function install(app) {
3030 app . component ( "ol-mouseposition-control" , OlMousePositionControl ) ;
3131 app . component ( "ol-overviewmap-control" , OlOverviewMapControl ) ;
3232 app . component ( "ol-scaleline-control" , OlScaleLineControl ) ;
33- app . component ( ZoomControl . name , ZoomControl ) ;
33+ app . component ( "ol-zoom-control" , OlZoomControl ) ;
3434 app . component ( ZoomSliderControl . name , ZoomSliderControl ) ;
3535 app . component ( ZoomToExtentControl . name , ZoomToExtentControl ) ;
3636 app . component ( "ol-rotate-control" , OlRotateControl ) ;
@@ -66,7 +66,7 @@ export {
6666 OlToggleControl ,
6767 OlVideoRecorderControl ,
6868 OlZoneControl ,
69- ZoomControl ,
69+ OlZoomControl ,
7070 ZoomSliderControl ,
7171 ZoomToExtentControl ,
7272} ;
You can’t perform that action at this time.
0 commit comments