mirror of https://gitee.com/antv-l7/antv-l7
Merge branch 'master' of https://github.com/antvis/L7
This commit is contained in:
commit
188401f6d7
|
@ -103,7 +103,8 @@ module.exports = api => {
|
|||
}
|
||||
],
|
||||
isCDNBundle ? {} : [
|
||||
'transform-import-styles'
|
||||
'transform-import-css-l7'
|
||||
// 'transform-import-styles' // babel 编译将样式打包到js
|
||||
],
|
||||
[
|
||||
// @see https://github.com/babel/babel/issues/8741#issuecomment-509041135
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"message": "chore: publish"
|
||||
}
|
||||
},
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"publishConfig": {
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
"babel-plugin-inline-import": "^3.0.0",
|
||||
"babel-plugin-inline-webgl-constants": "^1.0.1",
|
||||
"babel-plugin-lodash": "^3.3.4",
|
||||
"babel-plugin-transform-import-css-l7": "^0.0.4",
|
||||
"babel-plugin-transform-import-styles": "^0.0.11",
|
||||
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
|
||||
"babel-plugin-transform-node-env-inline": "^0.4.3",
|
||||
|
@ -85,7 +86,6 @@
|
|||
"jest-styled-components": "^6.2.1",
|
||||
"lerna": "^3.16.4",
|
||||
"lint-staged": "^9.2.4",
|
||||
"load-styles": "^2.0.0",
|
||||
"node-sass": "^4.12.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss": "^7.0.18",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-component",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -25,12 +25,12 @@
|
|||
"author": "lzxue",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/l7-core": "^2.5.5",
|
||||
"@antv/l7-utils": "^2.5.5",
|
||||
"@antv/l7-core": "^2.5.8",
|
||||
"@antv/l7-utils": "^2.5.8",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"eventemitter3": "^4.0.0",
|
||||
"inversify": "^5.0.1",
|
||||
"load-styles": "^2.0.0"
|
||||
"reflect-metadata": "^0.1.13"
|
||||
},
|
||||
"gitHead": "7eb8382ede52d803fae13a85fe6af074400260ee",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-core",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -24,7 +24,7 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/async-hook": "^2.1.0",
|
||||
"@antv/l7-utils": "^2.5.5",
|
||||
"@antv/l7-utils": "^2.5.8",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@mapbox/tiny-sdf": "^1.1.1",
|
||||
"ajv": "^6.10.2",
|
||||
|
@ -35,7 +35,6 @@
|
|||
"inversify": "^5.0.1",
|
||||
"inversify-inject-decorators": "^3.1.0",
|
||||
"lodash": "^4.17.15",
|
||||
"merge-json-schemas": "^1.0.0",
|
||||
"probe.gl": "^3.1.1",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"viewport-mercator-project": "^6.2.1"
|
||||
|
|
|
@ -44,7 +44,6 @@ export * from './services/asset/IFontService';
|
|||
export * from './services/component/IControlService';
|
||||
export * from './services/component/IMarkerService';
|
||||
export * from './services/component/IPopupService';
|
||||
export * from './services/log/ILogService';
|
||||
export * from './services/interaction/IInteractionService';
|
||||
export * from './services/interaction/IPickingService';
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ import { IInteractionService } from './services/interaction/IInteractionService'
|
|||
import { IPickingService } from './services/interaction/IPickingService';
|
||||
import { ILayerService } from './services/layer/ILayerService';
|
||||
import { IStyleAttributeService } from './services/layer/IStyleAttributeService';
|
||||
import { ILogService } from './services/log/ILogService';
|
||||
import { ISceneService } from './services/scene/ISceneService';
|
||||
import { IShaderModuleService } from './services/shader/IShaderModuleService';
|
||||
|
||||
|
@ -37,7 +36,6 @@ import InteractionService from './services/interaction/InteractionService';
|
|||
import PickingService from './services/interaction/PickingService';
|
||||
import LayerService from './services/layer/LayerService';
|
||||
import StyleAttributeService from './services/layer/StyleAttributeService';
|
||||
import LogService from './services/log/LogService';
|
||||
import SceneService from './services/scene/SceneService';
|
||||
import ShaderModuleService from './services/shader/ShaderModuleService';
|
||||
|
||||
|
@ -83,10 +81,6 @@ container
|
|||
.bind<IShaderModuleService>(TYPES.IShaderModuleService)
|
||||
.to(ShaderModuleService)
|
||||
.inSingletonScope();
|
||||
container
|
||||
.bind<ILogService>(TYPES.ILogService)
|
||||
.to(LogService)
|
||||
.inSingletonScope();
|
||||
// container
|
||||
// .bind<IFontService>(TYPES.IFontService)
|
||||
// .to(FontService)
|
||||
|
|
|
@ -2,6 +2,7 @@ import { LRUCache } from '@antv/l7-utils';
|
|||
// @ts-ignore
|
||||
import TinySDF from '@mapbox/tiny-sdf';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { buildMapping } from '../../utils/font_util';
|
||||
import {
|
||||
IFontAtlas,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import TinySDF from '@mapbox/tiny-sdf';
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../types';
|
||||
import { buildIconMaping } from '../../utils/font_util';
|
||||
import { ITexture2D } from '../renderer/ITexture2D';
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { mat4 } from 'gl-matrix';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { ICameraService, IViewport } from './ICameraService';
|
||||
|
||||
@injectable()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { DOM } from '@antv/l7-utils';
|
||||
import { Container, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../types';
|
||||
import { IMapService } from '../map/IMapService';
|
||||
import {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Container, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../types';
|
||||
import { IMapService } from '../map/IMapService';
|
||||
import {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Container, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../types';
|
||||
import { IMapService } from '../map/IMapService';
|
||||
import { IPopup, IPopupService } from './IPopupService';
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// import Ajv from 'ajv';
|
||||
import { injectable, postConstruct } from 'inversify';
|
||||
import { merge } from 'lodash';
|
||||
import 'reflect-metadata';
|
||||
import { ILayerConfig } from '../layer/ILayerService';
|
||||
import { IRenderConfig } from '../renderer/IRendererService';
|
||||
import { IGlobalConfigService, ISceneConfig } from './IConfigService';
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { mat4, vec4 } from 'gl-matrix';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../types';
|
||||
import { getDistanceScales } from '../../utils/project';
|
||||
import { ICameraService } from '../camera/ICameraService';
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import EventEmitter from 'eventemitter3';
|
||||
import Hammer from 'hammerjs';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
// @ts-ignore
|
||||
import { TYPES } from '../../types';
|
||||
import { ILogService } from '../log/ILogService';
|
||||
import { ILngLat, IMapService } from '../map/IMapService';
|
||||
import { IInteractionService, InteractionEvent } from './IInteractionService';
|
||||
const DragEventMap: { [key: string]: string } = {
|
||||
|
@ -22,9 +22,6 @@ export default class InteractionService extends EventEmitter
|
|||
@inject(TYPES.IMapService)
|
||||
private readonly mapService: IMapService;
|
||||
|
||||
@inject(TYPES.ILogService)
|
||||
private readonly logger: ILogService;
|
||||
|
||||
private hammertime: HammerManager;
|
||||
|
||||
private lastClickTime: number = 0;
|
||||
|
@ -91,7 +88,6 @@ export default class InteractionService extends EventEmitter
|
|||
this.hammertime = hammertime;
|
||||
|
||||
// TODO: 根据场景注册事件到 L7 canvas 上
|
||||
this.logger.debug('add event listeners on canvas');
|
||||
}
|
||||
}
|
||||
private removeEventListenerOnMap() {
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
import { decodePickingColor, DOM, encodePickingColor } from '@antv/l7-utils';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import {
|
||||
IMapService,
|
||||
IRendererService,
|
||||
IShaderModuleService,
|
||||
} from '../../index';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../types';
|
||||
import { IGlobalConfigService, ISceneConfig } from '../config/IConfigService';
|
||||
import {
|
||||
|
@ -16,6 +12,7 @@ import { ILayer, ILayerService } from '../layer/ILayerService';
|
|||
import { ILngLat } from '../map/IMapService';
|
||||
import { gl } from '../renderer/gl';
|
||||
import { IFramebuffer } from '../renderer/IFramebuffer';
|
||||
import { IRendererService } from '../renderer/IRendererService';
|
||||
import { IPickingService } from './IPickingService';
|
||||
|
||||
@injectable()
|
||||
|
|
|
@ -197,10 +197,7 @@ export interface ILayer {
|
|||
off(type: string, handler: (...args: any[]) => void): void;
|
||||
emit(type: string, handler: unknown): void;
|
||||
once(type: string, handler: (...args: any[]) => void): void;
|
||||
/**
|
||||
* JSON Schema 用于校验配置项
|
||||
*/
|
||||
getConfigSchemaForValidation(): object;
|
||||
|
||||
isDirty(): boolean;
|
||||
/**
|
||||
* 直接调用拾取方法,在非鼠标交互场景中使用
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { ILayer } from '../..';
|
||||
import { TYPES } from '../../types';
|
||||
import Clock from '../../utils/clock';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { inject, injectable, optional } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../types';
|
||||
import { gl } from '../renderer/gl';
|
||||
import { IAttribute } from '../renderer/IAttribute';
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
export interface ILogService {
|
||||
error(message: string): void;
|
||||
warn(message: string): void;
|
||||
info(message: string): void;
|
||||
debug(message: string): void;
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
import { injectable } from 'inversify';
|
||||
import Probe, { Log } from 'probe.gl';
|
||||
import { ILogService } from './ILogService';
|
||||
// !process.env.NODE_ENV === 'production',
|
||||
const Logger = new Log({ id: 'L7' }).enable(
|
||||
// @ts-ignore
|
||||
process.env.NODE_ENV !== 'production',
|
||||
);
|
||||
// // 只输出 debug 级别以上的日志信息
|
||||
Logger.priority = 5;
|
||||
|
||||
@injectable()
|
||||
export default class LogService implements ILogService {
|
||||
public error(message: string): void {
|
||||
Logger.error(message)();
|
||||
}
|
||||
|
||||
public warn(message: string): void {
|
||||
Logger.probe(1, message)();
|
||||
}
|
||||
|
||||
public info(message: string): void {
|
||||
Logger.info(3, message)();
|
||||
}
|
||||
|
||||
public debug(message: string): void {
|
||||
Logger.probe(4, message)();
|
||||
}
|
||||
}
|
|
@ -1,14 +1,13 @@
|
|||
import { inject, injectable } from 'inversify';
|
||||
import {
|
||||
IMapService,
|
||||
IRendererService,
|
||||
IShaderModuleService,
|
||||
} from '../../../index';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../../types';
|
||||
import { ICameraService } from '../../camera/ICameraService';
|
||||
import { IInteractionService } from '../../interaction/IInteractionService';
|
||||
import { ILayer, ILayerService } from '../../layer/ILayerService';
|
||||
import { IMapService } from '../../map/IMapService';
|
||||
import { IShaderModuleService } from '../../shader/IShaderModuleService';
|
||||
import { IPass, PassType } from '../IMultiPassRenderer';
|
||||
import { IRendererService } from '../IRendererService';
|
||||
|
||||
/**
|
||||
* 常规 Pass 基类
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { inject, injectable } from 'inversify';
|
||||
import { camelCase, isNil, upperFirst } from 'lodash';
|
||||
import {
|
||||
gl,
|
||||
IModel,
|
||||
IRendererService,
|
||||
IShaderModuleService,
|
||||
} from '../../../index';
|
||||
import 'reflect-metadata';
|
||||
import { IShaderModuleService } from '../../shader/IShaderModuleService';
|
||||
import { gl } from '../gl';
|
||||
import { IModel } from '../IModel';
|
||||
import { IRendererService } from '../IRendererService';
|
||||
|
||||
import quad from '../../../shaders/post-processing/quad.glsl';
|
||||
import { TYPES } from '../../../types';
|
||||
import { ILayer } from '../../layer/ILayerService';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { ILayer } from '../../layer/ILayerService';
|
||||
import BaseNormalPass from './BaseNormalPass';
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../../types';
|
||||
import { ILayer } from '../../layer/ILayerService';
|
||||
import {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { decodePickingColor, DOM, encodePickingColor } from '@antv/l7-utils';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../../types';
|
||||
import {
|
||||
IInteractionTarget,
|
||||
InteractionEvent,
|
||||
} from '../../interaction/IInteractionService';
|
||||
import { ILayer } from '../../layer/ILayerService';
|
||||
import { ILogService } from '../../log/ILogService';
|
||||
import { ILngLat } from '../../map/IMapService';
|
||||
import { gl } from '../gl';
|
||||
import { IFramebuffer } from '../IFramebuffer';
|
||||
|
@ -21,9 +21,6 @@ import BaseNormalPass from './BaseNormalPass';
|
|||
export default class PixelPickingPass<
|
||||
InitializationOptions = {}
|
||||
> extends BaseNormalPass<InitializationOptions> {
|
||||
@inject(TYPES.ILogService)
|
||||
protected readonly logger: ILogService;
|
||||
|
||||
/**
|
||||
* picking framebuffer,供 attributes 颜色编码后输出
|
||||
*/
|
||||
|
@ -169,7 +166,6 @@ export default class PixelPickingPass<
|
|||
pickedColors[1] !== 0 ||
|
||||
pickedColors[2] !== 0
|
||||
) {
|
||||
this.logger.debug('picked');
|
||||
const pickedFeatureIdx = decodePickingColor(pickedColors);
|
||||
const rawFeature = this.layer
|
||||
.getSource()
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { inject, injectable, postConstruct } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../../types';
|
||||
import { ILayer } from '../../layer/ILayerService';
|
||||
import { gl } from '../gl';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { ILayer } from '../../layer/ILayerService';
|
||||
import { PassType } from '../IMultiPassRenderer';
|
||||
import BaseNormalPass from './BaseNormalPass';
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import blendFS from '../../../shaders/post-processing/blend.glsl';
|
||||
import copyFS from '../../../shaders/post-processing/copy.glsl';
|
||||
import quadVS from '../../../shaders/post-processing/quad.glsl';
|
||||
import { TYPES } from '../../../types';
|
||||
import { ILayer } from '../../layer/ILayerService';
|
||||
import { ILogService } from '../../log/ILogService';
|
||||
import { IShaderModuleService } from '../../shader/IShaderModuleService';
|
||||
import { gl } from '../gl';
|
||||
import { IFramebuffer } from '../IFramebuffer';
|
||||
|
@ -42,9 +42,6 @@ export default class TAAPass<InitializationOptions = {}> extends BaseNormalPass<
|
|||
@inject(TYPES.IShaderModuleService)
|
||||
protected readonly shaderModuleService: IShaderModuleService;
|
||||
|
||||
@inject(TYPES.ILogService)
|
||||
protected readonly logger: ILogService;
|
||||
|
||||
/**
|
||||
* 低差异序列
|
||||
*/
|
||||
|
@ -192,8 +189,6 @@ export default class TAAPass<InitializationOptions = {}> extends BaseNormalPass<
|
|||
}
|
||||
|
||||
private doRender(layer: ILayer) {
|
||||
this.logger.debug(`accumulatingId: ${this.accumulatingId}`);
|
||||
|
||||
const { clear, getViewportSize, useFramebuffer } = this.rendererService;
|
||||
const { width, height } = getViewportSize();
|
||||
const { jitterScale = 1 } = layer.getLayerConfig();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { injectable } from 'inversify';
|
||||
import { isNil } from 'lodash';
|
||||
import 'reflect-metadata';
|
||||
import blur from '../../../../shaders/post-processing/blur.glsl';
|
||||
import quad from '../../../../shaders/post-processing/quad.glsl';
|
||||
import { IUniform } from '../../IUniform';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import colorHalftone from '../../../../shaders/post-processing/colorhalftone.glsl';
|
||||
import quad from '../../../../shaders/post-processing/quad.glsl';
|
||||
import BasePostProcessingPass from '../BasePostProcessingPass';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import copy from '../../../../shaders/post-processing/copy.glsl';
|
||||
import quad from '../../../../shaders/post-processing/quad.glsl';
|
||||
import BasePostProcessingPass from '../BasePostProcessingPass';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import hexagonalPixelate from '../../../../shaders/post-processing/hexagonalpixelate.glsl';
|
||||
import quad from '../../../../shaders/post-processing/quad.glsl';
|
||||
import BasePostProcessingPass from '../BasePostProcessingPass';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import ink from '../../../../shaders/post-processing/ink.glsl';
|
||||
import quad from '../../../../shaders/post-processing/quad.glsl';
|
||||
import BasePostProcessingPass from '../BasePostProcessingPass';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import noise from '../../../../shaders/post-processing/noise.glsl';
|
||||
import quad from '../../../../shaders/post-processing/quad.glsl';
|
||||
import BasePostProcessingPass from '../BasePostProcessingPass';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import quad from '../../../../shaders/post-processing/quad.glsl';
|
||||
import sepia from '../../../../shaders/post-processing/sepia.glsl';
|
||||
import BasePostProcessingPass from '../BasePostProcessingPass';
|
||||
|
|
|
@ -4,6 +4,7 @@ import { DOM } from '@antv/l7-utils';
|
|||
import elementResizeEvent, { unbind } from 'element-resize-event';
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { TYPES } from '../../types';
|
||||
import { createRendererContainer } from '../../utils/dom';
|
||||
import { IFontService } from '../asset/IFontService';
|
||||
|
@ -21,7 +22,6 @@ import {
|
|||
} from '../interaction/IInteractionService';
|
||||
import { IPickingService } from '../interaction/IPickingService';
|
||||
import { ILayer, ILayerService } from '../layer/ILayerService';
|
||||
import { ILogService } from '../log/ILogService';
|
||||
import { IMapCamera, IMapConfig, IMapService } from '../map/IMapService';
|
||||
import { IRenderConfig, IRendererService } from '../renderer/IRendererService';
|
||||
import { IShaderModuleService } from '../shader/IShaderModuleService';
|
||||
|
@ -54,9 +54,6 @@ export default class Scene extends EventEmitter implements ISceneService {
|
|||
@inject(TYPES.IControlService)
|
||||
private readonly controlService: IControlService;
|
||||
|
||||
@inject(TYPES.ILogService)
|
||||
private readonly logger: ILogService;
|
||||
|
||||
@inject(TYPES.IGlobalConfigService)
|
||||
private readonly configService: IGlobalConfigService;
|
||||
|
||||
|
@ -183,7 +180,6 @@ export default class Scene extends EventEmitter implements ISceneService {
|
|||
InteractionEvent.Drag,
|
||||
this.addSceneEvent.bind(this),
|
||||
);
|
||||
this.logger.debug(`map ${this.id} loaded`);
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -219,11 +215,9 @@ export default class Scene extends EventEmitter implements ISceneService {
|
|||
.matchMedia('screen and (-webkit-min-device-pixel-ratio: 1.5)')
|
||||
.addListener(this.handleWindowResized);
|
||||
} else {
|
||||
this.logger.error('容器 id 不存在');
|
||||
console.error('容器 id 不存在');
|
||||
}
|
||||
this.pickingService.init(this.id);
|
||||
|
||||
this.logger.debug(`scene ${this.id} renderer loaded`);
|
||||
});
|
||||
// TODO:init worker, fontAtlas...
|
||||
|
||||
|
@ -234,7 +228,6 @@ export default class Scene extends EventEmitter implements ISceneService {
|
|||
}
|
||||
|
||||
public addLayer(layer: ILayer) {
|
||||
this.logger.debug(`add layer ${layer.name} to scene ${this.id}`);
|
||||
this.layerService.add(layer);
|
||||
this.render();
|
||||
}
|
||||
|
@ -258,7 +251,6 @@ export default class Scene extends EventEmitter implements ISceneService {
|
|||
await document.fonts.load(`24px ${this.fontFamily}`, 'L7text');
|
||||
}
|
||||
// FIXME: 初始化 marker 容器,可以放到 map 初始化方法中?
|
||||
this.logger.info(' render inited');
|
||||
this.layerService.initLayers();
|
||||
this.controlService.addControls();
|
||||
this.loaded = true;
|
||||
|
@ -270,7 +262,6 @@ export default class Scene extends EventEmitter implements ISceneService {
|
|||
this.layerService.renderLayers();
|
||||
|
||||
// 组件需要等待layer 初始化完成之后添加
|
||||
this.logger.debug(`scene ${this.id} render`);
|
||||
this.rendering = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { inject, injectable } from 'inversify';
|
||||
import { uniq } from 'lodash';
|
||||
import 'reflect-metadata';
|
||||
import { extractUniforms } from '../../utils/shader-module';
|
||||
import { IModuleParams, IShaderModuleService } from './IShaderModuleService';
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ const TYPES = {
|
|||
ILayerService: Symbol.for('ILayerService'),
|
||||
ILayerMappingService: Symbol.for('ILayerMappingService'),
|
||||
ILayerStyleService: Symbol.for('ILayerStyleService'),
|
||||
ILogService: Symbol.for('ILogService'),
|
||||
IMapService: Symbol.for('IMapService'),
|
||||
IMarkerService: Symbol.for('IMarkerService'),
|
||||
IPopupService: Symbol.for('PopupService'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -25,12 +25,12 @@
|
|||
"author": "antv",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@antv/l7-component": "^2.5.5",
|
||||
"@antv/l7-core": "^2.5.5",
|
||||
"@antv/l7-layers": "^2.5.5",
|
||||
"@antv/l7-maps": "^2.5.5",
|
||||
"@antv/l7-scene": "^2.5.5",
|
||||
"@antv/l7-utils": "^2.5.5",
|
||||
"@antv/l7-component": "^2.5.8",
|
||||
"@antv/l7-core": "^2.5.8",
|
||||
"@antv/l7-layers": "^2.5.8",
|
||||
"@antv/l7-maps": "^2.5.8",
|
||||
"@antv/l7-scene": "^2.5.8",
|
||||
"@antv/l7-utils": "^2.5.8",
|
||||
"@babel/runtime": "^7.7.7"
|
||||
},
|
||||
"gitHead": "7eb8382ede52d803fae13a85fe6af074400260ee",
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
const version = '2.5.5';
|
||||
const version = '2.5.7';
|
||||
export { version };
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-layers",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "L7's collection of built-in layers",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -24,9 +24,9 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/async-hook": "^2.1.0",
|
||||
"@antv/l7-core": "^2.5.5",
|
||||
"@antv/l7-source": "^2.5.5",
|
||||
"@antv/l7-utils": "^2.5.5",
|
||||
"@antv/l7-core": "^2.5.8",
|
||||
"@antv/l7-source": "^2.5.8",
|
||||
"@antv/l7-utils": "^2.5.8",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@mapbox/martini": "^0.2.0",
|
||||
"@turf/meta": "^6.0.2",
|
||||
|
|
|
@ -19,7 +19,6 @@ import {
|
|||
ILayerModelInitializationOptions,
|
||||
ILayerPlugin,
|
||||
ILayerService,
|
||||
ILogService,
|
||||
IMapService,
|
||||
IModel,
|
||||
IModelInitializationOptions,
|
||||
|
@ -48,8 +47,6 @@ import { encodePickingColor } from '@antv/l7-utils';
|
|||
import { EventEmitter } from 'eventemitter3';
|
||||
import { Container } from 'inversify';
|
||||
import { isFunction, isObject } from 'lodash';
|
||||
// @ts-ignore
|
||||
import mergeJsonSchemas from 'merge-json-schemas';
|
||||
import { normalizePasses } from '../plugins/MultiPassRendererPlugin';
|
||||
import { BlendTypes } from '../utils/blend';
|
||||
import { handleStyleDataMapping } from '../utils/dataMappingStyle';
|
||||
|
@ -114,9 +111,6 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
|
|||
|
||||
public layerModel: ILayerModel;
|
||||
|
||||
@lazyInject(TYPES.ILogService)
|
||||
protected readonly logger: ILogService;
|
||||
|
||||
@lazyInject(TYPES.IGlobalConfigService)
|
||||
protected readonly configService: IGlobalConfigService;
|
||||
|
||||
|
@ -807,18 +801,6 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
|
|||
public getEncodedData() {
|
||||
return this.encodedData;
|
||||
}
|
||||
|
||||
public getConfigSchemaForValidation() {
|
||||
if (!this.configSchema) {
|
||||
// 相比 allOf, merge 有一些优势
|
||||
// @see https://github.com/goodeggs/merge-json-schemas
|
||||
this.configSchema = mergeJsonSchemas([
|
||||
baseLayerSchema,
|
||||
this.getConfigSchema(),
|
||||
]);
|
||||
}
|
||||
return this.configSchema;
|
||||
}
|
||||
public getLegendItems(name: string): any {
|
||||
const scale = this.styleAttributeService.getLayerAttributeScale(name);
|
||||
if (scale) {
|
||||
|
|
|
@ -10,6 +10,7 @@ import {
|
|||
import { generateColorRamp, IColorRamp } from '@antv/l7-utils';
|
||||
import { mat4 } from 'gl-matrix';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import BaseModel from '../../core/BaseModel';
|
||||
import { HeatmapTriangulation } from '../../core/triangulation';
|
||||
import heatmap3DFrag from '../shaders/heatmap_3d_frag.glsl';
|
||||
|
|
|
@ -4,7 +4,6 @@ import {
|
|||
IEncodeFeature,
|
||||
ILayer,
|
||||
ILayerPlugin,
|
||||
ILogService,
|
||||
IModel,
|
||||
IModelUniform,
|
||||
IRasterParserDataItem,
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
// import {
|
||||
// IGlobalConfigService,
|
||||
// ILayer,
|
||||
// ILayerPlugin,
|
||||
// ILogService,
|
||||
// TYPES,
|
||||
// } from '@antv/l7-core';
|
||||
// import { inject, injectable } from 'inversify';
|
||||
|
||||
// /**
|
||||
// * Layer 初始化阶段以及重绘阶段首先校验传入参数,如果校验失败则中断后续插件处理。
|
||||
// */
|
||||
// @injectable()
|
||||
// export default class ConfigSchemaValidationPlugin implements ILayerPlugin {
|
||||
// @inject(TYPES.IGlobalConfigService)
|
||||
// private readonly configService: IGlobalConfigService;
|
||||
|
||||
// @inject(TYPES.ILogService)
|
||||
// private readonly logger: ILogService;
|
||||
|
||||
// public apply(layer: ILayer) {
|
||||
// layer.hooks.init.tap('ConfigSchemaValidationPlugin', () => {
|
||||
// this.configService.registerLayerConfigSchemaValidator(
|
||||
// layer.name as string,
|
||||
// layer.getConfigSchemaForValidation(),
|
||||
// );
|
||||
|
||||
// const { valid, errorText } = this.configService.validateLayerConfig(
|
||||
// layer.name as string,
|
||||
// layer.getLayerConfig(),
|
||||
// );
|
||||
|
||||
// if (!valid) {
|
||||
// this.logger.error(errorText || '');
|
||||
// // 中断 init 过程
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
// layer.hooks.beforeRender.tap('ConfigSchemaValidationPlugin', () => {
|
||||
// // TODO: 配置项发生变化,需要重新校验
|
||||
// });
|
||||
// }
|
||||
// }
|
|
@ -5,7 +5,6 @@ import {
|
|||
ILayer,
|
||||
ILayerPlugin,
|
||||
ILngLat,
|
||||
ILogService,
|
||||
IMapService,
|
||||
IParseDataItem,
|
||||
IStyleAttribute,
|
||||
|
@ -15,15 +14,13 @@ import {
|
|||
import { rgb2arr, unProjectFlat } from '@antv/l7-utils';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import 'reflect-metadata';
|
||||
|
||||
@injectable()
|
||||
export default class DataMappingPlugin implements ILayerPlugin {
|
||||
@inject(TYPES.IGlobalConfigService)
|
||||
private readonly configService: IGlobalConfigService;
|
||||
|
||||
@inject(TYPES.ILogService)
|
||||
private readonly logger: ILogService;
|
||||
|
||||
@inject(TYPES.IMapService)
|
||||
private readonly mapService: IMapService;
|
||||
|
||||
|
@ -79,7 +76,6 @@ export default class DataMappingPlugin implements ILayerPlugin {
|
|||
),
|
||||
);
|
||||
}
|
||||
this.logger.debug('remapping finished');
|
||||
// 处理文本更新
|
||||
layer.emit('remapping', null);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import {
|
|||
import Source from '@antv/l7-source';
|
||||
import { injectable } from 'inversify';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import 'reflect-metadata';
|
||||
|
||||
@injectable()
|
||||
export default class DataSourcePlugin implements ILayerPlugin {
|
||||
|
|
|
@ -2,7 +2,6 @@ import {
|
|||
IGlobalConfigService,
|
||||
ILayer,
|
||||
ILayerPlugin,
|
||||
ILogService,
|
||||
IScale,
|
||||
IScaleOptions,
|
||||
IStyleAttribute,
|
||||
|
@ -18,6 +17,7 @@ import { extent, ticks } from 'd3-array';
|
|||
import * as d3 from 'd3-scale';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import { isNil, isString, uniq } from 'lodash';
|
||||
import 'reflect-metadata';
|
||||
|
||||
const dateRegex = /^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;
|
||||
|
||||
|
@ -40,10 +40,6 @@ const scaleMap = {
|
|||
export default class FeatureScalePlugin implements ILayerPlugin {
|
||||
@inject(TYPES.IGlobalConfigService)
|
||||
private readonly configService: IGlobalConfigService;
|
||||
|
||||
@inject(TYPES.ILogService)
|
||||
private readonly logger: ILogService;
|
||||
|
||||
// key = field_attribute name
|
||||
private scaleCache: {
|
||||
[field: string]: IStyleScale;
|
||||
|
@ -96,7 +92,6 @@ export default class FeatureScalePlugin implements ILayerPlugin {
|
|||
);
|
||||
if (attributesToRescale.length) {
|
||||
this.caculateScalesForAttributes(attributesToRescale, dataArray);
|
||||
this.logger.debug('rescale finished');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -10,6 +10,7 @@ import {
|
|||
TYPES,
|
||||
} from '@antv/l7-core';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
|
||||
@injectable()
|
||||
export default class LayerAnimateStylePlugin implements ILayerPlugin {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core';
|
||||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
/**
|
||||
* Layer Model 初始化,更新,销毁
|
||||
*/
|
||||
|
|
|
@ -2,6 +2,7 @@ import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core';
|
|||
import Source from '@antv/l7-source';
|
||||
import { encodePickingColor, rgb2arr } from '@antv/l7-utils';
|
||||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
/**
|
||||
* 更新图层样式,初始图层相关配置
|
||||
*/
|
||||
|
|
|
@ -9,6 +9,7 @@ import {
|
|||
TYPES,
|
||||
} from '@antv/l7-core';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
|
||||
const lightTypeUniformMap = {
|
||||
directional: {
|
||||
|
|
|
@ -8,6 +8,7 @@ import {
|
|||
TYPES,
|
||||
} from '@antv/l7-core';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
|
||||
/**
|
||||
* 'blurH' -> ['blurH', {}]
|
||||
|
|
|
@ -13,6 +13,7 @@ import {
|
|||
rgb2arr,
|
||||
} from '@antv/l7-utils';
|
||||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
|
||||
const PickingStage = {
|
||||
NONE: 0.0,
|
||||
|
|
|
@ -4,21 +4,17 @@ import {
|
|||
IEncodeFeature,
|
||||
ILayer,
|
||||
ILayerPlugin,
|
||||
ILogService,
|
||||
IStyleAttributeService,
|
||||
TYPES,
|
||||
} from '@antv/l7-core';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import { isNumber } from 'lodash';
|
||||
import 'reflect-metadata';
|
||||
|
||||
/**
|
||||
* 在初始化阶段完成属性的注册,以及首次根据 Layer 指定的三角化方法完成 indices 和 attribute 的创建
|
||||
*/
|
||||
@injectable()
|
||||
export default class RegisterStyleAttributePlugin implements ILayerPlugin {
|
||||
@inject(TYPES.ILogService)
|
||||
private readonly logger: ILogService;
|
||||
|
||||
public apply(
|
||||
layer: ILayer,
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ import {
|
|||
} from '@antv/l7-core';
|
||||
import { DOM } from '@antv/l7-utils';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
|
||||
/**
|
||||
* 在渲染之前需要获取当前 Shader 所需 Uniform,例如:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core';
|
||||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
/**
|
||||
* Model 更新
|
||||
*/
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
import {
|
||||
ILayer,
|
||||
ILayerPlugin,
|
||||
ILogService,
|
||||
IStyleAttributeService,
|
||||
TYPES,
|
||||
} from '@antv/l7-core';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
|
||||
/**
|
||||
* 在初始化阶段完成属性的注册,以及首次根据 Layer 指定的三角化方法完成 indices 和 attribute 的创建
|
||||
*/
|
||||
@injectable()
|
||||
export default class UpdateStyleAttributePlugin implements ILayerPlugin {
|
||||
@inject(TYPES.ILogService)
|
||||
private readonly logger: ILogService;
|
||||
|
||||
public apply(
|
||||
layer: ILayer,
|
||||
{
|
||||
|
@ -65,9 +62,6 @@ export default class UpdateStyleAttributePlugin implements ILayerPlugin {
|
|||
attribute.featureRange.endIndex,
|
||||
);
|
||||
attribute.needRegenerateVertices = false;
|
||||
this.logger.debug(
|
||||
`regenerate vertex attributes: ${attribute.name} finished`,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -89,7 +83,6 @@ export default class UpdateStyleAttributePlugin implements ILayerPlugin {
|
|||
attribute.featureRange.endIndex,
|
||||
);
|
||||
attribute.needRegenerateVertices = false;
|
||||
this.logger.debug(`init vertex attributes: ${attribute.name} finished`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
ILayer,
|
||||
ILayerModel,
|
||||
ILayerPlugin,
|
||||
ILogService,
|
||||
IModel,
|
||||
IStyleAttributeService,
|
||||
lazyInject,
|
||||
|
|
|
@ -4,7 +4,6 @@ import {
|
|||
IEncodeFeature,
|
||||
ILayer,
|
||||
ILayerPlugin,
|
||||
ILogService,
|
||||
IModel,
|
||||
IModelUniform,
|
||||
IRasterParserDataItem,
|
||||
|
|
|
@ -4,7 +4,6 @@ import {
|
|||
IEncodeFeature,
|
||||
ILayer,
|
||||
ILayerPlugin,
|
||||
ILogService,
|
||||
IModelUniform,
|
||||
IRasterParserDataItem,
|
||||
IStyleAttributeService,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-map",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "l7 map",
|
||||
"keywords": [],
|
||||
"author": "thinkinggis <lzx199065@gmail.com>",
|
||||
|
@ -37,7 +37,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/antvis/L7#readme",
|
||||
"dependencies": {
|
||||
"@antv/l7-utils": "^2.5.5",
|
||||
"@antv/l7-utils": "^2.5.8",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@mapbox/point-geometry": "^0.1.0",
|
||||
"@mapbox/unitbezier": "^0.0.0",
|
||||
|
|
|
@ -48,16 +48,16 @@ export default class LngLat {
|
|||
public toArray(): [number, number] {
|
||||
return [this.lng, this.lat];
|
||||
}
|
||||
public toBounds(radius: number = 0) {
|
||||
const earthCircumferenceInMetersAtEquator = 40075017;
|
||||
const latAccuracy = (360 * radius) / earthCircumferenceInMetersAtEquator;
|
||||
const lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);
|
||||
// public toBounds(radius: number = 0) {
|
||||
// const earthCircumferenceInMetersAtEquator = 40075017;
|
||||
// const latAccuracy = (360 * radius) / earthCircumferenceInMetersAtEquator;
|
||||
// const lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);
|
||||
|
||||
return new LngLatBounds(
|
||||
new LngLat(this.lng - lngAccuracy, this.lat - latAccuracy),
|
||||
new LngLat(this.lng + lngAccuracy, this.lat + latAccuracy),
|
||||
);
|
||||
}
|
||||
// return new LngLatBounds(
|
||||
// new LngLat(this.lng - lngAccuracy, this.lat - latAccuracy),
|
||||
// new LngLat(this.lng + lngAccuracy, this.lat + latAccuracy),
|
||||
// );
|
||||
// }
|
||||
public toString() {
|
||||
return `LngLat(${this.lng}, ${this.lat})`;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-maps",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -27,16 +27,16 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^0.0.3",
|
||||
"@antv/l7-core": "^2.5.5",
|
||||
"@antv/l7-map": "^2.5.5",
|
||||
"@antv/l7-utils": "^2.5.5",
|
||||
"@antv/l7-core": "^2.5.8",
|
||||
"@antv/l7-map": "^2.5.8",
|
||||
"@antv/l7-utils": "^2.5.8",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@types/amap-js-api": "^1.4.6",
|
||||
"@types/mapbox-gl": "^1.11.2",
|
||||
"gl-matrix": "^3.1.0",
|
||||
"inversify": "^5.0.1",
|
||||
"load-styles": "^2.0.0",
|
||||
"mapbox-gl": "^1.2.1",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"viewport-mercator-project": "^6.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import {
|
||||
IGlobalConfigService,
|
||||
ILogService,
|
||||
IMapConfig,
|
||||
IMapService,
|
||||
IMapWrapper,
|
||||
|
@ -9,9 +8,6 @@ import {
|
|||
} from '@antv/l7-core';
|
||||
import { Container } from 'inversify';
|
||||
export default class BaseMapWrapper<RawMap> implements IMapWrapper {
|
||||
@lazyInject(TYPES.ILogService)
|
||||
protected readonly logger: ILogService;
|
||||
|
||||
@lazyInject(TYPES.IGlobalConfigService)
|
||||
protected readonly configService: IGlobalConfigService;
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ import {
|
|||
ICoordinateSystemService,
|
||||
IGlobalConfigService,
|
||||
ILngLat,
|
||||
ILogService,
|
||||
IMapConfig,
|
||||
IMapService,
|
||||
IMercator,
|
||||
|
@ -23,6 +22,7 @@ import {
|
|||
import { DOM } from '@antv/l7-utils';
|
||||
import { mat4, vec2, vec3 } from 'gl-matrix';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { IAMapEvent, IAMapInstance } from '../../typings/index';
|
||||
import { toPaddingOptions } from '../utils';
|
||||
import { Version } from '../version';
|
||||
|
@ -64,9 +64,6 @@ export default class AMapService
|
|||
@inject(TYPES.IGlobalConfigService)
|
||||
private readonly configService: IGlobalConfigService;
|
||||
|
||||
@inject(TYPES.ILogService)
|
||||
private readonly logger: ILogService;
|
||||
|
||||
@inject(TYPES.MapConfig)
|
||||
private readonly config: Partial<IMapConfig>;
|
||||
|
||||
|
@ -361,7 +358,7 @@ export default class AMapService
|
|||
};
|
||||
if (!amapLoaded && !mapInstance) {
|
||||
if (token === AMAP_API_KEY) {
|
||||
this.logger.warn(this.configService.getSceneWarninfo('MapToken'));
|
||||
console.warn(this.configService.getSceneWarninfo('MapToken'));
|
||||
}
|
||||
amapLoaded = true;
|
||||
plugin.push('Map3D');
|
||||
|
|
|
@ -9,7 +9,6 @@ import {
|
|||
ICoordinateSystemService,
|
||||
IGlobalConfigService,
|
||||
ILngLat,
|
||||
ILogService,
|
||||
IMapConfig,
|
||||
IMapService,
|
||||
IMercator,
|
||||
|
@ -24,6 +23,7 @@ import {
|
|||
import { DOM } from '@antv/l7-utils';
|
||||
import { mat4, vec2, vec3 } from 'gl-matrix';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { IAMapEvent, IAMapInstance } from '../../typings/index';
|
||||
import { toPaddingOptions } from '../utils';
|
||||
import { Version } from '../version';
|
||||
|
@ -73,9 +73,6 @@ export default class AMapService
|
|||
@inject(TYPES.IGlobalConfigService)
|
||||
private readonly configService: IGlobalConfigService;
|
||||
|
||||
@inject(TYPES.ILogService)
|
||||
private readonly logger: ILogService;
|
||||
|
||||
@inject(TYPES.MapConfig)
|
||||
private readonly config: Partial<IMapConfig>;
|
||||
|
||||
|
@ -459,7 +456,7 @@ export default class AMapService
|
|||
this.viewport = new Viewport();
|
||||
if (!amapLoaded && !mapInstance) {
|
||||
if (token === AMAP_API_KEY) {
|
||||
this.logger.warn(this.configService.getSceneWarninfo('MapToken'));
|
||||
console.warn(this.configService.getSceneWarninfo('MapToken'));
|
||||
}
|
||||
amapLoaded = true;
|
||||
plugin.push('Map3D');
|
||||
|
|
|
@ -7,7 +7,6 @@ import {
|
|||
ICoordinateSystemService,
|
||||
IGlobalConfigService,
|
||||
ILngLat,
|
||||
ILogService,
|
||||
IMapConfig,
|
||||
IMapService,
|
||||
IMercator,
|
||||
|
@ -22,6 +21,7 @@ import { Map } from '@antv/l7-map';
|
|||
import { DOM } from '@antv/l7-utils';
|
||||
import { mat4, vec2, vec3 } from 'gl-matrix';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import { Version } from '../version';
|
||||
import Viewport from './Viewport';
|
||||
const EventMap: {
|
||||
|
@ -49,8 +49,6 @@ export default class L7MapService implements IMapService<Map> {
|
|||
@inject(TYPES.IGlobalConfigService)
|
||||
private readonly configService: IGlobalConfigService;
|
||||
|
||||
@inject(TYPES.ILogService)
|
||||
private readonly logger: ILogService;
|
||||
@inject(TYPES.ICoordinateSystemService)
|
||||
private readonly coordinateSystemService: ICoordinateSystemService;
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import {
|
|||
ICoordinateSystemService,
|
||||
IGlobalConfigService,
|
||||
ILngLat,
|
||||
ILogService,
|
||||
IMapConfig,
|
||||
IMapService,
|
||||
IMercator,
|
||||
|
@ -24,6 +23,7 @@ import { inject, injectable } from 'inversify';
|
|||
import mapboxgl, { IControl, Map } from 'mapbox-gl';
|
||||
// tslint:disable-next-line:no-submodule-imports
|
||||
import 'mapbox-gl/dist/mapbox-gl.css';
|
||||
import 'reflect-metadata';
|
||||
import { IMapboxInstance } from '../../typings/index';
|
||||
import { Version } from '../version';
|
||||
import Viewport from './Viewport';
|
||||
|
@ -56,8 +56,6 @@ export default class MapboxService
|
|||
@inject(TYPES.IGlobalConfigService)
|
||||
private readonly configService: IGlobalConfigService;
|
||||
|
||||
@inject(TYPES.ILogService)
|
||||
private readonly logger: ILogService;
|
||||
@inject(TYPES.ICoordinateSystemService)
|
||||
private readonly coordinateSystemService: ICoordinateSystemService;
|
||||
|
||||
|
@ -308,7 +306,7 @@ export default class MapboxService
|
|||
// 判断全局 mapboxgl 对象的加载
|
||||
if (!mapInstance && !window.mapboxgl) {
|
||||
// 用户有时传递进来的实例是继承于 mapbox 实例化的,不一定是 mapboxgl 对象。
|
||||
this.logger.error(this.configService.getSceneWarninfo('SDK'));
|
||||
console.error(this.configService.getSceneWarninfo('SDK'));
|
||||
}
|
||||
|
||||
if (
|
||||
|
@ -317,7 +315,7 @@ export default class MapboxService
|
|||
!window.mapboxgl.accessToken &&
|
||||
!mapInstance // 如果用户传递了 mapInstance,应该不去干预实例的 accessToken。
|
||||
) {
|
||||
this.logger.warn(this.configService.getSceneWarninfo('MapToken'));
|
||||
console.warn(this.configService.getSceneWarninfo('MapToken'));
|
||||
}
|
||||
|
||||
// 判断是否设置了 accessToken
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-renderer",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -26,7 +26,7 @@
|
|||
"gl": "^4.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/l7-core": "^2.5.5",
|
||||
"@antv/l7-core": "^2.5.8",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"inversify": "^5.0.1",
|
||||
"lodash": "^4.17.15",
|
||||
|
|
|
@ -22,6 +22,7 @@ import {
|
|||
ITexture2DInitializationOptions,
|
||||
} from '@antv/l7-core';
|
||||
import { injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
import regl from 'regl';
|
||||
import ReglAttribute from './ReglAttribute';
|
||||
import ReglBuffer from './ReglBuffer';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-scene",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -23,12 +23,12 @@
|
|||
"author": "xiaoiver",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/l7-component": "^2.5.5",
|
||||
"@antv/l7-core": "^2.5.5",
|
||||
"@antv/l7-layers": "^2.5.5",
|
||||
"@antv/l7-maps": "^2.5.5",
|
||||
"@antv/l7-renderer": "^2.5.5",
|
||||
"@antv/l7-utils": "^2.5.5",
|
||||
"@antv/l7-component": "^2.5.8",
|
||||
"@antv/l7-core": "^2.5.8",
|
||||
"@antv/l7-layers": "^2.5.8",
|
||||
"@antv/l7-maps": "^2.5.8",
|
||||
"@antv/l7-renderer": "^2.5.8",
|
||||
"@antv/l7-utils": "^2.5.8",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"inversify": "^5.0.1",
|
||||
"mapbox-gl": "^1.2.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-source",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -26,8 +26,8 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@antv/async-hook": "^2.1.0",
|
||||
"@antv/l7-core": "^2.5.5",
|
||||
"@antv/l7-utils": "^2.5.5",
|
||||
"@antv/l7-core": "^2.5.8",
|
||||
"@antv/l7-utils": "^2.5.8",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@mapbox/geojson-rewind": "^0.4.0",
|
||||
"@turf/helpers": "^6.1.4",
|
||||
|
@ -38,6 +38,7 @@
|
|||
"eventemitter3": "^4.0.0",
|
||||
"inversify": "^5.0.1",
|
||||
"lodash": "^4.17.15",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"supercluster": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-three",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "three for L7 ",
|
||||
"keywords": [
|
||||
"3D",
|
||||
|
@ -44,9 +44,10 @@
|
|||
},
|
||||
"homepage": "https://github.com/antvis/L7#readme",
|
||||
"dependencies": {
|
||||
"@antv/l7": "^2.5.5",
|
||||
"@antv/l7": "^2.5.8",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"inversify": "^5.0.1",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rollup": "^2.3.3",
|
||||
"rollup-plugin-less": "^1.1.2"
|
||||
},
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { IMapService, IMercator, IRendererService, TYPES } from '@antv/l7';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import 'reflect-metadata';
|
||||
|
||||
import {
|
||||
AnimationMixer,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@antv/l7-utils",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.8",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
|
13
tslint.json
13
tslint.json
|
@ -15,13 +15,22 @@
|
|||
"jsx-double"
|
||||
],
|
||||
"no-bitwise": false,
|
||||
"no-console": [true, "log"],
|
||||
"object-literal-sort-keys": false,
|
||||
"no-implicit-dependencies": [true, "dev"]
|
||||
"no-implicit-dependencies": [
|
||||
true,
|
||||
"dev"
|
||||
]
|
||||
},
|
||||
"globals": {
|
||||
"AMap": true
|
||||
},
|
||||
"linterOptions": {
|
||||
"exclude": ["**/*.d.ts", "**/data/*.ts", "**/*.{test,story}.ts{,x}", "node_modules/**"]
|
||||
"exclude": [
|
||||
"**/*.d.ts",
|
||||
"**/data/*.ts",
|
||||
"**/*.{test,story}.ts{,x}",
|
||||
"node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue