You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.1 KiB

<template>
<map
id="map"
:longitude="map.longitude"
:latitude="map.latitude"
:markers="mapConfig"
scale="15"
show-location
style="width: 100%; height: 100%;"
></map>
</template>
<script>
export default {
name: "Index",
components: {},
props: {},
data: function() {
return {
mapConfig: {
latitude: "",
longitude: "",
name: "",
address: ""
},
map: {
latitude: "",
longitude: ""
}
};
},
onShow: function() {
this.map = {
latitude: this.$yroute.query.latitude,
longitude: this.$yroute.query.longitude
};
this.mapConfig = [{
id: 1,
width: 50,
height: 50,
iconPath: this.$yroute.query.image,
latitude: this.$yroute.query.latitude,
longitude: this.$yroute.query.longitude,
title: this.$yroute.query.name,
name: this.$yroute.query.name,
address: this.$yroute.query.detailedAddress
}];
console.log(this.mapConfig);
},
methods: {}
};
</script>
<style lang="less">
page {
width: 100%;
height: 100%;
}
</style>