fix: map 引入

This commit is contained in:
thinkinggis 2020-09-02 20:12:32 +08:00
parent 96a4fe0b25
commit bf94664049
2 changed files with 8 additions and 6 deletions

View File

@ -271,7 +271,11 @@ export default class Scene extends EventEmitter implements ISceneService {
// @ts-ignore
const mapContainer = this.$container.parentElement as HTMLElement;
if (mapContainer !== null) {
this.markerContainer = DOM.create('div', 'l7-marker-container', mapContainer);
this.markerContainer = DOM.create(
'div',
'l7-marker-container',
mapContainer,
);
}
}
@ -279,7 +283,6 @@ export default class Scene extends EventEmitter implements ISceneService {
return this.markerContainer;
}
public destroy() {
if (!this.inited) {
this.destroyed = true;
@ -352,5 +355,4 @@ export default class Scene extends EventEmitter implements ISceneService {
private addSceneEvent(target: IInteractionTarget) {
this.emit(target.type, target);
}
}

View File

@ -1,8 +1,8 @@
import { Map } from '@antv/l7-maps';
import { Map } from '@antv/l7-map';
import BaseMapWrapper from '../BaseMapWrapper';
import MapboxService from './map';
import MapService from './map';
export default class MapboxWrapper extends BaseMapWrapper<Map> {
protected getServiceConstructor() {
return MapboxService;
return MapService;
}
}