地图
This commit is contained in:
@@ -55,8 +55,6 @@ export default {
|
||||
mapLib: null,
|
||||
type: '',
|
||||
typeList: [],
|
||||
fireIcon: require('./img/fire-icon.png'),
|
||||
fireIconActive: require('./img/fire-icon-active.png'),
|
||||
isShowInfo: false,
|
||||
resourceList: [],
|
||||
chooseResourceId: '',
|
||||
@@ -119,7 +117,7 @@ export default {
|
||||
renderMarker(context) {
|
||||
const resourceId = context.data[0].id
|
||||
|
||||
let el = `<img src="${resourceId === this.chooseResourceId ? this.fireIconActive : this.fireIcon}" style="${resourceId === this.chooseResourceId ? 'width:50px;height:50px;' : 'width:38px;height:38px;'}" id="resourceId-${resourceId}" class="mark-icon" />`
|
||||
let el = `<img src="${context.data[0].icon}" style="${resourceId === this.chooseResourceId ? 'width:50px;height:50px;' : 'width:38px;height:38px;'}" id="resourceId-${resourceId}" class="mark-icon" />`
|
||||
|
||||
context.marker.setContent(el);
|
||||
context.marker.setAnchor("center")
|
||||
@@ -133,11 +131,9 @@ export default {
|
||||
document.querySelectorAll('.mark-icon').forEach(el => {
|
||||
el.style['width'] = '38px'
|
||||
el.style['height'] = '38px'
|
||||
el.src = this.fireIcon
|
||||
})
|
||||
document.querySelector(`#resourceId-${e.target.id}`).style['width'] = '50px'
|
||||
document.querySelector(`#resourceId-${e.target.id}`).style['height'] = '50px'
|
||||
document.querySelector(`#resourceId-${e.target.id}`).src = this.fireIconActive
|
||||
})
|
||||
},
|
||||
|
||||
@@ -198,7 +194,7 @@ export default {
|
||||
params: {
|
||||
current: 1,
|
||||
size: 1000000,
|
||||
// areaId: this.areaId,
|
||||
areaId: this.areaId,
|
||||
categoryId: this.type
|
||||
}
|
||||
}).then(res => {
|
||||
@@ -210,6 +206,7 @@ export default {
|
||||
id: item.id,
|
||||
corpId: item.corpId,
|
||||
areaName: item.areaName,
|
||||
icon: item.categoryIcon
|
||||
}
|
||||
})
|
||||
this.addMakert(points)
|
||||
|
||||
Reference in New Issue
Block a user