2019-11-25 15:27:56 +08:00
|
|
|
import { container, ILayerPlugin, TYPES } from '@antv/l7-core';
|
2019-10-08 19:20:12 +08:00
|
|
|
import BaseLayer from './core/BaseLayer';
|
2019-11-25 15:27:56 +08:00
|
|
|
import './glsl.d';
|
2019-11-19 19:03:17 +08:00
|
|
|
import HeatmapLayer from './heatmap';
|
2019-11-10 21:20:26 +08:00
|
|
|
import DashLineLayer from './line/dash';
|
2019-10-30 16:38:59 +08:00
|
|
|
import LineLayer from './line/index';
|
2019-11-19 10:21:43 +08:00
|
|
|
import PointLayer from './point';
|
2019-10-08 19:20:12 +08:00
|
|
|
import PolygonLayer from './polygon';
|
2019-10-30 11:52:36 +08:00
|
|
|
import ImageLayer from './raster/image';
|
2019-11-01 15:36:20 +08:00
|
|
|
import RasterLayer from './raster/raster';
|
2019-10-29 14:42:41 +08:00
|
|
|
|
|
|
|
import ConfigSchemaValidationPlugin from './plugins/ConfigSchemaValidationPlugin';
|
|
|
|
import DataMappingPlugin from './plugins/DataMappingPlugin';
|
|
|
|
import DataSourcePlugin from './plugins/DataSourcePlugin';
|
|
|
|
import FeatureScalePlugin from './plugins/FeatureScalePlugin';
|
2019-11-01 17:15:20 +08:00
|
|
|
import LightingPlugin from './plugins/LightingPlugin';
|
2019-10-29 14:42:41 +08:00
|
|
|
import MultiPassRendererPlugin from './plugins/MultiPassRendererPlugin';
|
|
|
|
import PixelPickingPlugin from './plugins/PixelPickingPlugin';
|
|
|
|
import RegisterStyleAttributePlugin from './plugins/RegisterStyleAttributePlugin';
|
|
|
|
import ShaderUniformPlugin from './plugins/ShaderUniformPlugin';
|
|
|
|
import UpdateStyleAttributePlugin from './plugins/UpdateStyleAttributePlugin';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 校验传入参数配置项的正确性
|
|
|
|
* @see /dev-docs/ConfigSchemaValidation.md
|
|
|
|
*/
|
|
|
|
container
|
|
|
|
.bind<ILayerPlugin>(TYPES.ILayerPlugin)
|
2019-11-25 15:27:56 +08:00
|
|
|
.to(ConfigSchemaValidationPlugin)
|
|
|
|
.inRequestScope();
|
2019-10-29 14:42:41 +08:00
|
|
|
/**
|
|
|
|
* 获取 Source
|
|
|
|
*/
|
2019-11-25 15:27:56 +08:00
|
|
|
container
|
|
|
|
.bind<ILayerPlugin>(TYPES.ILayerPlugin)
|
|
|
|
.to(DataSourcePlugin)
|
|
|
|
.inRequestScope();
|
2019-10-29 14:42:41 +08:00
|
|
|
/**
|
|
|
|
* 根据 StyleAttribute 创建 VertexAttribute
|
|
|
|
*/
|
|
|
|
container
|
|
|
|
.bind<ILayerPlugin>(TYPES.ILayerPlugin)
|
2019-11-25 15:27:56 +08:00
|
|
|
.to(RegisterStyleAttributePlugin)
|
|
|
|
.inRequestScope();
|
2019-10-29 14:42:41 +08:00
|
|
|
/**
|
|
|
|
* 根据 Source 创建 Scale
|
|
|
|
*/
|
2019-11-25 15:27:56 +08:00
|
|
|
container
|
|
|
|
.bind<ILayerPlugin>(TYPES.ILayerPlugin)
|
|
|
|
.to(FeatureScalePlugin)
|
|
|
|
.inRequestScope();
|
2019-10-29 14:42:41 +08:00
|
|
|
/**
|
|
|
|
* 使用 Scale 进行数据映射
|
|
|
|
*/
|
2019-11-25 15:27:56 +08:00
|
|
|
container
|
|
|
|
.bind<ILayerPlugin>(TYPES.ILayerPlugin)
|
|
|
|
.to(DataMappingPlugin)
|
|
|
|
.inRequestScope();
|
2019-10-29 14:42:41 +08:00
|
|
|
/**
|
|
|
|
* 负责属性更新
|
|
|
|
*/
|
2019-11-25 15:27:56 +08:00
|
|
|
container
|
|
|
|
.bind<ILayerPlugin>(TYPES.ILayerPlugin)
|
|
|
|
.to(UpdateStyleAttributePlugin)
|
|
|
|
.inRequestScope();
|
2019-10-29 14:42:41 +08:00
|
|
|
/**
|
|
|
|
* Multi Pass 自定义渲染管线
|
|
|
|
*/
|
2019-11-25 15:27:56 +08:00
|
|
|
container
|
|
|
|
.bind<ILayerPlugin>(TYPES.ILayerPlugin)
|
|
|
|
.to(MultiPassRendererPlugin)
|
|
|
|
.inRequestScope();
|
2019-10-29 14:42:41 +08:00
|
|
|
/**
|
|
|
|
* 传入相机坐标系参数
|
|
|
|
*/
|
2019-11-25 15:27:56 +08:00
|
|
|
container
|
|
|
|
.bind<ILayerPlugin>(TYPES.ILayerPlugin)
|
|
|
|
.to(ShaderUniformPlugin)
|
|
|
|
.inRequestScope();
|
2019-11-01 17:15:20 +08:00
|
|
|
/**
|
|
|
|
* 传入光照相关参数
|
|
|
|
*/
|
2019-11-25 15:27:56 +08:00
|
|
|
container
|
|
|
|
.bind<ILayerPlugin>(TYPES.ILayerPlugin)
|
|
|
|
.to(LightingPlugin)
|
|
|
|
.inRequestScope();
|
2019-10-29 14:42:41 +08:00
|
|
|
/**
|
|
|
|
* 负责拾取过程中 Encode 以及 Highlight 阶段及结束后恢复
|
|
|
|
*/
|
2019-11-25 15:27:56 +08:00
|
|
|
container
|
|
|
|
.bind<ILayerPlugin>(TYPES.ILayerPlugin)
|
|
|
|
.to(PixelPickingPlugin)
|
|
|
|
.inRequestScope();
|
2019-10-29 14:42:41 +08:00
|
|
|
|
2019-10-16 10:13:44 +08:00
|
|
|
export {
|
|
|
|
BaseLayer,
|
2019-10-29 17:33:37 +08:00
|
|
|
PointLayer,
|
2019-10-16 10:13:44 +08:00
|
|
|
PolygonLayer,
|
2019-10-30 10:07:17 +08:00
|
|
|
LineLayer,
|
2019-11-10 21:20:26 +08:00
|
|
|
DashLineLayer,
|
2019-10-30 11:52:36 +08:00
|
|
|
ImageLayer,
|
2019-11-01 15:36:20 +08:00
|
|
|
RasterLayer,
|
2019-11-19 19:03:17 +08:00
|
|
|
HeatmapLayer,
|
2019-10-16 10:13:44 +08:00
|
|
|
};
|