|
|
@ -159,7 +159,7 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.suzhouLayer.addGraphic(polygonEntity);
|
|
|
|
this.suzhouLayer.addGraphic(polygonEntity);
|
|
|
|
|
|
|
|
|
|
|
|
this.addCenterGraphi(polygonEntity.attr);
|
|
|
|
this.addCenterGraphi(polygonEntity.attr, index);
|
|
|
|
//高亮打开
|
|
|
|
//高亮打开
|
|
|
|
polygonEntity.on(mars3d.EventType.highlightOpen, function (e) {
|
|
|
|
polygonEntity.on(mars3d.EventType.highlightOpen, function (e) {
|
|
|
|
_this.currentIndex = e.target.options.attr.index;
|
|
|
|
_this.currentIndex = e.target.options.attr.index;
|
|
|
@ -195,7 +195,15 @@ export default {
|
|
|
|
return res.data;
|
|
|
|
return res.data;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
addCenterGraphi(attr) {
|
|
|
|
addCenterGraphi(attr, index) {
|
|
|
|
|
|
|
|
let obj = {
|
|
|
|
|
|
|
|
相城区: 60,
|
|
|
|
|
|
|
|
姑苏区: 60,
|
|
|
|
|
|
|
|
虎丘区: 60,
|
|
|
|
|
|
|
|
工业园区: 40,
|
|
|
|
|
|
|
|
吴中区: 40,
|
|
|
|
|
|
|
|
吴江区: 40,
|
|
|
|
|
|
|
|
};
|
|
|
|
const circleGraphic = new mars3d.graphic.CircleEntity({
|
|
|
|
const circleGraphic = new mars3d.graphic.CircleEntity({
|
|
|
|
id: `circle${attr.index}`,
|
|
|
|
id: `circle${attr.index}`,
|
|
|
|
position: new mars3d.LngLatPoint(attr.x, attr.y),
|
|
|
|
position: new mars3d.LngLatPoint(attr.x, attr.y),
|
|
|
@ -214,6 +222,7 @@ export default {
|
|
|
|
const divGraphic = new mars3d.graphic.DivGraphic({
|
|
|
|
const divGraphic = new mars3d.graphic.DivGraphic({
|
|
|
|
position: new mars3d.LngLatPoint(attr.x, attr.y),
|
|
|
|
position: new mars3d.LngLatPoint(attr.x, attr.y),
|
|
|
|
id: `areaName${attr.index}`,
|
|
|
|
id: `areaName${attr.index}`,
|
|
|
|
|
|
|
|
zIndex: obj[attr.name],
|
|
|
|
style: {
|
|
|
|
style: {
|
|
|
|
html: `<div class="mars-four-color mars3d-animation" id="areaName${attr.index}">
|
|
|
|
html: `<div class="mars-four-color mars3d-animation" id="areaName${attr.index}">
|
|
|
|
<div class="four-color_name">${attr.name}</div>
|
|
|
|
<div class="four-color_name">${attr.name}</div>
|
|
|
|