-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15609a8
commit 903909e
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
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,40 @@ | ||
<template> | ||
|
||
<div class=""> | ||
|
||
<v-btn icon @click="onClick"> | ||
<v-icon medium>{{icon}}</v-icon> | ||
{{text}} | ||
</v-btn> | ||
|
||
</div> | ||
|
||
</template> | ||
|
||
<script> | ||
import { Mapable } from '../../mixins/Mapable'; | ||
export default { | ||
name: 'wgu-zoomtomaxextent-button', | ||
mixins: [Mapable], | ||
props: { | ||
icon: {type: String, required: false}, | ||
text: {type: String, required: false} | ||
}, | ||
methods: { | ||
onClick () { | ||
// derive correct initial zoom and center | ||
const initialCenter = this.$appConfig.mapCenter; | ||
const initalZoom = this.$appConfig.mapZoom | ||
this.map.getView().setCenter(initialCenter); | ||
this.map.getView().setZoom(initalZoom); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<!-- Add "scoped" attribute to limit CSS to this component only --> | ||
<style> | ||
</style> |