|
@@ -197,6 +197,7 @@ export default {
|
|
|
let fengjiblue = 'http://' + _self.href.split("//")[1].split("/")[0] + '/img/fengji/fengjiblue.png'
|
|
|
let fengjigreen = 'http://' + _self.href.split("//")[1].split("/")[0] + '/img/fengji/fengjigreen.png'
|
|
|
let fengjiyellow = 'http://' + _self.href.split("//")[1].split("/")[0] + '/img/fengji/fengjiyellow.png'
|
|
|
+ let fengjired = 'http://' + _self.href.split("//")[1].split("/")[0] + '/img/fengji/fengjired.png'
|
|
|
let gfbconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/guangfuban.png'
|
|
|
let gfsconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/guang.png'
|
|
|
let gfhfconurl = 'http://' + _self.href.split("//")[1].split("/")[0] + '/largeScreenImg/huafuguangfu.png'
|
|
@@ -386,22 +387,26 @@ export default {
|
|
|
iconAnchor: [35, 55],
|
|
|
className: 'stationIcon',
|
|
|
})
|
|
|
+ let redFengji = window.BM.icon({
|
|
|
+ iconUrl: fengjired,
|
|
|
+ iconSize: [30, 30],
|
|
|
+ iconAnchor: [30, 30],
|
|
|
+ className: 'stationIcon',
|
|
|
+ })
|
|
|
+ let bluefengji = window.BM.icon({
|
|
|
+ iconUrl: fengjiblue,
|
|
|
+ iconSize: [30, 30],
|
|
|
+ iconAnchor: [30, 30],
|
|
|
+ className: 'stationIcon',
|
|
|
+ })
|
|
|
+ let defaultFengji = window.BM.icon({
|
|
|
+ iconUrl: fjIconurl,
|
|
|
+ iconSize: [30, 30],
|
|
|
+ iconAnchor: [30, 30],
|
|
|
+ className: 'stationIcon',
|
|
|
+ })
|
|
|
let fj_icon = [{
|
|
|
icon: window.BM.icon({
|
|
|
- iconUrl: fjIconurl,
|
|
|
- iconSize: [30, 30],
|
|
|
- iconAnchor: [30, 30],
|
|
|
- className: 'stationIcon',
|
|
|
- })
|
|
|
- }, {
|
|
|
- icon: window.BM.icon({
|
|
|
- iconUrl: fengjiblue,
|
|
|
- iconSize: [30, 30],
|
|
|
- iconAnchor: [30, 30],
|
|
|
- className: 'stationIcon',
|
|
|
- })
|
|
|
- }, {
|
|
|
- icon: window.BM.icon({
|
|
|
iconUrl: fengjigreen,
|
|
|
iconSize: [30, 30],
|
|
|
iconAnchor: [30, 30],
|
|
@@ -457,29 +462,40 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
let i = 0
|
|
|
for (let fan of data.fan) {
|
|
|
- if (i > 3) i = 0
|
|
|
+ if (i > 1) i = 0
|
|
|
+
|
|
|
for (let item of fan.data) {
|
|
|
let coordinate = [Number(item.latitudeFan), Number(item.longitudeFan)]
|
|
|
let marker = ''
|
|
|
- if (fan.name === '依兰珠山风电场') {
|
|
|
+ if(fan.type === 'project'){
|
|
|
marker = window.BM.marker(coordinate, {
|
|
|
- icon: fj_icon[3].icon,
|
|
|
- riseOnHover: true
|
|
|
- }).addTo(this.bMap);
|
|
|
- } else if (fan.name === '依兰鸡冠山四期200MW风电项目') {
|
|
|
- marker = window.BM.marker(coordinate, {
|
|
|
- icon: fj_icon[2].icon,
|
|
|
- riseOnHover: true
|
|
|
- }).addTo(this.bMap);
|
|
|
- } else {
|
|
|
- marker = window.BM.marker(coordinate, {
|
|
|
- icon: fj_icon[i].icon,
|
|
|
+ icon: redFengji,
|
|
|
riseOnHover: true
|
|
|
}).addTo(this.bMap);
|
|
|
+ }else {
|
|
|
+ if (item.type !== null) {
|
|
|
+ if (item.type === '新') {
|
|
|
+ marker = window.BM.marker(coordinate, {
|
|
|
+ icon: defaultFengji,
|
|
|
+ riseOnHover: true
|
|
|
+ }).addTo(this.bMap);
|
|
|
+ } else {
|
|
|
+ marker = window.BM.marker(coordinate, {
|
|
|
+ icon: bluefengji,
|
|
|
+ riseOnHover: true
|
|
|
+ }).addTo(this.bMap);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // console.log(i)
|
|
|
+ marker = window.BM.marker(coordinate, {
|
|
|
+ icon: fj_icon[i].icon,
|
|
|
+ riseOnHover: true
|
|
|
+ }).addTo(this.bMap);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
marker.on('mouseover', function (e) {
|
|
|
// console.log(item)
|
|
|
if (fan.type === 'project') {
|