-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ajout des composants FullScreen et OverMapView (#236)
* Ajout des composants FullScreen et OverMapView (en position absolue) * Modification des positions des boutons * Ajout des Modes disable / active sur le menu des contrôles
- Loading branch information
1 parent
641002a
commit 86b814a
Showing
10 changed files
with
141 additions
and
32 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<script setup lang="js"> | ||
import FullScreen from 'ol/control/FullScreen' | ||
const props = defineProps({ | ||
visibility: Boolean, | ||
fullscreenOptions: Object | ||
}) | ||
const map = inject('map') | ||
const fullscreen = ref(new FullScreen(props.fullscreenOptions)) | ||
onMounted(() => { | ||
if (props.visibility) { | ||
map.addControl(fullscreen.value) | ||
} | ||
}) | ||
onBeforeUpdate(() => { | ||
if (props.visibility) { | ||
map.addControl(fullscreen.value) | ||
} | ||
else { | ||
map.removeControl(fullscreen.value) | ||
} | ||
}) | ||
</script> | ||
|
||
<template></template> | ||
|
||
<style> | ||
#map .ol-custom-full-screen { | ||
bottom: 54px; | ||
left: 5px; | ||
} | ||
/* surcharge en mode dsfr */ | ||
.ol-custom-full-screen button { | ||
height: 40px; | ||
width: 40px; | ||
background-color: #000091; | ||
background-image: url("../../../assets/fullscreen.svg"); | ||
background-position: center center; | ||
background-repeat: no-repeat; | ||
} | ||
.ol-custom-full-screen button:hover { | ||
background-color: #1212ff; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,54 @@ | ||
import type { disable } from "ol/rotationconstraint"; | ||
|
||
export const useControls = { | ||
OverviewMap: { | ||
id: 'OverviewMap', | ||
active: true | ||
active: true, | ||
disable: false | ||
}, | ||
SearchEngine: { | ||
id: 'SearchEngine', | ||
active: true | ||
active: true, | ||
disable: false, | ||
}, | ||
ScaleLine: { | ||
id: 'ScaleLine', | ||
active: true | ||
active: true, | ||
disable: false | ||
}, | ||
LayerSwitcher: { | ||
id: 'LayerSwitcher', | ||
active: true | ||
active: true, | ||
disable: false | ||
}, | ||
Isocurve: { | ||
id: 'Isocurve', | ||
active: false | ||
active: false, | ||
disable: true | ||
}, | ||
ReverseGeocode: { | ||
id: 'ReverseGeocode', | ||
active: false | ||
active: false, | ||
disable: false | ||
}, | ||
Zoom: { | ||
id: 'Zoom', | ||
active: true | ||
active: true, | ||
disable: false | ||
}, | ||
Attributions: { | ||
id: 'Attributions', | ||
active: false | ||
active: false, | ||
disable: true | ||
}, | ||
Rotate: { | ||
id: 'Rotate', | ||
active: false | ||
active: false, | ||
disable: true | ||
}, | ||
FullScreen: { | ||
id: 'FullScreen', | ||
active: true, | ||
disable: false | ||
}, | ||
} |