diff --git a/pages.json b/pages.json index 5ff863b..29887a8 100644 --- a/pages.json +++ b/pages.json @@ -293,6 +293,12 @@ "style": { "navigationBarTitleText": "选择日期" } + }, + { + "path": "h5Web/h5Web", + "style": { + "navigationBarTitleText": "" + } } ] }], diff --git a/pages/map/map.vue b/pages/map/map.vue index b3eb304..2ff6841 100644 --- a/pages/map/map.vue +++ b/pages/map/map.vue @@ -1,6 +1,6 @@ @@ -8,57 +8,14 @@ export default { data() { return { - latitude: 33.338538, - longitude: 120.153567, + } }, onReady() { - this._mapContext = uni.createMapContext("map", this); - - // 仅调用初始化,才会触发 on.("markerClusterCreate", (e) => {}) - this._mapContext.initMarkerCluster({ - enableDefaultStyle: false, - zoomOnClick: true, - gridSize: 60, - complete(res) { - console.log('initMarkerCluster', res) - } - }); - - this._mapContext.on("markerClusterCreate", (e) => { - console.log("markerClusterCreate", e); - }); - - this.addMarkers(); + }, methods: { - addMarkers() { - console.log(111,this._mapContext) - this._mapContext.addGroundOverlay({ - id: 1, - src: 'https://static.ticket.sz-trip.com/yandu/images/maps/6/53/25.png', - bounds: { - southwest: {//左下角GPS - longitude: 119.700158, - latitude: 33.112837 - }, - northeast: {//右上角GPS - longitude: 120.25057, - latitude: 33.458095 - } - }, - zIndex: 1, // 图层绘制顺序 - success: () => { - console.log("显示成功", southwest, northeast) - }, - fail: (e) => { - console.log("显示失败", e) - }, - complete: res => { - console.log(res) - } - }) - } + } } @@ -68,9 +25,4 @@ width: 100vw; height: 100vh; } - - .map { - width: 100vw; - height: 100vh; - } \ No newline at end of file diff --git a/subPackages/h5Web/h5Web.vue b/subPackages/h5Web/h5Web.vue new file mode 100644 index 0000000..ea73887 --- /dev/null +++ b/subPackages/h5Web/h5Web.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file