Compare commits

..

4 Commits

Author SHA1 Message Date
zhaoyu 4768e5ce32 Merge remote-tracking branch 'origin/dev' 2023-12-27 20:16:18 +08:00
zhaoyu 9377031997 初始化两次地图bug修复 2023-12-27 20:15:23 +08:00
liujun f74ed73a67 bug修复 2023-12-26 17:33:35 +08:00
guoyuepeng 2d0961f40e Merge pull request 'zy20231108' (#1) from zy20231108 into dev
Reviewed-on: #1
2023-12-14 22:40:19 +08:00
2 changed files with 78 additions and 1 deletions

View File

@ -29,7 +29,6 @@
}
function onLoad() {
map = new T.Map('mapDiv');
var imageURL = "http://t0.tianditu.gov.cn/img_w/wmts?" +
"SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
"&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce";

78
pages/map/mapPro.vue Normal file
View File

@ -0,0 +1,78 @@
<template>
<view>
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">位置定位</block>
</cu-custom>
<web-view id="webview" :src="url" @message="messageChange"></web-view>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
url: '',
longitude: '',
latitude: ''
}
},
onLoad(option) {
this.longitude = 119.67751
this.latitude = 39.92596
this.init();
const eventChannel = this.$scope.eventChannel; // APP-NVUE
// acceptDataFromOpenerPageeventChannel
eventChannel.on('acceptDataFromOpenerPage', function (data) {
console.log(data)
})
},
onBackPress(options) {
return false;
},
onUnload() {
},
onShow() {
},
methods: {
goBack() {
uni.navigateBack()
},
saveData() {
},
init() {
this.url = ('/hybrid/html/newMap.html?longitude='+this.longitude+'&latitude='+this.latitude+ 't=' + new Date().getTime());
console.log(this.url);
},
messageChange(e) {
console.log("messageChange");
console.log(e);
uni.setStorageSync("info", e.detail.data[0]);
const eventChannel = this.$scope.eventChannel; // APP-NVUE
console.log(eventChannel)
eventChannel.emit('acceptDataFromOpenedPage', {data: e.detail.data[0]});
uni.navigateBack();
}
}
}
</script>
<style scoped>
page,
uni-page-body,
.container {
background: rgba(245, 245, 245, 1);
min-height: calc(100%);
}
</style>