This commit is contained in:
yanran200730
2022-10-11 09:22:33 +08:00
parent 0284997d6a
commit 08c8fe0366
3 changed files with 21 additions and 27 deletions

View File

@@ -247,11 +247,6 @@ export default {
})
},
changeZoom(isAdd) {
const zoom = isAdd ? this.map.getZoom() + 1 : this.map.getZoom() - 1
this.map.setZoom(zoom, false, 600)
},
formatName (str) {
if (!str) return ''

View File

@@ -83,11 +83,6 @@ export default {
})
},
changeZoom(isAdd) {
const zoom = isAdd ? this.map.getZoom() + 1 : this.map.getZoom() - 1
this.map.setZoom(zoom, false, 600)
},
getInfo (id) {
this.instance.post(`/app/appresourceinfo/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
@@ -97,10 +92,6 @@ export default {
})
},
toCenter() {
this.map.setZoomAndCenter(this.zoom, this.center, false, 600)
},
renderClusterMarker(context) {
let el = `<div class="polymeric">
<div class="polymeric-container">
@@ -119,10 +110,9 @@ export default {
},
renderMarker(context) {
console.log(context)
const buildId = context.data[0].id
let el = `<div class="mark" id="buildId-${buildId}">
let el = `<div id="buildId-${buildId}" class="mark ${buildId === this.choosedId ? 'mark-active' : ''}">
<img src="${context.data[0].categoryIcon || 'https://cdn.cunwuyun.cn/dvcp/ply/icon.png'}">
</div>`
@@ -139,8 +129,7 @@ export default {
document.querySelectorAll('.mark').forEach(el => {
el.classList.remove('mark-active')
})
document.querySelector(`#buildId-${e.target.id}`).add('mark-active')
this.map.setZoomAndCenter(this.map.getZoom() + 0.000000001, e.target.lnglat, false, 300)
document.querySelector(`#buildId-${e.target.id}`).classList.add('mark-active')
})
},
@@ -469,6 +458,7 @@ export default {
}
::v-deep .mark{
position: relative;
user-select: none;
width: 50px;
height: 50px;
@@ -484,6 +474,10 @@ export default {
&:hover {
opacity: 0.8;
}
&.mark-active {
transform: scale(1.2);
}
}
@-webkit-keyframes warn {