fix: 合并修改

This commit is contained in:
lzxue 2021-11-01 20:42:35 +08:00
commit 31ff59a963
7 changed files with 19 additions and 13 deletions

View File

@ -17,7 +17,7 @@ L7 目前支持 Control
#### option #### option
position: `string` 控件位置支持个方位 position: `string` 控件位置支持 8 个方位
- bottomright - bottomright
- topright - topright

View File

@ -492,6 +492,8 @@ scene.setPitch(pitch);
### setMapStatus 设置地图状态 ### setMapStatus 设置地图状态
可用来关闭地图的一些交互操作 可用来关闭地图的一些交互操作
可用来关闭地图的一些交互操作
参数 : 参数 :
```javascript ```javascript
@ -526,7 +528,7 @@ scene.fitBounds([
]); ]);
``` ```
### containerToLngLat ### containerToLngLat 画布坐标转经纬度
画布坐标转经纬度坐标 画布坐标转经纬度坐标
@ -537,17 +539,21 @@ scene.fitBounds([
scene.pixelToLngLat([10,10]); scene.pixelToLngLat([10,10]);
``` ```
### lngLatToContainer ### lngLatToContainer 经纬度转画布坐标
经纬度坐标转画布坐标 经纬度坐标转画布坐标
参数 : 参数 :
- lnglat 经纬度坐标 [lng,lat ] {array } - lnglat 经纬度坐标 [lng,lat ] {array }
``` ```
scene.lngLatToPixel([120,10]); scene.lngLatToPixel([120,10]);
``` ```
### pixelToLngLat
### pixelToLngLat 像素坐标转经纬度
像素坐标:不同级别下地图上某点的位置 像素坐标:不同级别下地图上某点的位置
地图像素坐标转经纬度坐标 地图像素坐标转经纬度坐标
@ -558,10 +564,12 @@ scene.lngLatToPixel([120,10]);
scene.pixelToLngLat([10,10]); scene.pixelToLngLat([10,10]);
``` ```
### lngLatToPixel ### lngLatToPixel 经纬度转像素坐标
经纬度坐标转像素坐标 经纬度坐标转像素坐标
参数 : 参数 :
- lnglat 经纬度坐标 [lng,lat ] {array } - lnglat 经纬度坐标 [lng,lat ] {array }
``` ```

View File

@ -36,15 +36,17 @@ scene.on('loaded', () => {
气泡图: pointLayer 气泡图: pointLayer
}; };
const layersControl = new Layers({ const layersControl = new Layers({
overlayers overlayers,
position: 'rightcenter'
}); });
scene.addControl(layersControl); scene.addControl(layersControl);
}); });
const zoomControl = new Zoom({ const zoomControl = new Zoom({
position: 'topright' position: 'rightcenter'
}); });
const scaleControl = new Scale({ const scaleControl = new Scale({
position: 'bottomright' position: 'bottomright'
}); });

View File

@ -68,9 +68,6 @@ export default class FeatureScalePlugin implements ILayerPlugin {
this.scaleOptions = layer.getScaleOptions(); this.scaleOptions = layer.getScaleOptions();
const attributes = styleAttributeService.getLayerStyleAttributes(); const attributes = styleAttributeService.getLayerStyleAttributes();
const { dataArray } = layer.getSource().data; const { dataArray } = layer.getSource().data;
// if (dataArray.length === 0) {
// return;
// }
this.caculateScalesForAttributes(attributes || [], dataArray); this.caculateScalesForAttributes(attributes || [], dataArray);
layer.layerModelNeedUpdate = true; layer.layerModelNeedUpdate = true;
return true; return true;

View File

@ -1,5 +1,4 @@
import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core'; import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core';
import Source from '@antv/l7-source';
import { encodePickingColor, rgb2arr } from '@antv/l7-utils'; import { encodePickingColor, rgb2arr } from '@antv/l7-utils';
import { injectable } from 'inversify'; import { injectable } from 'inversify';
import 'reflect-metadata'; import 'reflect-metadata';

View File

@ -384,7 +384,7 @@ export default class TextModel extends BaseModel {
const characterSet: string[] = []; const characterSet: string[] = [];
data.forEach((item: IEncodeFeature) => { data.forEach((item: IEncodeFeature) => {
let { shape = '' } = item; let { shape = '' } = item;
shape = shape.toString(); shape = `${shape}`;
if (characterSet.indexOf(shape) === -1) { if (characterSet.indexOf(shape) === -1) {
characterSet.push(shape); characterSet.push(shape);
} }

View File

@ -25,7 +25,7 @@ import { cloneDeep, isFunction, isString, mergeWith } from 'lodash';
// @ts-ignore // @ts-ignore
// tslint:disable-next-line:no-submodule-imports // tslint:disable-next-line:no-submodule-imports
import Supercluster from 'supercluster/dist/supercluster'; import Supercluster from 'supercluster/dist/supercluster';
import { getParser, getTransform } from './'; import { getParser, getTransform } from './factory';
import { cluster } from './transform/cluster'; import { cluster } from './transform/cluster';
import { statMap } from './utils/statistics'; import { statMap } from './utils/statistics';
import { getColumn } from './utils/util'; import { getColumn } from './utils/util';