Compare commits
No commits in common. "fa6feee1da8a5bef3e1e2e5f4680e60d0885ee1e" and "35008c0355b5d2de744c29d825e0bd95516dd14b" have entirely different histories.
fa6feee1da
...
35008c0355
|
@ -14,8 +14,7 @@
|
||||||
"primeicons": "^6.0.1",
|
"primeicons": "^6.0.1",
|
||||||
"primevue": "^3.26.0",
|
"primevue": "^3.26.0",
|
||||||
"sass": "^1.60.0",
|
"sass": "^1.60.0",
|
||||||
"vue": "^3.2.47",
|
"vue": "^3.2.47"
|
||||||
"vue3-openlayers": "^0.1.75"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^4.1.0",
|
"@vitejs/plugin-vue": "^4.1.0",
|
||||||
|
|
|
@ -4,10 +4,9 @@ import { ref } from "vue";
|
||||||
import InputText from "primevue/inputtext";
|
import InputText from "primevue/inputtext";
|
||||||
import Divider from "primevue/divider";
|
import Divider from "primevue/divider";
|
||||||
import { encodeLocation, decodeLocation } from "geowords";
|
import { encodeLocation, decodeLocation } from "geowords";
|
||||||
import Map from './components/map/map.vue'
|
|
||||||
const currentLoc = ref("");
|
const currentLoc = ref("");
|
||||||
const currentLocWords = ref("");
|
const currentLocWords = ref("");
|
||||||
const decryptedLoc = ref({lat:0,lon:0});
|
const decryptedLoc = ref("");
|
||||||
const decryptedLocWords = ref("");
|
const decryptedLocWords = ref("");
|
||||||
|
|
||||||
function createWords() {
|
function createWords() {
|
||||||
|
@ -60,7 +59,6 @@ function decodeWords() {
|
||||||
<InputText type="text" :onchange="changeWordsHandler" />
|
<InputText type="text" :onchange="changeWordsHandler" />
|
||||||
<Divider />
|
<Divider />
|
||||||
<Button size="large" severity="secondary" :onclick="decodeWords">Get localisation</Button>
|
<Button size="large" severity="secondary" :onclick="decodeWords">Get localisation</Button>
|
||||||
<Map :center="decryptedLoc"></Map>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -73,11 +71,6 @@ function decodeWords() {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.map{
|
|
||||||
width: 400px;
|
|
||||||
height: 400px;
|
|
||||||
}
|
|
||||||
.words {
|
.words {
|
||||||
color: #12c05d;
|
color: #12c05d;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,78 +0,0 @@
|
||||||
<template>
|
|
||||||
<ol-map class="map-view">
|
|
||||||
<ol-view
|
|
||||||
ref="view"
|
|
||||||
:center="[center.lat, center.lon]"
|
|
||||||
:rotation="rotation"
|
|
||||||
:zoom="zoom"
|
|
||||||
:projection="projection"
|
|
||||||
|
|
||||||
@zoomChanged="zoomChanged"
|
|
||||||
@centerChanged="centerChanged"
|
|
||||||
@resolutionChanged="resolutionChanged"
|
|
||||||
@rotationChanged="rotationChanged"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ol-tile-layer>
|
|
||||||
<ol-source-osm />
|
|
||||||
</ol-tile-layer>
|
|
||||||
</ol-map>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
center : {{ center }} zoom : {{ currentZoom }} resolution :
|
|
||||||
{{ currentResolution }} rotation : {{ currentRotation }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { ref } from "vue";
|
|
||||||
export default {
|
|
||||||
setup(props) {
|
|
||||||
console.log('rerender')
|
|
||||||
const center = ref([props.center.lat, props.center.lon]);
|
|
||||||
const projection = ref("EPSG:4326");
|
|
||||||
const zoom = ref(8);
|
|
||||||
const rotation = ref(0);
|
|
||||||
|
|
||||||
return {
|
|
||||||
center,
|
|
||||||
projection,
|
|
||||||
zoom,
|
|
||||||
rotation,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
currentCenter: this.center,
|
|
||||||
currentZoom: this.zoom,
|
|
||||||
currentResolution: this.resolution,
|
|
||||||
currentRotation: this.rotation,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
center:{lat:Number,lon:Number}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
zoomChanged(currentZoom) {
|
|
||||||
this.currentZoom = currentZoom;
|
|
||||||
},
|
|
||||||
resolutionChanged(resolution) {
|
|
||||||
this.currentResolution = resolution;
|
|
||||||
},
|
|
||||||
centerChanged(center) {
|
|
||||||
this.currentCenter = center;
|
|
||||||
},
|
|
||||||
rotationChanged(rotation) {
|
|
||||||
this.currentRotation = rotation;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.map-view{
|
|
||||||
width: 400px;
|
|
||||||
height:400px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import './style.css'
|
import './style.css'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import OpenLayersMap from "vue3-openlayers";
|
|
||||||
import "vue3-openlayers/dist/vue3-openlayers.css";
|
|
||||||
import PrimeVue from 'primevue/config';
|
import PrimeVue from 'primevue/config';
|
||||||
import "primevue/resources/primevue.min.css"; //core CSS
|
import "primevue/resources/primevue.min.css"; //core CSS
|
||||||
import "./theme.css"
|
import "./theme.css"
|
||||||
import "primeicons/primeicons.css"; //icons
|
import "primeicons/primeicons.css"; //icons
|
||||||
createApp(App).use(PrimeVue).use(OpenLayersMap).mount('#app')
|
createApp(App).use(PrimeVue).mount('#app')
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
body{
|
body{
|
||||||
background:url('bg.jpg') repeat;
|
background:url('bg.jpg') repeat;
|
||||||
}
|
}
|
||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
Loading…
Reference in New Issue