mirror of https://gitee.com/antv-l7/antv-l7
commit
bfd7cbb70d
|
@ -1,10 +1,5 @@
|
|||
import { decodePickingColor, DOM, encodePickingColor } from '@antv/l7-utils';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import {
|
||||
IMapService,
|
||||
IRendererService,
|
||||
IShaderModuleService,
|
||||
} from '../../index';
|
||||
import { TYPES } from '../../types';
|
||||
import { IGlobalConfigService, ISceneConfig } from '../config/IConfigService';
|
||||
import {
|
||||
|
@ -16,6 +11,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()
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
import { inject, injectable } from 'inversify';
|
||||
import {
|
||||
IMapService,
|
||||
IRendererService,
|
||||
IShaderModuleService,
|
||||
} from '../../../index';
|
||||
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,10 @@
|
|||
import { inject, injectable } from 'inversify';
|
||||
import { camelCase, isNil, upperFirst } from 'lodash';
|
||||
import {
|
||||
gl,
|
||||
IModel,
|
||||
IRendererService,
|
||||
IShaderModuleService,
|
||||
} from '../../../index';
|
||||
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';
|
||||
|
|
|
@ -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})`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue