点图层图标展示/图层树样式
This commit is contained in:
parent
6b54e40f84
commit
22db8d373d
@ -96,7 +96,7 @@ body {
|
||||
/* LayerData */
|
||||
.layer-data-wrap {
|
||||
position: fixed;
|
||||
top: 130px;
|
||||
top: 190px;
|
||||
width: 220px;
|
||||
z-index: 999;
|
||||
margin: 2% 4.2%;
|
||||
@ -259,4 +259,24 @@ body {
|
||||
font-weight: 400;
|
||||
color: #3D3D3D;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.popup-btn-wrap {
|
||||
float: right;
|
||||
}
|
||||
.popup-btn-wrap span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.popup-edit {
|
||||
color: #2F66F2;
|
||||
cursor: pointer;
|
||||
}
|
||||
.popup-edit:hover {
|
||||
color: #6991f6;
|
||||
}
|
||||
.popup-del {
|
||||
color: #FA5151;
|
||||
cursor: pointer;
|
||||
}
|
||||
.popup-del:hover {
|
||||
color: #f57272;
|
||||
}
|
@ -149,18 +149,24 @@ class BaseMap extends React.Component{
|
||||
}
|
||||
}
|
||||
}
|
||||
// 点击点显示详细信息
|
||||
markerEdit = (e) => {
|
||||
console.log(111);
|
||||
}
|
||||
|
||||
// 在地图上设置点位 【经度,纬度】
|
||||
setMarkers = (data, layerId) => {
|
||||
let self = this;
|
||||
let map = this.state.map;
|
||||
let LabelsData = data || [];
|
||||
let markerLayer = new MarkerLayer({name: layerId});
|
||||
let el, popup, marker;
|
||||
let el, popup, marker, icon;debugger
|
||||
for (let i = 0; i < LabelsData.length; i++) {
|
||||
icon = LabelsData[0].logoImage;
|
||||
el = document.createElement('label');
|
||||
el.style.width = '22px';
|
||||
el.style.height = '22px';
|
||||
el.style.background = 'url("' + icon3 + '") no-repeat';
|
||||
el.style.background = 'url("' + icon + '") no-repeat';
|
||||
el.style.backgroundSize = 'contain';
|
||||
popup = new Popup({
|
||||
offsets: [0, 30]
|
||||
@ -169,6 +175,7 @@ class BaseMap extends React.Component{
|
||||
<div class="popup-name">名称:${LabelsData[i].pointName}</div>
|
||||
<div class="popup-address">地址:${LabelsData[i].address || ''}</div>
|
||||
<div class="popup-memo">备注:${LabelsData[i].memo || ''}</div>
|
||||
<div class="popup-btn-wrap"><span class="popup-edit">编辑</span><span class="popup-del">删除</span></div>
|
||||
</div>`);
|
||||
marker = new Marker({
|
||||
element: el
|
||||
@ -183,12 +190,6 @@ class BaseMap extends React.Component{
|
||||
this.state.map.addMarkerLayer(markerLayer);
|
||||
}
|
||||
|
||||
// 点击点显示详细信息
|
||||
markerClick = (e) => {
|
||||
infoWindow.setContent(e.target.content);
|
||||
infoWindow.open(this.state.map, e.target.getPosition());
|
||||
}
|
||||
|
||||
// 在地图上设置热力图 【经度,纬度】
|
||||
setHeatMap = (data, layerId) => {
|
||||
let self = this;
|
||||
|
Loading…
Reference in New Issue
Block a user