Showing
1 changed file
with
2 additions
and
1 deletions
@@ -305,6 +305,7 @@ | @@ -305,6 +305,7 @@ | ||
305 | const markerList: MarkerList[] = []; | 305 | const markerList: MarkerList[] = []; |
306 | data.forEach((item) => { | 306 | data.forEach((item) => { |
307 | const { | 307 | const { |
308 | + alias, | ||
308 | name, | 309 | name, |
309 | deviceState, | 310 | deviceState, |
310 | deviceInfo: { longitude, latitude }, | 311 | deviceInfo: { longitude, latitude }, |
@@ -313,7 +314,7 @@ | @@ -313,7 +314,7 @@ | ||
313 | const rivet = deviceState === 'INACTIVE' ? djx : deviceState === 'ONLINE' ? zx : lx; | 314 | const rivet = deviceState === 'INACTIVE' ? djx : deviceState === 'ONLINE' ? zx : lx; |
314 | const myIcon = new BMap.Icon(rivet, new BMap.Size(20, 30)); | 315 | const myIcon = new BMap.Icon(rivet, new BMap.Size(20, 30)); |
315 | const marker = new BMap.Marker(point, { icon: myIcon }); | 316 | const marker = new BMap.Marker(point, { icon: myIcon }); |
316 | - const label = new BMap.Label(name, { | 317 | + const label = new BMap.Label(alias || name, { |
317 | position: point, | 318 | position: point, |
318 | offset: new BMap.Size(-15, -45), | 319 | offset: new BMap.Size(-15, -45), |
319 | }); | 320 | }); |