diff --git a/miniprogram/pages/defineMap/defineMap.js b/miniprogram/pages/defineMap/defineMap.js index 0156252..dcc4f05 100644 --- a/miniprogram/pages/defineMap/defineMap.js +++ b/miniprogram/pages/defineMap/defineMap.js @@ -123,9 +123,10 @@ id: index, longitude: manhole.coordinateX, latitude: manhole.coordinateY, - // iconPath: that.getMarkerIcon(manhole.isInStall), + iconPath: that.getMarkerIcon(manhole.isInStall), width: 30, height: 30, + zIndex: 0, callout: { content: that.getCalloutContent(manhole), color: '#fff', @@ -161,7 +162,8 @@ }, getCalloutContent(manhole) { - return `闸井编号: ${manhole.wellCode}\n闸井类型: ${manhole.wellType}\n闸井状态: ${this.getStatusText(manhole.isInStall)}\n位置: ${manhole.coordinateX},${manhole.coordinateY}\n详细地址: ${manhole.position}`; + // return `闸井编号: ${manhole.wellCode}\n闸井类型: ${manhole.wellType}\n闸井状态: ${this.getStatusText(manhole.isInStall)}\n位置: ${manhole.coordinateX},${manhole.coordinateY}\n详细地址: ${manhole.position}`; + return `闸井编号: ${manhole.wellCode}\n闸井类型: ${manhole.wellType}\n闸井状态: ${this.getStatusText(manhole.isInStall)}\n详细地址: ${manhole.position}`; }, getStatusText(status) { @@ -183,10 +185,10 @@ console.log('点击marker', e); const markerId = e.markerId; console.log('Marker tapped:', markerId); - // 先隐藏所有气泡 + // 先隐藏所有气泡 const markers = this.data.markers.map(marker => { marker.callout.display = 'BYCLICK'; - marker.zIndex = 0 + // marker.zIndex = 0 return marker; }); diff --git a/miniprogram/pages/defineMap/defineMap.js b/miniprogram/pages/defineMap/defineMap.js index 0156252..dcc4f05 100644 --- a/miniprogram/pages/defineMap/defineMap.js +++ b/miniprogram/pages/defineMap/defineMap.js @@ -123,9 +123,10 @@ id: index, longitude: manhole.coordinateX, latitude: manhole.coordinateY, - // iconPath: that.getMarkerIcon(manhole.isInStall), + iconPath: that.getMarkerIcon(manhole.isInStall), width: 30, height: 30, + zIndex: 0, callout: { content: that.getCalloutContent(manhole), color: '#fff', @@ -161,7 +162,8 @@ }, getCalloutContent(manhole) { - return `闸井编号: ${manhole.wellCode}\n闸井类型: ${manhole.wellType}\n闸井状态: ${this.getStatusText(manhole.isInStall)}\n位置: ${manhole.coordinateX},${manhole.coordinateY}\n详细地址: ${manhole.position}`; + // return `闸井编号: ${manhole.wellCode}\n闸井类型: ${manhole.wellType}\n闸井状态: ${this.getStatusText(manhole.isInStall)}\n位置: ${manhole.coordinateX},${manhole.coordinateY}\n详细地址: ${manhole.position}`; + return `闸井编号: ${manhole.wellCode}\n闸井类型: ${manhole.wellType}\n闸井状态: ${this.getStatusText(manhole.isInStall)}\n详细地址: ${manhole.position}`; }, getStatusText(status) { @@ -183,10 +185,10 @@ console.log('点击marker', e); const markerId = e.markerId; console.log('Marker tapped:', markerId); - // 先隐藏所有气泡 + // 先隐藏所有气泡 const markers = this.data.markers.map(marker => { marker.callout.display = 'BYCLICK'; - marker.zIndex = 0 + // marker.zIndex = 0 return marker; }); diff --git a/project.private.config.json b/project.private.config.json index bc95516..1100856 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -8,6 +8,13 @@ "miniprogram": { "list": [ { + "name": "pages/defineMap/defineMap", + "pathName": "pages/defineMap/defineMap", + "query": "", + "launchMode": "default", + "scene": null + }, + { "name": "pages/indexapp/indexapp", "pathName": "pages/databaseGuide/databaseGuide", "query": "",