- Adding map page (where is the location) #100
- fix menu appear Admin and Manager
This commit is contained in:
4
src/components/COpenStreetMap/COpenStreetMap.scss
Normal file
4
src/components/COpenStreetMap/COpenStreetMap.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
#map {
|
||||
height: 400px;
|
||||
width: 90%;
|
||||
}
|
||||
24
src/components/COpenStreetMap/COpenStreetMap.ts
Normal file
24
src/components/COpenStreetMap/COpenStreetMap.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
|
||||
@Component({
|
||||
name: 'COpenStreetMap'
|
||||
})
|
||||
|
||||
export default class COpenStreetMap extends Vue {
|
||||
@Prop({required: true}) public title: string
|
||||
@Prop({required: true}) public coordinates: string
|
||||
@Prop({required: true}) public coord_big: string
|
||||
|
||||
get mywidth() {
|
||||
return tools.getwidth(this) - 20
|
||||
}
|
||||
|
||||
get myheight() {
|
||||
return 450
|
||||
}
|
||||
|
||||
}
|
||||
19
src/components/COpenStreetMap/COpenStreetMap.vue
Normal file
19
src/components/COpenStreetMap/COpenStreetMap.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div class="flex flex-center column justify-center">
|
||||
<div class="">
|
||||
<span class="text-subtitle2">{{title}}</span> - (<a :href="`https://www.openstreetmap.org/?` + coord_big + `&layers=N`" target="_blank">{{$t('showbigmap')}}</a>)
|
||||
</div>
|
||||
<div>
|
||||
<iframe :width="mywidth" :height="myheight" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
|
||||
:src="`https://www.openstreetmap.org/export/embed.html?bbox=` + coordinates"
|
||||
style="border: 1px solid black"></iframe>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./COpenStreetMap.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './COpenStreetMap.scss';
|
||||
</style>
|
||||
1
src/components/COpenStreetMap/index.ts
Normal file
1
src/components/COpenStreetMap/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as COpenStreetMap} from './COpenStreetMap.vue'
|
||||
Reference in New Issue
Block a user