This commit is contained in:
2912401452 2021-10-19 20:37:09 +08:00
commit d384e0347e
1 changed files with 11 additions and 9 deletions

View File

@ -151,15 +151,17 @@ export default class AMapService
}
const mapContainer = this.map.getContainer();
if (mapContainer !== null) {
// const amap = mapContainer.getElementsByClassName(
// 'amap-maps',
// )[0] as HTMLElement;
// this.markerContainer = DOM.create('div', 'l7-marker-container2', amap);
this.markerContainer = DOM.create(
'div',
'l7-marker-container2',
mapContainer,
);
const amap = mapContainer.getElementsByClassName(
'amap-maps',
)[0] as HTMLElement;
// TODO: amap2 的 amap-maps 新增 z-index=0; 样式,让 marker 中 zIndex 失效
amap.style.zIndex = '2';
this.markerContainer = DOM.create('div', 'l7-marker-container2', amap);
// this.markerContainer = DOM.create(
// 'div',
// 'l7-marker-container2',
// mapContainer,
// );
// this.markerContainer = mapContainer;
}
}