mirror of https://gitee.com/antv-l7/antv-l7
feat: test open layer initLayer update
This commit is contained in:
parent
e99ea7d8b3
commit
e2a78cbc96
|
@ -135,7 +135,7 @@ export default class Layers extends Control {
|
|||
this.addLayer(baseLayers[name], name, false);
|
||||
});
|
||||
Object.keys(overlayers).forEach((name: any, index: number) => {
|
||||
// overlayers[name].once('inited', this.update);
|
||||
overlayers[name].once('inited', this.update);
|
||||
this.addLayer(overlayers[name], name, true);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import { decodePickingColor, DOM, encodePickingColor } from '@antv/l7-utils';
|
|||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../types';
|
||||
import { isEventCrash } from '../../utils/dom';
|
||||
import { IGlobalConfigService, ISceneConfig } from '../config/IConfigService';
|
||||
import {
|
||||
IInteractionService,
|
||||
|
@ -14,7 +15,6 @@ import { gl } from '../renderer/gl';
|
|||
import { IFramebuffer } from '../renderer/IFramebuffer';
|
||||
import { IRendererService } from '../renderer/IRendererService';
|
||||
import { IPickingService } from './IPickingService';
|
||||
import { isEventCrash } from '../../utils/dom'
|
||||
|
||||
@injectable()
|
||||
export default class PickingService implements IPickingService {
|
||||
|
|
|
@ -43,4 +43,4 @@ export function isEventCrash(obj: any) {
|
|||
}
|
||||
});
|
||||
return notCrash;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,8 +120,8 @@ export default class ScaleComponent extends React.Component {
|
|||
});
|
||||
scene.addLayer(pointLayer3);
|
||||
|
||||
layerControl.addVisualLayer(pointLayer3, 'pointLayer3')
|
||||
}, 2000)
|
||||
layerControl.addVisualLayer(pointLayer3, 'pointLayer3');
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
public render() {
|
||||
|
|
|
@ -254,7 +254,7 @@ export default class Country extends React.Component {
|
|||
}}
|
||||
// onChange={this.handleProvinceChange}
|
||||
onChange={() => {
|
||||
console.log('change')
|
||||
console.log('change');
|
||||
}}
|
||||
>
|
||||
{ProvinceData.map((province, i) => {
|
||||
|
@ -283,7 +283,7 @@ export default class Country extends React.Component {
|
|||
this.setState({
|
||||
province: value,
|
||||
});
|
||||
console.log('value', value)
|
||||
console.log('value', value);
|
||||
this.provinceLayer.updateDistrict([value]);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue