Skip to content

Commit

Permalink
Merge branch 'master' into chore/l7plot-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
lvisei authored Aug 14, 2023
2 parents 2a11761 + af01f99 commit 4b999bf
Show file tree
Hide file tree
Showing 24 changed files with 122 additions and 86 deletions.
18 changes: 9 additions & 9 deletions dev-demos/features/line/demos/linedash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ export default () => {
});
scene.addLayer(layer);

setTimeout(() => {
console.log('update1111');
layer.style({
opacity:1,
lineType: 'dash',
dashArray: [5, 5]
});
scene.render();
},2000)
// setTimeout(() => {
// console.log('update1111');
// layer.style({
// opacity:1,
// // lineType: 'dash',
// dashArray: [5, 5]
// });
// scene.render();
// },2000)

});
});
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"registry": "https://registry.npmjs.org"
}
},
"version": "2.17.7",
"version": "2.17.8",
"npmClient": "yarn",
"useWorkspaces": true,
"publishConfig": {
Expand Down
10 changes: 5 additions & 5 deletions packages/component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/l7-component",
"version": "2.17.7",
"version": "2.17.8",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
Expand All @@ -26,8 +26,8 @@
"author": "lzxue",
"license": "ISC",
"dependencies": {
"@antv/l7-core": "2.17.7",
"@antv/l7-utils": "2.17.7",
"@antv/l7-core": "2.17.8",
"@antv/l7-utils": "2.17.8",
"@babel/runtime": "^7.7.7",
"eventemitter3": "^4.0.0",
"inversify": "^5.0.1",
Expand All @@ -36,8 +36,8 @@
"supercluster": "^7.0.0"
},
"devDependencies": {
"@antv/l7-layers": "2.17.7",
"@antv/l7-test-utils": "2.17.7",
"@antv/l7-layers": "2.17.8",
"@antv/l7-test-utils": "2.17.8",
"gcoord": "^0.3.2",
"less": "^4.1.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/l7-core",
"version": "2.17.7",
"version": "2.17.8",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
Expand All @@ -25,7 +25,7 @@
"license": "ISC",
"dependencies": {
"@antv/async-hook": "^2.2.9",
"@antv/l7-utils": "2.17.7",
"@antv/l7-utils": "2.17.8",
"@babel/runtime": "^7.7.7",
"@turf/helpers": "^6.1.4",
"ajv": "^6.10.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/services/config/warnInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface IWarnInfo {
}
const WarnInfo: IWarnInfo = {
MapToken:
'您正在使用 Demo 测试 Token, 生产环境务必自行注册 Token 确保服务稳定',
'您正在使用 Demo 测试 Token, 生产环境务必自行注册 Token 确保服务稳定 高德地图申请地址 https://lbs.amap.com/api/javascript-api/guide/abc/prepare Mapbox地图申请地址 https://docs.mapbox.com/help/glossary/access-token/',
SDK: '请确认引入了mapbox-gl api且在L7之前引入',
};

Expand Down
16 changes: 8 additions & 8 deletions packages/l7/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/l7",
"version": "2.17.7",
"version": "2.17.8",
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
"main": "lib/index.js",
"module": "es/index.js",
Expand All @@ -26,13 +26,13 @@
"author": "antv",
"license": "MIT",
"dependencies": {
"@antv/l7-component": "2.17.7",
"@antv/l7-core": "2.17.7",
"@antv/l7-layers": "2.17.7",
"@antv/l7-maps": "2.17.7",
"@antv/l7-scene": "2.17.7",
"@antv/l7-source": "2.17.7",
"@antv/l7-utils": "2.17.7",
"@antv/l7-component": "2.17.8",
"@antv/l7-core": "2.17.8",
"@antv/l7-layers": "2.17.8",
"@antv/l7-maps": "2.17.8",
"@antv/l7-scene": "2.17.8",
"@antv/l7-source": "2.17.8",
"@antv/l7-utils": "2.17.8",
"@babel/runtime": "^7.7.7"
},
"gitHead": "684ba4eb806a798713496d3fc0b4d1e17517dc31",
Expand Down
2 changes: 1 addition & 1 deletion packages/l7/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
const version = '2.17.7';
const version = '2.17.8';
export { version };
12 changes: 6 additions & 6 deletions packages/layers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/l7-layers",
"version": "2.17.7",
"version": "2.17.8",
"description": "L7's collection of built-in layers",
"main": "lib/index.js",
"module": "es/index.js",
Expand All @@ -27,10 +27,10 @@
"license": "ISC",
"dependencies": {
"@antv/async-hook": "^2.2.9",
"@antv/l7-core": "2.17.7",
"@antv/l7-maps": "2.17.7",
"@antv/l7-source": "2.17.7",
"@antv/l7-utils": "2.17.7",
"@antv/l7-core": "2.17.8",
"@antv/l7-maps": "2.17.8",
"@antv/l7-source": "2.17.8",
"@antv/l7-utils": "2.17.8",
"@babel/runtime": "^7.7.7",
"@mapbox/martini": "^0.2.0",
"@turf/clone": "^6.5.0",
Expand All @@ -53,7 +53,7 @@
"reflect-metadata": "^0.1.13"
},
"devDependencies": {
"@antv/l7-test-utils": "2.17.7",
"@antv/l7-test-utils": "2.17.8",
"@types/d3-array": "^2.0.0",
"@types/d3-color": "^1.2.2",
"@types/d3-interpolate": "1.1.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/layers/src/core/BaseLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ export default class BaseLayer<ChildLayerStyleOptions = {}>
if (
// 需要数据映射
[
this.enableShaderEncodeStyles,
...this.enableShaderEncodeStyles,
...this.enableDataEncodeStyles,
].includes(key) &&
isPlainObject(options[key]) &&
Expand Down
1 change: 1 addition & 0 deletions packages/layers/src/core/BaseModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ export default class BaseModel<ChildLayerStyleOptions = {}>
};
this.layer.enableShaderEncodeStyles.forEach((key) => {
if (!this.layer.encodeStyleAttribute[key]) {
// 没有设置样式映射
// @ts-ignore
const keyValue = this.layer.getLayerConfig()[key];

Expand Down
12 changes: 12 additions & 0 deletions packages/layers/src/tile/tileLayer/BaseLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,21 @@ export default class BaseTileLayer {
this.initedTileset = true;
}

// 图层不可见时,不触发加载瓦片
if (this.parent.isVisible() === false) {
return;
}

const { latLonBounds, zoom } = this.getCurrentView();
this.tilesetManager?.update(zoom, latLonBounds);
}

protected mapchange = () => {
// 图层不可见时,不触发加载瓦片
if (this.parent.isVisible() === false) {
return;
}

const { latLonBounds, zoom } = this.getCurrentView();

if (this.mapService.version === 'GAODE1.x') {
Expand All @@ -99,6 +110,7 @@ export default class BaseTileLayer {

this.tilesetManager?.throttleUpdate(zoom, latLonBounds);
};

protected getCurrentView() {
const bounds = this.mapService.getBounds();
const latLonBounds: [number, number, number, number] = [
Expand Down
4 changes: 2 additions & 2 deletions packages/map/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/l7-map",
"version": "2.17.7",
"version": "2.17.8",
"description": "l7 map",
"keywords": [],
"author": "thinkinggis <lzx199065@gmail.com>",
Expand Down Expand Up @@ -40,7 +40,7 @@
},
"homepage": "https://github.com/antvis/L7#readme",
"dependencies": {
"@antv/l7-utils": "2.17.7",
"@antv/l7-utils": "2.17.8",
"@babel/runtime": "^7.7.7",
"@mapbox/point-geometry": "^0.1.0",
"@mapbox/unitbezier": "^0.0.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/maps/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/l7-maps",
"version": "2.17.7",
"version": "2.17.8",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
Expand All @@ -27,9 +27,9 @@
"license": "ISC",
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@antv/l7-core": "2.17.7",
"@antv/l7-map": "2.17.7",
"@antv/l7-utils": "2.17.7",
"@antv/l7-core": "2.17.8",
"@antv/l7-map": "2.17.8",
"@antv/l7-utils": "2.17.8",
"@babel/runtime": "^7.7.7",
"@types/amap-js-api": "^1.4.6",
"@types/mapbox-gl": "^1.11.2",
Expand Down
12 changes: 6 additions & 6 deletions packages/mini/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/l7-mini",
"version": "2.17.7",
"version": "2.17.8",
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
"main": "lib/index.js",
"module": "es/index.js",
Expand All @@ -25,11 +25,11 @@
"author": "antv",
"license": "MIT",
"dependencies": {
"@antv/l7-core": "2.17.7",
"@antv/l7-layers": "2.17.7",
"@antv/l7-maps": "2.17.7",
"@antv/l7-scene": "2.17.7",
"@antv/l7-utils": "2.17.7",
"@antv/l7-core": "2.17.8",
"@antv/l7-layers": "2.17.8",
"@antv/l7-maps": "2.17.8",
"@antv/l7-scene": "2.17.8",
"@antv/l7-utils": "2.17.8",
"@babel/runtime": "^7.7.7"
},
"gitHead": "684ba4eb806a798713496d3fc0b4d1e17517dc31",
Expand Down
8 changes: 4 additions & 4 deletions packages/renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/l7-renderer",
"version": "2.17.7",
"version": "2.17.8",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
Expand All @@ -25,12 +25,12 @@
"author": "xiaoiver",
"license": "ISC",
"devDependencies": {
"@antv/l7-test-utils": "2.17.7",
"@antv/l7-test-utils": "2.17.8",
"gl": "^5.0.3"
},
"dependencies": {
"@antv/l7-core": "2.17.7",
"@antv/l7-utils": "2.17.7",
"@antv/l7-core": "2.17.8",
"@antv/l7-utils": "2.17.8",
"@babel/runtime": "^7.7.7",
"inversify": "^5.0.1",
"l7regl": "^0.0.20",
Expand Down
16 changes: 8 additions & 8 deletions packages/scene/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/l7-scene",
"version": "2.17.7",
"version": "2.17.8",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
Expand All @@ -23,20 +23,20 @@
"author": "xiaoiver",
"license": "ISC",
"dependencies": {
"@antv/l7-component": "2.17.7",
"@antv/l7-core": "2.17.7",
"@antv/l7-layers": "2.17.7",
"@antv/l7-maps": "2.17.7",
"@antv/l7-renderer": "2.17.7",
"@antv/l7-utils": "2.17.7",
"@antv/l7-component": "2.17.8",
"@antv/l7-core": "2.17.8",
"@antv/l7-layers": "2.17.8",
"@antv/l7-maps": "2.17.8",
"@antv/l7-renderer": "2.17.8",
"@antv/l7-utils": "2.17.8",
"@babel/runtime": "^7.7.7",
"eventemitter3": "^4.0.7",
"inversify": "^5.0.1",
"mapbox-gl": "^1.2.1",
"reflect-metadata": "^0.1.13"
},
"devDependencies": {
"@antv/l7-test-utils": "2.17.7"
"@antv/l7-test-utils": "2.17.8"
},
"gitHead": "684ba4eb806a798713496d3fc0b4d1e17517dc31",
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/site/docs/api/map/map.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ L7 在内部解决了不同地图底图之间差异,同时 L7 层面统一管

- Map 独立地图引擎,不需要底图、或者加载地图瓦片服务,不需要 Token

- 高德地图 国内业务场景 合规中国地图 从 2.11.0 版本起 GaodeMap 默认指向 高德 2.0 版本需要注册 Token
- 高德地图 GaodeMap 默认指向 [Token](https://lbs.amap.com/api/javascript-api/guide/abc/prepare)

- MapBox 国际业务, 需要注册 oken
- MapBox 国际业务, 需要注册 [Token]()

### import

Expand Down
36 changes: 21 additions & 15 deletions packages/site/docs/api/point_layer/style.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ layer.style({
| ------- | -------- | ------------ | ------ |
| opacity | `number` | 图形的透明度 | `1` |

<embed src="@/docs/common/layer/style_encode.md"></embed>


### 2D shape

`shape` 为平面图形、如三角形、正方等。
Expand Down Expand Up @@ -110,21 +113,24 @@ interface IOpcityLinear = {

- [text](/api/point_layer/shape#shapefield-string-text)

| style | 类型 | 描述 | 默认值 |
| ---------------- | ----------------------------------------------- | -------------------------- | ------------ |
| stroke | `string` | 图形边框颜色 | `#fff` |
| strokeWidth | `number` | 图形边框颜色 | `0` |
| textOffset | `[number, number]` | 文字的偏移 | `[0, 0]` |
| textAnchor | [anchorType](/api/point_layer/style#anchortype) | 文字对齐锚点 `text` | `center` |
| spacing | `number` | 文字间隔 | `2` |
| padding | `number` | 文字内边框宽度 | `2` |
| halo | `number` | 文字边缘光晕宽度 | `0.5` |
| gamma | `number` | 文字的颜色参数 | `2` |
| fontWeight | `string` | 文字的大小 | `400` |
| fontFamily | [font](/api/point_layer/style#font) | 字体 | `sans-serif` |
| textAllowOverlap | `boolean` | 文字是否允许覆盖 | `false` |
| raisingHeight | `number` | 抬升高度 | `0` |
| heightfixed | `boolean` | 抬升高度是否随 `zoom` 变化 | `false` |
| style | 类型 | 描述 | 是否支持数据映射 | 默认值 |
| ---------------- | ----------------------------------------------- | --------------------------| --------- | ------------ |
| opacity | `number` | 透明度 ||`#fff` |
| stroke | `string` | 图形边框颜色 ||`#fff` |
| strokeWidth | `number` | 图形边框颜色 ||`0` |
| textOffset | `[number, number]` | 文字的偏移 ||`[0, 0]` |
| textAnchor | [anchorType](/api/point_layer/style#anchortype) | 文字对齐锚点 `text` ||`center` |
| spacing | `number` | 文字间隔 ||`2` |
| padding | `number` | 文字内边框宽度 ||`2` |
| halo | `number` | 文字边缘光晕宽度 ||`0.5` |
| gamma | `number` | 文字的颜色参数 ||`2` |
| fontWeight | `string` | 文字的大小 ||`400` |
| fontFamily | [font](/api/point_layer/style#font) | 字体 ||`sans-serif` |
| textAllowOverlap | `boolean` | 文字是否允许覆盖 ||`false` |
| raisingHeight | `number` | 抬升高度 ||`0` |
| heightfixed | `boolean` | 抬升高度是否随 `zoom` 变化 ||`false` |



#### anchorType

Expand Down
Loading

0 comments on commit 4b999bf

Please sign in to comment.