fix(layer): point layer图片纹理浮点数据精度问题

This commit is contained in:
yy 2020-08-10 10:44:28 +08:00 committed by yy
commit 429172c5f2
1079 changed files with 246717 additions and 0 deletions

16
.editorconfig Normal file
View File

@ -0,0 +1,16 @@
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab

39
.eslintrc Executable file
View File

@ -0,0 +1,39 @@
{
"extends": [
"eslint-config-egg"
],
"globals": {
"AMap": true,
"L7": true,
},
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module"
},
"plugins": [
"html"
],
"rules": {
"no-bitwise": [
0
],
"experimentalDecorators": [
0
],
"comma-dangle": [
"error",
"never"
],
"jsdoc/require-param": 0,
"linebreak-style": [
0
],
"indent": ["error", 2, {
"ignoredNodes": ["TemplateLiteral"]
}]
}
}

99
.github/CONTRIBUTING.md vendored Normal file
View File

@ -0,0 +1,99 @@
# Contributing to L7
👍🎉 欢迎向 L7 贡献代码! 🎉👍
## 前置依赖安装
### 安装 Yarn
由于使用了 Yarn workspace首先需要安装 Yarnhttps://yarnpkg.com/en/docs/install#windows-stable
### Windows 环境配置
[L7 测试方案](https://github.com/antvis/L7/blob/master/dev-docs/%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95%E6%96%B9%E6%A1%88.md)依赖 headless-gl其中需要 node-gyp [编译本地依赖](https://github.com/nodejs/node-gyp#on-windows)。
1. 首先以管理员身份启动 PowerShell
2. 运行 `npm install --global --production windows-build-tools`,安装 Microsoft's windows-build-tools
安装过程中其他问题[详见](https://github.com/antvis/L7/issues/101)。
## 安装依赖
安装依赖并完成 Yarn workspace 初始化:
```bash
yarn install
```
### Windows
```bash
copy node_modules/gl/deps/windows/dll/x64/*.dll c:\windows\system32
```
## 运行 DEMO
启动各个 package 代码变更监听:
```bash
yarn watch
```
启动 Storybook会自动打开 `http://localhost:6006/`
```bash
yarn storybook
```
## 运行测试
运行单元测试:
```bash
yarn test
```
运行单元测试并查看代码覆盖率:
```bash
yarn coveralls
```
## 添加 Lerna package
添加一个新的 lerna package
```bash
lerna create my-pack -y
```
将 ui-lib 作为 my-pack 的依赖:
```bash
yarn workspace my-pack add ui-lib/1.0.0
```
将 lodash 添加为所有 package 的依赖(不包含root
```bash
yarn workspaces run add lodash
```
将 typescript 设置为 root 的开发依赖
```bash
yarn add -W -D typescript jest
```
## 提交代码
代替 `git commit` 提交:
```bash
yarn commit
```
## 发布
### 设置版本号
```bash
yarn run version:prerelease
```
设置完成后需要commit一下代码
### 发布
yarn run release

97
.github/CONTRIBUTING_ENGLISH.md vendored Normal file
View File

@ -0,0 +1,97 @@
# Contributing to L7
👍🎉 Welcome to contribute code to L7! 🎉👍
## Pre-installation
### Install Yarn
Since Yarn workspace is used, Yarn needs to be installed first: https://yarnpkg.com/en/docs/install#windows-stable
### Windows environment configuration
[The L7 test solution](https://github.com/antvis/L7/blob/master/dev-docs/%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95%E6%96%B9%E6%A1%88.md) relies on headless-gl, which requires node-gyp [to compile local dependencies](https://github.com/nodejs/node-gyp#on-windows).
1. Start PowerShell as an administrator
2. Run `npm install --global --production windows-build-tools` to install Microsoft's windows-build-tools
See [other issues](https://github.com/antvis/L7/issues/101) during installation.
## Install dependencies
Install dependencies and complete Yarn workspace initialization:
```bash
yarn install
```
### Windows
```bash
copy node_modules/gl/deps/windows/dll/x64/*.dll c:\windows\system32
```
## Run DEMO
Start each package code change monitoring:
```bash
yarn watch
```
Start Storybook, it will automatically open `http://localhost:6006/`:
```bash
yarn storybook
```
## Run test
Run unit tests:
```bash
yarn test
```
Run unit tests and view code coverage:
```bash
yarn coveralls
```
## Add Lerna package
Add a new lerna package:
```bash
lerna create my-pack -y
```
Use ui-lib as a dependency of my-pack:
```bash
yarn workspace my-pack add ui-lib/1.0.0
```
Add lodash as a dependency of all packages (excluding root)
```bash
yarn workspaces run add lodash
```
Set typescript to root development dependency:
```bash
yarn add -W -D typescript jest
```
## Submit code
Instead of `git commit`:
```bash
yarn commit
```
## release
### Set the version number
```bash
yarn run version:prerelease
```
After setting, you need to commit the code
### release
yarn run release

24
.github/ISSUE_TEMPLATE.md vendored Executable file
View File

@ -0,0 +1,24 @@
<!--
Thank you for reporting an issue.
1. It's RECOMMENDED to submit PR for typo or tiny bug fix.
2. If this's a FEATURE request, please provide: details, pseudo codes if necessary.
3. If this's a BUG, please provide: course repetition, error log and configuration. Fill in as much of the template below as you're able.
4. It will be nice to use to provide a CodePen Link which can reproduce the issue, we provide a CodePen template [g2-github-issue](https://codepen.io/leungwensen/pen/WXJgox).
感谢您向我们反馈问题。
1. 提交问题前,请先阅读 https://antv.alipay.com/zh-cn/g2/3.x/index.html 上的文档。
2. 我们推荐如果是小问题(错别字修改,小的 bug fix直接提交 PR。
3. 如果是一个新需求,请提供:详细需求描述,最好是有伪代码实现。
4. 如果是一个 BUG请提供复现步骤错误日志以及相关配置并尽量填写下面的模板中的条目。
5. 如果可以,请提供尽可能精简的 CodePen 链接,可使用 CodePen 模板 https://codepen.io/leungwensen/pen/WXJgox方便我们排查问题。
6. 扩展阅读:[如何向开源项目提交无法解答的问题](https://zhuanlan.zhihu.com/p/25795393)
-->
* **L7 Version**:
* **Platform**:
* **Mini Showcase(like screenshots)**:
* **CodePen Link**:
<!-- Enter your issue details below this comment. -->

19
.github/PULL_REQUEST_TEMPLATE.md vendored Executable file
View File

@ -0,0 +1,19 @@
<!--
Thank you for your pull request. Please review below requirements.
Bug fixes and new features should include tests and possibly benchmarks.
Contributors guide: https://github.com/antvis/L7/blob/master/.github/CONTRIBUTING.md
感谢您贡献代码。请确认下列 checklist 的完成情况。
Bug 修复和新功能必须包含测试,必要时请附上性能测试。
Contributors guide: https://github.com/antvis/L7/blob/master/.github/CONTRIBUTING.md
-->
##### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
- [ ] `npm test` passes
- [ ] tests and/or benchmarks are included
- [ ] commit message follows commit guidelines
##### Description of change
<!-- Provide a description of the change below this comment. -->

17
.github/workflows/gitleaks.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: gitleaks
on: [push,pull_request]
jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '1'
- name: wget
uses: wei/wget@v1
with:
args: -O .gitleaks.toml https://raw.githubusercontent.com/ycjcl868/gitleaks/master/.gitleaks.toml
- name: gitleaks-action
uses: zricethezav/gitleaks-action@master

39
.github/workflows/mirror.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: 🤖 Sync to Gitee Mirror
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🔁 Sync to Gitee
uses: wearerequired/git-mirror-action@master
env:
# 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
with:
# 注意替换为你的 GitHub 源仓库地址
source-repo: 'git@github.com:antvis/L7.git'
# 注意替换为你的 Gitee 目标仓库地址
destination-repo: 'git@gitee.com:antv-l7/antv-l7.git'
- name: 🔁 Sync to Gitee
uses: wearerequired/git-mirror-action@master
env:
# 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
with:
# 注意替换为你的 GitHub 源仓库地址
source-repo: 'git@github.com:antvis/L7.git'
# 注意替换为你的 Gitee 目标仓库地址
destination-repo: 'git@gitee.com:antv/L7.git'
- name: ✅ Build Gitee Pages
uses: yanglbme/gitee-pages-action@master
with:
# 注意替换为你的 Gitee 用户名
gitee-username: afc163
# 注意在 Settings->Secrets 配置 GITEE_PASSWORD
gitee-password: ${{ secrets.GITEE_PASSWORD }}
# 注意替换为你的 Gitee 仓库
gitee-repo: antv-l7/antv-l7

83
.gitignore vendored Normal file
View File

@ -0,0 +1,83 @@
# Created by https://www.gitignore.io/api/node
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
# typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# End of https://www.gitignore.io/api/node
lib/
dist/
es/
.DS_Store
public
.cache
package-lock.json
git_log.sh
node_modules/
packages/l7/package_bak.json
stories/Test
packages/draw/node_modules/@turf
packages/district/src/data

124
.gitleaks.toml Normal file
View File

@ -0,0 +1,124 @@
title = "gitleaks config"
[[rules]]
description = "AWS Manager ID"
regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
tags = ["key", "AWS"]
[[rules]]
description = "AWS Secret Key"
regex = '''(?i)aws(.{0,20})?(?-i)['\"][0-9a-zA-Z\/+]{40}['\"]'''
tags = ["key", "AWS"]
[[rules]]
description = "AWS MWS key"
regex = '''amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
tags = ["key", "AWS", "MWS"]
[[rules]]
description = "Facebook Secret Key"
regex = '''(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}['\"]'''
tags = ["key", "Facebook"]
[[rules]]
description = "Facebook Client ID"
regex = '''(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}['\"]'''
tags = ["key", "Facebook"]
[[rules]]
description = "Twitter Secret Key"
regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{35,44}['\"]'''
tags = ["key", "Twitter"]
[[rules]]
description = "Twitter Client ID"
regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{18,25}['\"]'''
tags = ["client", "Twitter"]
[[rules]]
description = "Github"
regex = '''(?i)github(.{0,20})?(?-i)['\"][0-9a-zA-Z]{35,40}['\"]'''
tags = ["key", "Github"]
[[rules]]
description = "Github Token"
regex = '''[0-9a-zA-Z]{35,40}'''
tags = ["key", "Github Token"]
[[rules]]
description = "Alibaba"
regex = '''(alibaba|antfin)-inc'''
tags = ["key", "Alibaba"]
[[rules]]
description = "antfin"
regex = '''(?i)antfin(.{0,20})?(?-i)['\"][0-9a-zA-Z]{35,40}['\"]'''
tags = ["key", "Antfin"]
[[rules]]
description = "LinkedIn Client ID"
regex = '''(?i)linkedin(.{0,20})?(?-i)['\"][0-9a-z]{12}['\"]'''
tags = ["client", "LinkedIn"]
[[rules]]
description = "LinkedIn Secret Key"
regex = '''(?i)linkedin(.{0,20})?['\"][0-9a-z]{16}['\"]'''
tags = ["secret", "LinkedIn"]
[[rules]]
description = "Slack"
regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
tags = ["key", "Slack"]
[[rules]]
description = "Asymmetric Private Key"
regex = '''-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----'''
tags = ["key", "AsymmetricPrivateKey"]
[[rules]]
description = "Public Key"
regex = '''ssh-rsa'''
tags = ["keys", "public key"]
[[rules]]
description = "Gitlab Key"
regex = '''privateToken|private-token'''
tags = ["keys", "Gitlab"]
[[rules]]
description = "Generic Credential"
regex = '''(?i)(api_key|apikey|secret)(.{0,20})?['|"][0-9a-zA-Z]{16,45}['|"]'''
tags = ["key", "API", "generic"]
[[rules]]
description = "Google API key"
regex = '''AIza[0-9A-Za-z\\-_]{35}'''
tags = ["key", "Google"]
[[rules]]
description = "Heroku API key"
regex = '''(?i)heroku(.{0,20})?['"][0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}['"]'''
tags = ["key", "Heroku"]
[[rules]]
description = "MailChimp API key"
regex = '''(?i)(mailchimp|mc)(.{0,20})?['"][0-9a-f]{32}-us[0-9]{1,2}['"]'''
tags = ["key", "Mailchimp"]
[[rules]]
description = "Mailgun API key"
regex = '''(?i)(mailgun|mg)(.{0,20})?['"][0-9a-z]{32}['"]'''
tags = ["key", "Mailgun"]
[[rules]]
description = "PayPal Braintree access token"
regex = '''access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}'''
tags = ["key", "Paypal"]
[[rules]]
description = "Picatic API key"
regex = '''sk_live_[0-9a-z]{32}'''
tags = ["key", "Picatic"]
[[rules]]
description = "SendGrid API Key"
regex = '''SG\.[\w_]{16,32}\.[\w_]{16,64}'''
tags = ["key", "SendGrid"]
[[rules]]
description = "Slack Webhook"
regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}'''
tags = ["key", "slack"]
[[rules]]
description = "Stripe API key"
regex = '''(?i)stripe(.{0,20})?['\"][sk|rk]_live_[0-9a-zA-Z]{24}'''
tags = ["key", "Stripe"]
[[rules]]
description = "Square access token"
regex = '''sq0atp-[0-9A-Za-z\-_]{22}'''
tags = ["key", "square"]
[[rules]]
description = "Square OAuth secret"
regex = '''sq0csp-[0-9A-Za-z\\-_]{43}'''
tags = ["key", "square"]
[[rules]]
description = "Twilio API key"
regex = '''(?i)twilio(.{0,20})?['\"][0-9a-f]{32}['\"]'''
tags = ["key", "twilio"]
[whitelist]
description = "Whitelisted files"
file = '''(^\.?gitleaks.toml$|(.*?)(jpg|gif|doc|pdf|bin)|package-lock\.json$)'''

7
.prettierrc Normal file
View File

@ -0,0 +1,7 @@
{
"printWidth": 80,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always"
}

3
.storybook/addons.ts Normal file
View File

@ -0,0 +1,3 @@
// import '@storybook/addon-actions/register';
// import '@storybook/addon-notes/register';
// import '@storybook/addon-storysource/register';

27500
.storybook/antd.css Normal file

File diff suppressed because it is too large Load Diff

30
.storybook/config.ts Normal file
View File

@ -0,0 +1,30 @@
// tslint:disable-next-line:no-submodule-imports
import { addParameters, configure } from '@storybook/react';
import { create } from '@storybook/theming';
addParameters({
options: {
isFullscreen: false,
showAddonsPanel: false,
showSearchBox: false,
panelPosition: 'bottom',
hierarchySeparator: /\./,
// hierarchyRootSeparator: /\|/,
enableShortcuts: true,
theme: create({
base: 'light',
brandTitle: 'L7 for new architecture',
brandUrl: 'https://github.com/antvis/L7',
gridCellSize: 12,
}),
},
});
// automatically import all files ending in *.stories.tsx
const req = require.context('../stories', true, /\.stories\.tsx$/);
function loadStories() {
req.keys().forEach(req);
}
configure(loadStories, module);

7
.storybook/iframe.scss Normal file
View File

@ -0,0 +1,7 @@
html, body {
margin: 0;
}
.dg.ac {
z-index: 999 !important;
}

13
.storybook/main.js Normal file
View File

@ -0,0 +1,13 @@
const path = require('path');
// Export a function. Accept the base config as the only param.
module.exports = {
webpackFinal: async (config, { configType }) => {
config.module.rules.push({
test: /\.stories\**.svg$/,
loader: 'svg-inline-loader'
}
);
return config;
},
};

View File

@ -0,0 +1,46 @@
const path = require("path");
module.exports = ({ config }) => {
// config.module.rules.push({
// test: /\.glsl$/,
// loader: 'raw-loader'
// });
// config.module.rules.push({
// test: /\.worker\.(js|ts)$/,
// use: {
// loader: 'worker-loader',
// options: { inline: true, fallback: false }
// }
// });
config.module.rules =[];
config.module.rules.push(
{
test: /\.(ts|tsx)$/,
loader: require.resolve('awesome-typescript-loader'),
});
config.module.rules.push(
{
test: /.css$/,
use: ["style-loader", "css-loader", 'sass-loader'],
enforce: 'pre',
},
{
test: /\.stories\.svg$/,
loader: 'svg-inline-loader'
}
);
config.resolve.alias = {
'@antv/l7-district': path.resolve(__dirname, '../packages/boundary/src'),
}
config.resolve.extensions.push('.ts', '.tsx', 'css', '.js', '.glsl');
return config;
};

7
.stylelintrc Normal file
View File

@ -0,0 +1,7 @@
{
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-standard",
"stylelint-config-styled-components"
]
}

39
.travis.yml Normal file
View File

@ -0,0 +1,39 @@
language: node_js
os: linux
sudo: required
dist: trusty
addons:
apt:
packages:
- mesa-utils
- xvfb
- libgl1-mesa-dri
- libglapi-mesa
- libosmesa6
node_js:
- '12'
env:
- NODE_ENV=test
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- yarn install
before_script:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
script:
- yarn lint
- yarn test
- yarn build
- yarn bundle
notifications:
webhooks: ${dingdingWebhooks}

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
}

2
.yarnrc Normal file
View File

@ -0,0 +1,2 @@
env:
SASS_BINARY_SITE "https://npm.taobao.org/mirrors/node-sass/"

794
CHANGELOG.md Normal file
View File

@ -0,0 +1,794 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.12](https://github.com/antvis/L7/compare/v2.1.11...v2.1.12) (2020-04-10)
### Bug Fixes
- 采用非偏移坐标系坐标系解决高德地图中国区域抖动的问题 ([124a1d2](https://github.com/antvis/L7/commit/124a1d27aa97c9a6af1de6d041785c420f02ce4c))
- **heatmap:** 修复热力图某些设备上黑色 fix [#278](https://github.com/antvis/L7/issues/278) ([b8f5899](https://github.com/antvis/L7/commit/b8f58992d1fce38fdaac9d82ebfbec14e35298bd))
- 绘制组件高德地图 mousedown 事件不能监听的问题 ([1eb3313](https://github.com/antvis/L7/commit/1eb3313919b2c7c9162bee70a249846b897ef4b4))
## [2.1.11](https://github.com/antvis/L7/compare/v2.1.10...v2.1.11) (2020-04-07)
### Bug Fixes
- marker event ([ce6eefd](https://github.com/antvis/L7/commit/ce6eefdeb87935f48d7ca2779837270f1498f3a5))
## [2.1.8](https://github.com/antvis/L7/compare/v2.1.7...v2.1.8) (2020-03-26)
### Bug Fixes
- 3d 热力图抖动问题 fixes [#138](https://github.com/antvis/L7/issues/138) [#263](https://github.com/antvis/L7/issues/263) ([d56e8d6](https://github.com/antvis/L7/commit/d56e8d6205942ca12fa7ac3dfd226aecbb850ed2))
- 拾取 invalid x offset ([8282007](https://github.com/antvis/L7/commit/82820077f40998e156337b266623309eff6b2d60))
## [2.1.7](https://github.com/antvis/L7/compare/v2.1.6...v2.1.7) (2020-03-26)
### Bug Fixes
- 修复颜色纹理取色问题 & 图片标注默认颜色问题 ([9d6b198](https://github.com/antvis/L7/commit/9d6b198f76b44c55ce0a094c6649c9e4130a398b))
## [2.1.5](https://github.com/antvis/L7/compare/v2.1.4...v2.1.5) (2020-03-20)
### Bug Fixes
- observerable 打包问题 ([412e2a8](https://github.com/antvis/L7/commit/412e2a83f78a9a448f0a5b65ccaf2ea97f78b47a))
- picking ([d6c6694](https://github.com/antvis/L7/commit/d6c66941323fb21e6810e1d72d5b43e40867be71))
## [2.1.3](https://github.com/antvis/L7/compare/v2.0.36...v2.1.3) (2020-03-17)
### Bug Fixes
- fix build layer opactiy ([5a58ab8](https://github.com/antvis/L7/commit/5a58ab8f86ec969ca384e984784355c2c91b1a47))
- fix build layer opactiy ([0ccca2b](https://github.com/antvis/L7/commit/0ccca2b383964e058ed87cc980c57c9c67917cf5))
- ios 12 点击事件问题 & regl 版本锁定 ([ad52e8e](https://github.com/antvis/L7/commit/ad52e8e8fde4a7b4b3e16d86a6035bd7c07fb80c))
- ios touchstart && double touch ([4fc3a11](https://github.com/antvis/L7/commit/4fc3a11de953918a9f5ba13d767c00429d1711cd))
- mapbox 光照问题 ([20d2a6d](https://github.com/antvis/L7/commit/20d2a6d8b803ca3ad87cc1ef69a59d1e3d348cef))
- mapbox 光照问题 ([88aa585](https://github.com/antvis/L7/commit/88aa585c2a8339f6eb7518a92e5544733ba356e3))
- update demo style ([c1960b5](https://github.com/antvis/L7/commit/c1960b50ef3e3d3aed6eb0f1934515678c2dbde8))
- 图层不可见,取消拾取 ([f4abe6a](https://github.com/antvis/L7/commit/f4abe6a6b91d9d568573018ed4cad6cf01c592d3))
## [2.1.2](https://github.com/antvis/L7/compare/v2.0.36...v2.1.2) (2020-03-15)
### Bug Fixes
- ios 12 点击事件问题 & regl 版本锁定 ([ad52e8e](https://github.com/antvis/L7/commit/ad52e8e8fde4a7b4b3e16d86a6035bd7c07fb80c))
- ios touchstart && double touch ([4fc3a11](https://github.com/antvis/L7/commit/4fc3a11de953918a9f5ba13d767c00429d1711cd))
- mapbox 光照问题 ([20d2a6d](https://github.com/antvis/L7/commit/20d2a6d8b803ca3ad87cc1ef69a59d1e3d348cef))
- mapbox 光照问题 ([88aa585](https://github.com/antvis/L7/commit/88aa585c2a8339f6eb7518a92e5544733ba356e3))
- update demo style ([c1960b5](https://github.com/antvis/L7/commit/c1960b50ef3e3d3aed6eb0f1934515678c2dbde8))
- 图层不可见,取消拾取 ([f4abe6a](https://github.com/antvis/L7/commit/f4abe6a6b91d9d568573018ed4cad6cf01c592d3))
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
### Bug Fixes
- ios 12 点击事件问题 & regl 版本锁定 ([ad52e8e](https://github.com/antvis/L7/commit/ad52e8e8fde4a7b4b3e16d86a6035bd7c07fb80c))
- mapbox 光照问题 ([20d2a6d](https://github.com/antvis/L7/commit/20d2a6d8b803ca3ad87cc1ef69a59d1e3d348cef))
- mapbox 光照问题 ([88aa585](https://github.com/antvis/L7/commit/88aa585c2a8339f6eb7518a92e5544733ba356e3))
- update demo style ([c1960b5](https://github.com/antvis/L7/commit/c1960b50ef3e3d3aed6eb0f1934515678c2dbde8))
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)
### Bug Fixes
- fix map reference ([79e16f5](https://github.com/antvis/L7/commit/79e16f5393c6c31cc088e946dc865cdddfde9b73))
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
### Bug Fixes
- **pointlayer:** point amimate ([fd66d90](https://github.com/antvis/L7/commit/fd66d90c1dad1925d1b8a3c99e89172a16bb9f60))
- rollup plugin ([2e6fc51](https://github.com/antvis/L7/commit/2e6fc512f918c637dec6009d99157a8941b3b7fb))
- **package:** fix package fsevents version ([f1ff9d7](https://github.com/antvis/L7/commit/f1ff9d7afeecadf42409f133a165a5d570046841))
- **package:** fix package fsevents version ([1b856b2](https://github.com/antvis/L7/commit/1b856b2279d13d7837fe41eae363db1d706a5357))
- animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
- **doc:** add Scale example ([5e49ff2](https://github.com/antvis/L7/commit/5e49ff276d75980f12e7af61f712fbd1fa7f33f9))
- layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
- layer style storkeColor->stroke ([ac8477b](https://github.com/antvis/L7/commit/ac8477bb44e861df2f5d0a0a2b06bd5795054c3b))
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
- 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- add raster layer ([2b28380](https://github.com/antvis/L7/commit/2b2838015198b8586b0c30fdc154116252a76f29))
- point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
- polygon 支持 text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
- **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
- **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
- **layer:** pointLayer add text model ([20ad754](https://github.com/antvis/L7/commit/20ad7540974fdf0a6e902e2ea3700dcd5cf28d1d))
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
### Bug Fixes
- **pointlayer:** point amimate ([fd66d90](https://github.com/antvis/L7/commit/fd66d90c1dad1925d1b8a3c99e89172a16bb9f60))
- rollup plugin ([2e6fc51](https://github.com/antvis/L7/commit/2e6fc512f918c637dec6009d99157a8941b3b7fb))
- **package:** fix package fsevents version ([f1ff9d7](https://github.com/antvis/L7/commit/f1ff9d7afeecadf42409f133a165a5d570046841))
- **package:** fix package fsevents version ([1b856b2](https://github.com/antvis/L7/commit/1b856b2279d13d7837fe41eae363db1d706a5357))
- animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
- **doc:** add Scale example ([5e49ff2](https://github.com/antvis/L7/commit/5e49ff276d75980f12e7af61f712fbd1fa7f33f9))
- layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
- layer style storkeColor->stroke ([ac8477b](https://github.com/antvis/L7/commit/ac8477bb44e861df2f5d0a0a2b06bd5795054c3b))
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
- 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
- polygon 支持 text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
- **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
- **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
- **layer:** pointLayer add text model ([20ad754](https://github.com/antvis/L7/commit/20ad7540974fdf0a6e902e2ea3700dcd5cf28d1d))
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
### Bug Fixes
- rollup plugin ([2e6fc51](https://github.com/antvis/L7/commit/2e6fc512f918c637dec6009d99157a8941b3b7fb))
- **package:** fix package fsevents version ([f1ff9d7](https://github.com/antvis/L7/commit/f1ff9d7afeecadf42409f133a165a5d570046841))
- **package:** fix package fsevents version ([1b856b2](https://github.com/antvis/L7/commit/1b856b2279d13d7837fe41eae363db1d706a5357))
- animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
- **doc:** add Scale example ([5e49ff2](https://github.com/antvis/L7/commit/5e49ff276d75980f12e7af61f712fbd1fa7f33f9))
- layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
- layer style storkeColor->stroke ([ac8477b](https://github.com/antvis/L7/commit/ac8477bb44e861df2f5d0a0a2b06bd5795054c3b))
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
- 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
- polygon 支持 text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
- **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
- **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
- **layer:** pointLayer add text model ([20ad754](https://github.com/antvis/L7/commit/20ad7540974fdf0a6e902e2ea3700dcd5cf28d1d))
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
### Bug Fixes
- rollup plugin ([2e6fc51](https://github.com/antvis/L7/commit/2e6fc512f918c637dec6009d99157a8941b3b7fb))
- **package:** fix package fsevents version ([f1ff9d7](https://github.com/antvis/L7/commit/f1ff9d7afeecadf42409f133a165a5d570046841))
- **package:** fix package fsevents version ([1b856b2](https://github.com/antvis/L7/commit/1b856b2279d13d7837fe41eae363db1d706a5357))
- animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
- **doc:** add Scale example ([5e49ff2](https://github.com/antvis/L7/commit/5e49ff276d75980f12e7af61f712fbd1fa7f33f9))
- layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
- layer style storkeColor->stroke ([ac8477b](https://github.com/antvis/L7/commit/ac8477bb44e861df2f5d0a0a2b06bd5795054c3b))
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
- 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
- polygon 支持 text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
- **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
- **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
- **layer:** pointLayer add text model ([20ad754](https://github.com/antvis/L7/commit/20ad7540974fdf0a6e902e2ea3700dcd5cf28d1d))
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
### Bug Fixes
- **package:** fix package fsevents version ([f1ff9d7](https://github.com/antvis/L7/commit/f1ff9d7afeecadf42409f133a165a5d570046841))
- **package:** fix package fsevents version ([1b856b2](https://github.com/antvis/L7/commit/1b856b2279d13d7837fe41eae363db1d706a5357))
- animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
- **doc:** add Scale example ([5e49ff2](https://github.com/antvis/L7/commit/5e49ff276d75980f12e7af61f712fbd1fa7f33f9))
- layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
- layer style storkeColor->stroke ([ac8477b](https://github.com/antvis/L7/commit/ac8477bb44e861df2f5d0a0a2b06bd5795054c3b))
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
- polygon 支持 text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
- **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
- **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
- **layer:** pointLayer add text model ([20ad754](https://github.com/antvis/L7/commit/20ad7540974fdf0a6e902e2ea3700dcd5cf28d1d))
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
# [2.0.0-beta.25](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.25) (2019-12-27)
### Bug Fixes
- **doc:** add Scale example ([5e49ff2](https://github.com/antvis/L7/commit/5e49ff276d75980f12e7af61f712fbd1fa7f33f9))
- 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
- layer style storkeColor->stroke ([ac8477b](https://github.com/antvis/L7/commit/ac8477bb44e861df2f5d0a0a2b06bd5795054c3b))
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
- **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
- **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
- **layer:** pointLayer add text model ([20ad754](https://github.com/antvis/L7/commit/20ad7540974fdf0a6e902e2ea3700dcd5cf28d1d))
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
# [2.0.0-beta.24](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.24) (2019-12-23)### Bug Fixes
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
# [2.0.0-beta.23](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.23) (2019-12-23)
### Bug Fixes
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
# [2.0.0-beta.21](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.21) (2019-12-18)
### Bug Fixes
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
# [2.0.0-beta.20](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.20) (2019-12-12)
### Bug Fixes
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
# [2.0.0-beta.19](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.19) (2019-12-08)
### Bug Fixes
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
# [2.0.0-beta.18](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.18) (2019-12-08)
### Bug Fixes
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
# [2.0.0-beta.17](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.17) (2019-12-08)
### Bug Fixes
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
### Features
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
# [2.0.0-beta.16](https://github.com/antvis/L7/compare/v2.0.0-beta.15...v2.0.0-beta.16) (2019-11-29)
**Note:** Version bump only for package L7
# [2.0.0-beta.15](https://github.com/antvis/L7/compare/v2.0.0-beta.14...v2.0.0-beta.15) (2019-11-29)
### Bug Fixes
- **control:** lint error ([c863d7c](https://github.com/antvis/L7/commit/c863d7c8d15e560e3dfaf39d0ea3fac3242d776a))
- **map:** temporarily closed amap offset coordinate ([9a20f64](https://github.com/antvis/L7/commit/9a20f6480321c9297ff27fe4cfe6af9032fcb969))
# [2.0.0-beta.14](https://github.com/antvis/L7/compare/v2.0.0-beta.13...v2.0.0-beta.14) (2019-11-28)
**Note:** Version bump only for package L7
# [2.0.0-beta.13](https://github.com/antvis/L7/compare/v2.0.0-beta.12...v2.0.0-beta.13) (2019-11-28)
**Note:** Version bump only for package L7
# [2.0.0-beta.12](https://github.com/antvis/L7/compare/v2.0.0-beta.11...v2.0.0-beta.12) (2019-11-28)
### Bug Fixes
- **component:** fix marker ([14d4818](https://github.com/antvis/L7/commit/14d48184a1579241b077110ed51a8358de25e010))
# 2.0.0-beta.11 (2019-11-28)
### Bug Fixes
- **active:** fliter acitve ([c603e30](https://github.com/antvis/L7/commit/c603e30e2368310c3bbb2559d6c1a703c489634b))
- **babel:** gatsby env ([a0f249e](https://github.com/antvis/L7/commit/a0f249e40f18f712c522b2ccf3adf4434b9c2837))
- **component:** rename IPopupService ([a553111](https://github.com/antvis/L7/commit/a553111340065525be993b6a8df2754653880c59))
- **demo:** bugs ([5a857f9](https://github.com/antvis/L7/commit/5a857f9c1b707c91cbc07b0fc4878be3fe56011b))
- **demo:** demo ([a4e49a6](https://github.com/antvis/L7/commit/a4e49a6f6b25f585ba224f6d92fafd5cb5e0113f))
- **demo:** demo ([3792e6c](https://github.com/antvis/L7/commit/3792e6c3ea55860dd8cffbab1b68a2c212052aca))
- **demo:** gatsby ([5faac23](https://github.com/antvis/L7/commit/5faac2306c34ac8f3a02fdc61ad18337a4df7f49))
- **demo:** gatsby ([b6a1785](https://github.com/antvis/L7/commit/b6a1785a0ba432134495f6d9ac65f92ecc045fe8))
- **demo:** update demo ([3ae610f](https://github.com/antvis/L7/commit/3ae610f81421fb2720966dde76f5988dac8acc02))
- **demo:** update demo ([f073b39](https://github.com/antvis/L7/commit/f073b3900b3bb7bdf030654c9e4bc71972179e84))
- **doc:** file name lowercase ([3cbdc9c](https://github.com/antvis/L7/commit/3cbdc9c7f1d9be34e9c917f05531323946993eb4))
- **fix:** fix ([f40e44f](https://github.com/antvis/L7/commit/f40e44ffa07d33d6fbf828e8a006f0ec708612f3))
- **fix confilict:** conflict ([8a09ae2](https://github.com/antvis/L7/commit/8a09ae24bef7ba845e5b16759b3ecac210e472c5))
- **fix css:** fix css png ([f7e5376](https://github.com/antvis/L7/commit/f7e5376b7d6c64b2b078dca8f2a230f4fce14c68))
- **fix css:** fix css png ([da604e2](https://github.com/antvis/L7/commit/da604e266f36b70fcc7faa23fa7fe3359d3a1318))
- **l7:** modules import ([7106b4f](https://github.com/antvis/L7/commit/7106b4f7ad494541ee2f8f56018d18a19c940ada))
- **layer render:** scene 创建完成字段调用 render 方法 ([b5112a5](https://github.com/antvis/L7/commit/b5112a575083add0be1b770f7dafbc3644339230))
- **layers:** heatmap 3d effect ([38d1736](https://github.com/antvis/L7/commit/38d173610fbf729dfc3a6fae94ad27bb68f33cb8))
- **layerservice:** fix init bugs in layer service ([8cbbf7b](https://github.com/antvis/L7/commit/8cbbf7b28d63f4df16f061a4ae21726f243e7108))
- **layerservice:** fix init bugs in layer service ([8844243](https://github.com/antvis/L7/commit/8844243050f619b28043c4e9ed1942fe172f561e))
- **maker:** marker demo ([34d4d68](https://github.com/antvis/L7/commit/34d4d68151fe09992ec26bcec83a9862f6591920))
- **maker:** marker demo ([685e17b](https://github.com/antvis/L7/commit/685e17bf44033ad86d7fd7793605018bbdc71206))
- **map:** amap contanier creat new amap div ([bf43136](https://github.com/antvis/L7/commit/bf4313678501ec9c96da43de87b3b8dbf7be4c18))
- **map:** export l7-maps in CDN bundle ([9d08549](https://github.com/antvis/L7/commit/9d085491f697ac2c17b80c55df8cc97e3e2c2298))
- **map:** use P20 offset coordinates ([393e891](https://github.com/antvis/L7/commit/393e891a22098db3bcfb036a7182a45238ca6a73)), closes [#94](https://github.com/antvis/L7/issues/94)
- **modules:** remove node_modules ([4239ca8](https://github.com/antvis/L7/commit/4239ca80dec24cfd92ad2f244f50337a3ae03d36))
- **packages:** remove sub modules node_modules ([132b99e](https://github.com/antvis/L7/commit/132b99e4d2bef7ec5565a0b18c5659e8b246944b))
- **site:** 首页头图位置,以及英文大小写 ([1c1f5b1](https://github.com/antvis/L7/commit/1c1f5b1f1efe150cbbc572fb6408141fbc97dc81))
- chart demo code ([213a4bd](https://github.com/antvis/L7/commit/213a4bdb60a2a17670ae0d20a6f03efe3d9ba7c6))
- eslint bug ([52e8afc](https://github.com/antvis/L7/commit/52e8afcb345151f4e544a4227590e6eebd7b42bd))
- eslint missing in devDependencies ([3858f45](https://github.com/antvis/L7/commit/3858f4541ebce87f55b528625b33ff99c77fdd76))
- **readme:** readme ([38d7c95](https://github.com/antvis/L7/commit/38d7c9520b5ef16e1c1b9468757703afc6f9ad52))
- **render:** gl type ([f0d49d9](https://github.com/antvis/L7/commit/f0d49d915717c6799faabcb149339ec73923e616))
- **rm cache:** rm cache ([51ea07e](https://github.com/antvis/L7/commit/51ea07ea664229f775b7c191cfde68299cc8c2d5))
- **site:** site img ([0aabc0f](https://github.com/antvis/L7/commit/0aabc0f91b2488e09a0ccab5adb08df68ceb9c6e))
- **site:** site img ([96d94d7](https://github.com/antvis/L7/commit/96d94d7f3889425568abf28d6fb9cc84b1ade53e))
- **travis:** update travis ([2ac66b4](https://github.com/antvis/L7/commit/2ac66b4b50abfd0e7ddb998d54b698a718c1f86b))
- **travis:** update travis ([909c9d1](https://github.com/antvis/L7/commit/909c9d18feb3bc6791be7ade9691295fa235e348))
- babel.config.js for gatsby ([6c2cb7c](https://github.com/antvis/L7/commit/6c2cb7c7ddfab2b4ac84231f3a1558280589f996))
- gatsby site examples ([624a88b](https://github.com/antvis/L7/commit/624a88b28843c8d62e7701eecbec1a6344c9cacc))
- locale.json should be valid json ([a75c435](https://github.com/antvis/L7/commit/a75c43591ab68e9930e7ef60fa0d90e86b9c8db0))
- locale.json should be valid json ([9ff435f](https://github.com/antvis/L7/commit/9ff435f52b75cc1535f17911cfbce51f9cfabf46))
- **event:** add touch event ([e37a3eb](https://github.com/antvis/L7/commit/e37a3ebb8a95a0b2409dcc6db8423ae8e8797e4a))
- **extrude:** add geojson rewind ([0d833f5](https://github.com/antvis/L7/commit/0d833f52d6757d324212730fee260b63635ef31e))
- **extrude:** add geojson rewind ([12ca2c7](https://github.com/antvis/L7/commit/12ca2c7e36d5aa3611dbb6b784d4883ddda1a2f1))
- **layer:** 修复数据更新数据为空 ([96bc0fc](https://github.com/antvis/L7/commit/96bc0fc1c0d570f0ceda7451c0594220543cd04d))
- **layer:** 修复数据更新数据为空 ([d708f85](https://github.com/antvis/L7/commit/d708f85b1f366c39ddb32409e220bec21aa98915))
- **layer:** eslint err ([6911b3f](https://github.com/antvis/L7/commit/6911b3f4e9be5e531c201cf860f48cdbd157b84e))
- **layer:** eslint err ([219b8c1](https://github.com/antvis/L7/commit/219b8c12a4d4122f2f6995c3ebd86c271d5dc3c5))
- **layers:** heatmap 3d effect ([c99bb27](https://github.com/antvis/L7/commit/c99bb27d94ad9b6b1e85b7b153953dd2a7455db8))
- **line-layer:** 修复相邻线段重叠情况下的接头处理 ([d4a8f29](https://github.com/antvis/L7/commit/d4a8f2943e4efcbf0d7aa8a223aa343135a8662b))
- **line-layer:** 修复相邻线段重叠情况下的接头处理 ([badca04](https://github.com/antvis/L7/commit/badca0446d79701fc5545fe84261456f76f85ca8))
- **lint:** lint warning ([66c4304](https://github.com/antvis/L7/commit/66c4304c14d759d1ccb3301fd638c75bfbfb8031))
- **lint:** lint warning ([45ec241](https://github.com/antvis/L7/commit/45ec241ed3fe6124daeaac32dfa94ba8af35f89d))
- **map:** map style map ([9ab41ff](https://github.com/antvis/L7/commit/9ab41ff9d224b06be89c2ee50b40500b479aec3d))
- **map:** map style map ([ac1056c](https://github.com/antvis/L7/commit/ac1056c3a28b71f622118ee6e05f8b163ce80b67))
- **package:** update version ([e6bf285](https://github.com/antvis/L7/commit/e6bf28557cabecbde6db546c4d990294aeacc4c7))
- **package:** update version ([1db0b47](https://github.com/antvis/L7/commit/1db0b4717227e05b7c60f0968c072a7aea1a8147))
- **point:** 修复 shape 映射,图片加载的事件 ([8d54bc6](https://github.com/antvis/L7/commit/8d54bc6ab59a09f2f75015271dcf1862e1e1dffd))
- **point:** 修复 shape 映射,图片加载的事件 ([84a55df](https://github.com/antvis/L7/commit/84a55dfdcd19c164cbb0136491123b0984a06f03))
- **point-layer:** adjust shift bits in vertex compression ([1104e3a](https://github.com/antvis/L7/commit/1104e3afc5168f0bdf2411d9c8e4da95c72d1b8c))
- **point-layer:** adjust shift bits in vertex compression ([865875d](https://github.com/antvis/L7/commit/865875d47874faec65f4c81f8f97c4be3fd04d5a))
- **polygon-layer:** 修复 demo ([b4fdc97](https://github.com/antvis/L7/commit/b4fdc97b56929c372c1e2b2b5bfad1ffa483636b))
- **polygon-layer:** 修复 demo ([f382bdb](https://github.com/antvis/L7/commit/f382bdbc0de1a48ddd6e11039e497d04dee588e5))
- **poylygon:** json source ([3296975](https://github.com/antvis/L7/commit/3296975d0486f27e5000889e515dea70aacde1f7))
- **poylygon:** json source ([0b099ca](https://github.com/antvis/L7/commit/0b099cac5e72241b97214639fa849bef112f6fd5))
- **raster layer:** raster layer triangle ([cce659a](https://github.com/antvis/L7/commit/cce659aaa1fda8e6964bc6c839b875fa05a89c7d))
- **raster layer:** update raster triangle ([b0f6265](https://github.com/antvis/L7/commit/b0f6265cd3b16c6ff39d0a6693788a25fca7bda2))
- **scene:** engine run ([c5ada86](https://github.com/antvis/L7/commit/c5ada860bb957918413437619c16064d27df86dc))
- **travis:** travis nodejs version ([93d1578](https://github.com/antvis/L7/commit/93d1578a77e6c017aad4ad200f543bae518290e6))
- control css ([09ebe29](https://github.com/antvis/L7/commit/09ebe2981eff86b396594e73f975316370eb42e6))
- **rendermask:** maskmesh ([1c2c33e](https://github.com/antvis/L7/commit/1c2c33ed05eca8efd722bdfdab2187c0e6f8e381))
- **rendermask:** maskmesh ([d55ffff](https://github.com/antvis/L7/commit/d55ffff5aa9a87a3f4130b0a34ca69375de9ba83))
- **scene:** engine run ([9d8e531](https://github.com/antvis/L7/commit/9d8e531df67ea4603377abf30749cc9cf7724a1a))
- **src:** lint err ([b269222](https://github.com/antvis/L7/commit/b269222d3d45337026b783877473e8b5fa837f68))
- **src:** lint err ([9b4216d](https://github.com/antvis/L7/commit/9b4216db5159c6a5f4745d07adc8788a690dec84))
- **style:** update bug ([a0ad3c4](https://github.com/antvis/L7/commit/a0ad3c42fdfd803f4d7d0abe960eb092b2cc0475))
- **text:** demo ([bae149e](https://github.com/antvis/L7/commit/bae149e91d3cd83e30671ca5afe13c2452a00379))
- **text:** demo ([71fcf42](https://github.com/antvis/L7/commit/71fcf42ff86286e4817e97576a98383ace244ee6))
- **text:** shader defines ([0d9beb8](https://github.com/antvis/L7/commit/0d9beb8fe677d37414ea9e8c225603a07163a2bf))
- **text:** shader defines ([408ce92](https://github.com/antvis/L7/commit/408ce92bfdcfde317f3385a3de16fe67d12f2ba2))
- bevel joint in dashline ([03ce45c](https://github.com/antvis/L7/commit/03ce45c7ca4e2bb7519b2a95982e8d61cea6c973))
- bevel joint in dashline ([dd8fcfa](https://github.com/antvis/L7/commit/dd8fcfab7a8c778d57d4e62b233cf6c1e3bb17da))
- meshline triangulation bug ([9d530cb](https://github.com/antvis/L7/commit/9d530cb27babb7766348506ac94e66d506104f2b))
- meshline triangulation bug ([b34ba8b](https://github.com/antvis/L7/commit/b34ba8b6a79e9e374cc497c4f7bf728b08465e63))
- update babel.config.js ([fc45854](https://github.com/antvis/L7/commit/fc458545aaae8b1e76c77c52af604b68a34de94f))
- **Amap:** fix map ([2a84b54](https://github.com/antvis/L7/commit/2a84b5480eaf6998139736d2bae84b9729f315b5))
- **Amap:** fix map ([64906f7](https://github.com/antvis/L7/commit/64906f7e9d9cb8658fdf11454a64f76564154ffd))
- **Amap:** fix mapstyle ([83df28b](https://github.com/antvis/L7/commit/83df28b24603595fc6e8e7051c1559d858176ad7))
- **Amap:** fix mapstyle ([9be646b](https://github.com/antvis/L7/commit/9be646b8ab5dd77d4c03520ac6a34186bc9df2cf))
- **Amap:** setstyle ([6588614](https://github.com/antvis/L7/commit/6588614d7f5238f29dfb51d461d18035eb142999))
- **Amap:** setstyle ([907ea56](https://github.com/antvis/L7/commit/907ea56ece29e90681e55e12f0afadccff129bcf))
- **code:** shaderpass ([349e04a](https://github.com/antvis/L7/commit/349e04a20634c6ddfbec9236c895781e03f309a1))
- **code:** shaderpass ([65df7ce](https://github.com/antvis/L7/commit/65df7ce180578e9e9ae89b3c7fd015445a938184))
- **core:** delete composer.js ([b558371](https://github.com/antvis/L7/commit/b5583715e3d4f4b927b2cdf6543d854e019065d4))
- **core:** delete composer.js ([1ca12ff](https://github.com/antvis/L7/commit/1ca12ff2f9ad2db4f186e56856f36b7581e4c33a))
- **core:** file name ([d79d7a3](https://github.com/antvis/L7/commit/d79d7a3df4ba26a53306e121f0df2abb2c3c5fae))
- **core:** file name ([cd65288](https://github.com/antvis/L7/commit/cd652880bfc822a937e55f06cfafc6edcddad3f8))
- **core:** shaderpass ([9d936e7](https://github.com/antvis/L7/commit/9d936e7a3c8bc3de3218d9bff0be39ecf92322fc))
- **core:** shaderpass ([07672fe](https://github.com/antvis/L7/commit/07672fe2195a99dc974fe9c5c87e0243426abb60))
- **geojson:** geometry is null ([3fc7747](https://github.com/antvis/L7/commit/3fc7747a1685955904a39b64270052751964dcdc))
- **geojson:** geometry is null ([9d8bfb1](https://github.com/antvis/L7/commit/9d8bfb159a3b3076edb7220858d2e9dd2857f4a4))
- **gloal:** snap ([8e4b4d3](https://github.com/antvis/L7/commit/8e4b4d31ae9827f53f7351c5034449f16664246a))
- **gloal:** snap ([14b261c](https://github.com/antvis/L7/commit/14b261c2bcb77795d82e27feaf4cc159dfd58591))
- **heat-map:** 修复 bbox 计算逻辑 ([13583ea](https://github.com/antvis/L7/commit/13583eab7ae53765134a154d7002226b6d649504))
- **heat-map:** 修复 bbox 计算逻辑 ([7d7cbda](https://github.com/antvis/L7/commit/7d7cbda53cb31c67e7397dccff7b91c77b4c1afc))
- **heat-map:** 渲染逻辑 & bbox ([62932e0](https://github.com/antvis/L7/commit/62932e093ff180bdff69f185bc9ce8720d7702f2))
- **heat-map:** 渲染逻辑 & bbox ([b0df153](https://github.com/antvis/L7/commit/b0df153670567e4ff055094bb46548db91f3ab2b))
- **heatmap:** 解决颜色插值问题,优化渲染性能 ([507a353](https://github.com/antvis/L7/commit/507a3537f50f45936391d9e312982d852f0d45ef))
- **heatmap:** 解决颜色插值问题,优化渲染性能 ([45db805](https://github.com/antvis/L7/commit/45db805a6889b4435d946ae0f35cb4d1e141f92f))
- **heatmap:** performance ([724d73b](https://github.com/antvis/L7/commit/724d73bd8478ea312871578c24de801e6599cd05))
- **heatmap:** performance ([5e2ebd3](https://github.com/antvis/L7/commit/5e2ebd3dadd76d675b2ff8bc8869fdc7a2a7b966))
- **heatmap:** setValue ([208ed7f](https://github.com/antvis/L7/commit/208ed7f6136e748439a81e4a854e454e7c2f9dd2))
- **heatmap:** setValue ([2da2c1f](https://github.com/antvis/L7/commit/2da2c1f2af500cc88b67104a3b841c73ce80955d))
- **imagedata:** image from origin data ([3928fe5](https://github.com/antvis/L7/commit/3928fe5233bf120a1b85268018c7a35b4c15d707))
- **imagedata:** image from origin data ([66f0e94](https://github.com/antvis/L7/commit/66f0e94fa47309ca3cb2373d52e3ef5257bea42d))
- **l7:** update package ([ee54e52](https://github.com/antvis/L7/commit/ee54e529b2fe05fa0fb5dff196af363aa651f8ac))
- **l7:** update package ([f669629](https://github.com/antvis/L7/commit/f66962976961ebaad3915875a5bb8b13092a65ee))
- **layer:** conflict ([1f54741](https://github.com/antvis/L7/commit/1f5474180fcc6914d272a96db951820d0bcde606))
- **layer:** conflict ([bcc7388](https://github.com/antvis/L7/commit/bcc7388df224a8b7d96b7085ba535592d1e9aecb))
- **line:** default activeId ([fdec4b1](https://github.com/antvis/L7/commit/fdec4b1a49c4c7b49d410e7ed784c556b4a9ed19))
- **line:** default activeId ([1491a7b](https://github.com/antvis/L7/commit/1491a7b0aa0c4bd7e89c2dd3bfe5580a3f9cf7b2))
- **mapbox:** scale ([f2d9214](https://github.com/antvis/L7/commit/f2d9214e075bdfee1913bbc5c6758e3346edebc8))
- **mapbox:** scale ([e0f7ff3](https://github.com/antvis/L7/commit/e0f7ff398c5d08be598c19c15ef3a1b999ee851a))
- **package:** update version ([580b4ef](https://github.com/antvis/L7/commit/580b4ef39d93b43ab84c7f15e7f4426c2afa90f6))
- **package:** update version ([7a55d07](https://github.com/antvis/L7/commit/7a55d07664c63b0a2cdd2706f13cbbc52d73a6fa))
- **package:** update version ([92cb458](https://github.com/antvis/L7/commit/92cb458c9820cdd9a2de2e36ae79222be035d741))
- **package:** update version ([335021d](https://github.com/antvis/L7/commit/335021de1b3142b3c3c8efe19030c365a245a3cf))
- **pick:** event ([5d2b690](https://github.com/antvis/L7/commit/5d2b6902f64c04bd44e2ade8bf7244d8181bb19d))
- **pick:** event ([952e03a](https://github.com/antvis/L7/commit/952e03aeb16de63a2562d5ee2ba8818d97da824b))
- **raster:** layer clone typeArray ([7ca322d](https://github.com/antvis/L7/commit/7ca322d234a2b14f79dfeefb8bbb8ea2ef9d0ea1))
- **raster:** layer clone typeArray ([29bcb5d](https://github.com/antvis/L7/commit/29bcb5d3003085d1035f0b334586bd44d063019b))
- **renderTarget:** 修复了 threeJS 更新版本后引发的 renderPass 渲染问题 ([a2e00e3](https://github.com/antvis/L7/commit/a2e00e382b0dbb4b2708bc36cbf4e32ef74d18a2))
- **renderTarget:** 修复了 threeJS 更新版本后引发的 renderPass 渲染问题 ([81e0f15](https://github.com/antvis/L7/commit/81e0f15873e7d3ae945b95248e2f184d6e9b3f67))
- **scene:** event on map ([7b58386](https://github.com/antvis/L7/commit/7b583866fa80f283a736f9cabed232f46a683f06))
- **scene:** event on map ([cf5444f](https://github.com/antvis/L7/commit/cf5444f0a6d5018a6a737bee14e7f46e43514440))
- **scene:** render ([6ba7f07](https://github.com/antvis/L7/commit/6ba7f07c7d1d0f11d280dc5a049dca6e75f31ea2))
- **scene:** render ([97af34f](https://github.com/antvis/L7/commit/97af34f5953d3b5b881c09358772fb84f88f543f))
- **source:** cluster layer ([abc4bf1](https://github.com/antvis/L7/commit/abc4bf10906469d8bd3b64dd7aae322b7379a366))
- **source:** cluster layer ([642a841](https://github.com/antvis/L7/commit/642a841f10aca0d4ba93481874a8240064465969))
- **source:** geojson parser filter invalid ([d546527](https://github.com/antvis/L7/commit/d5465275a05f85f401d80a48f6fda26844c550e6))
- **source:** geojson parser filter invalid ([2702f02](https://github.com/antvis/L7/commit/2702f028b05ed808b8050ca495eddcd0187569fc))
- **source:** import supercluster ([e69f860](https://github.com/antvis/L7/commit/e69f8600450d255855ab55ee01fdf5ad3e64c6f2))
- **source:** import supercluster ([b00bcaf](https://github.com/antvis/L7/commit/b00bcaf150b563d15af4d7f709a86dcb13909e1c))
- **src:** require 引入方式切换成 import ([988afc1](https://github.com/antvis/L7/commit/988afc18af4b0081c4ec1ce14bd2f9b18826bc67))
- **src:** require 引入方式切换成 import ([f652dca](https://github.com/antvis/L7/commit/f652dcae7a0dac2e08419ff6f2b8abcdda84e8b6))
- **test:** compile threejs source ([bd53b2b](https://github.com/antvis/L7/commit/bd53b2bd89b57317a09637567fec443e651b8d84))
- **test:** use the proper version of torchjs and babel, etc. ([758db46](https://github.com/antvis/L7/commit/758db46202136428803f24d40db2f43b996d3c98))
- **text:** layer ([f527be2](https://github.com/antvis/L7/commit/f527be22cc4ac5e6e2dc715e4f666e1c0f72f954))
- **text:** layer ([725c0cf](https://github.com/antvis/L7/commit/725c0cf232ee801fdd7c1f3ab6ff4227f5e6ab9e))
- **threejs:** remove unuse import ([6c283ef](https://github.com/antvis/L7/commit/6c283ef1b0870cce29dc001cf2f57e648b25c75a))
- **threejs:** remove unuse import ([a93d34b](https://github.com/antvis/L7/commit/a93d34b8215aadd331616ba289cc18e33c69ed13))
- **tile:** vectorMap ([fe345e1](https://github.com/antvis/L7/commit/fe345e1579d6a8e31e7f935a91de908779cb354c))
- **tile:** vectorMap ([0888f31](https://github.com/antvis/L7/commit/0888f31769c13aee825c0b97e38ac788608bbc10))
- **tilelayer:** point pickup ([facce2a](https://github.com/antvis/L7/commit/facce2a255ca4b43ba120f5d58457c7f41b81044))
- **tilelayer:** point pickup ([cef72bc](https://github.com/antvis/L7/commit/cef72bc497b50b0150cb0dd62002791fbaf284e7))
- **transform:** stattistics ([3745540](https://github.com/antvis/L7/commit/374554037c764867d63f31bbbcb22ec522d14c51))
- **transform:** stattistics ([49d8f60](https://github.com/antvis/L7/commit/49d8f603cd6d24f757c52db7d022a3f4bcd5d788))
- **util:** extent ([e20c4ca](https://github.com/antvis/L7/commit/e20c4cabcf7f287e3ab63483f26aec9d0e9d8fff))
- **util:** extent ([0ee3ce9](https://github.com/antvis/L7/commit/0ee3ce958d8a752aab95dc29518c6e20e096e720))
- **util:** geo convert ([7c555c2](https://github.com/antvis/L7/commit/7c555c2cf11fdbe3355f7f5aa8ca506abdb540ff))
- **util:** geo convert ([113aae9](https://github.com/antvis/L7/commit/113aae900b354447d20ad2e26a88f497671d5837))
### Features
- **add l7 site:** add websites ([0463ff8](https://github.com/antvis/L7/commit/0463ff874eab1c484b593e8c02f73c85a02c000c))
- **add point demo:** add demo ([cfecc93](https://github.com/antvis/L7/commit/cfecc930454c7b0a49884d383464c3d579ff8bf1))
- **add point demo:** add demo ([90f6945](https://github.com/antvis/L7/commit/90f6945feb4818842c6231f5b5683db6cda15a73))
- **attr:** add pattern ([a5767f2](https://github.com/antvis/L7/commit/a5767f25753b902c896799eb396da4594aec1522))
- **attr:** add pattern ([1eef58a](https://github.com/antvis/L7/commit/1eef58a29a167c1045a7cf1c2cfee38d7b60cadc))
- **chart:** add chart demo ([2a19b07](https://github.com/antvis/L7/commit/2a19b07c1bca7dfbf191618f15ab06a18c262148))
- **chart:** add chart demo ([12cc906](https://github.com/antvis/L7/commit/12cc906139ae20583174ddf12c1c0cce96da44c4))
- **component:** add layer control ([7f4646e](https://github.com/antvis/L7/commit/7f4646efd3b0004fde4e9f6860e618c7668af1a7))
- **component:** add scale ,zoom, popup, marker map method ([a6baef4](https://github.com/antvis/L7/commit/a6baef4954c11d9c6582c27de2ba667f18538460))
- **control:** add marker ([c83f1c3](https://github.com/antvis/L7/commit/c83f1c3d0b1f325c7328bf465164901fc5a84e90))
- **control:** add marker ([39e870a](https://github.com/antvis/L7/commit/39e870af093cd67aa428dc44ac71e26f072c47e3))
- **control:** add scale, layer.zoom control ([f6983ac](https://github.com/antvis/L7/commit/f6983ac907730a8421648a3e439830ec9bdf8904))
- **control:** add scale, layer.zoom control ([1bd12f1](https://github.com/antvis/L7/commit/1bd12f15605b651073bd64a31e53d0c7428e34df))
- **core:** add map method ([853c190](https://github.com/antvis/L7/commit/853c1901fbb8559a9d3bdb3631ec13a7dcaf0ea7))
- **demo:** add point chart demo ([8c2e4a8](https://github.com/antvis/L7/commit/8c2e4a82bf7a49b29004d5e261d8e9c46cd0bd9d))
- **demo:** add point chart demo ([fe5d8cd](https://github.com/antvis/L7/commit/fe5d8cdb324fbdcc28ac20d243b7a945e80e79e5))
- **demo:** normalization demo ([09e2e22](https://github.com/antvis/L7/commit/09e2e22fcc54d9dd308ad0dba14d88e003ebe5d2))
- **demo:** normalization demo ([67edabe](https://github.com/antvis/L7/commit/67edabeac7d1d97e6659f111108611d6d568c270))
- **filter:** filter by pickids ([a0499b7](https://github.com/antvis/L7/commit/a0499b78d1c7e9ca9659ca71b468430fada8d31f))
- **json:** point 数据 coord 设置支持数组 ([fb5be34](https://github.com/antvis/L7/commit/fb5be34932b1dac06c0476ec71b370d42b400d76))
- **json:** point 数据 coord 设置支持数组 ([a4ad61f](https://github.com/antvis/L7/commit/a4ad61fac37955d43a1aa630c79fcb46a6c74a3e))
- **layer:** 新增 sourceplugin, attribute 增加类型判断 ([2570b8c](https://github.com/antvis/L7/commit/2570b8c242af29bae07640b1ec7eaadfb04ec9d6))
- **layer:** add arc2d layer ([420459c](https://github.com/antvis/L7/commit/420459ce5aee91dc8d6f770a2a2078c7e5bca4bf))
- **layer:** add imagelayer ([a995815](https://github.com/antvis/L7/commit/a995815284652ca5d6e013c547b617fa52039ddc))
- **layer:** add point line polygon image layer ([54f28be](https://github.com/antvis/L7/commit/54f28be495af94a39313b7840c69725be16dc1e2))
- **layer:** point layer ([3da72c8](https://github.com/antvis/L7/commit/3da72c83ff0577455a29ba98df4bb7cd8838328a))
- **layer:** style 增加 blending 配置项 ([bab462a](https://github.com/antvis/L7/commit/bab462ac40a6c3e188743eae198481db65435b26))
- **layer:** style 增加 blending 配置项 ([53f7268](https://github.com/antvis/L7/commit/53f726872a37457bfa75d8fab1d840e69f910373))
- **layers:** add arclayer ([7e499fd](https://github.com/antvis/L7/commit/7e499fdc877d9715000c138a5d3505924ebd083e))
- **layers:** add girdheatmap add raster imagelayer ([ddd1d0e](https://github.com/antvis/L7/commit/ddd1d0ef38cc44767d2ec5329eb844c31d847938))
- **layers:** add heatmap 3d layer ([cd8409e](https://github.com/antvis/L7/commit/cd8409e4cb234f850f2d46dd68b35f4848daf74b))
- **layers:** add polygon3d , pointimagelayer ([75f2eaa](https://github.com/antvis/L7/commit/75f2eaa083064ff21c8bbe13f5f6770682c23241))
- **layers:** add polygon3d , pointimagelayer ([bda6b6c](https://github.com/antvis/L7/commit/bda6b6cfb06193f6ae83e505a9c8667811d80a2f))
- **line:** greatCircle ([4977426](https://github.com/antvis/L7/commit/49774266456bf4845785247f2a37ad1b66518e2d))
- **line:** greatCircle ([6188d07](https://github.com/antvis/L7/commit/6188d0783a10869e61cc5949407106965f73d0e7))
- **map:** adjust Scene API, use @antv/l7-maps instead ([77b8f21](https://github.com/antvis/L7/commit/77b8f21b0bcf8b06e88d8e0bef213935bf32b957)), closes [#86](https://github.com/antvis/L7/issues/86)
- **multi-pass:** support TAA(Temporal Anti-Aliasing) ([2cf0824](https://github.com/antvis/L7/commit/2cf082439ad04eb84b96b2922e45082476452aec))
- **picking:** support advanced picking API: `layer.pick({x, y})` ([3e22f21](https://github.com/antvis/L7/commit/3e22f21a5c658e4ade31c0506bd77ae787ec2fcc))
- **picking:** support PixelPickingPass and highlight the picked feature ([ff0ffa0](https://github.com/antvis/L7/commit/ff0ffa057e2f533dc6ac92f40d3892f9dd57fafb))
- **point image:** add point image ([89b2513](https://github.com/antvis/L7/commit/89b25133a17f308c3e884c49baebcd3cc7a9470a))
- **point image:** add point image ([ae4a594](https://github.com/antvis/L7/commit/ae4a594a9383443d0ade5eb84105f3c8f2c6c47c))
- **point-layer:** use 2d sdf functions ([6ec7039](https://github.com/antvis/L7/commit/6ec70396b9f0358766af61663b76aaf987f4e3c7))
- **point-layer:** use 2d sdf functions ([ea548ed](https://github.com/antvis/L7/commit/ea548edaa648a7eab4c67ced96f54b270c9b6368))
- **post-processing:** add some post processing effects ([1d8e15c](https://github.com/antvis/L7/commit/1d8e15cec11abc62785bc68c8281550732550839))
- **scene:** scene service inTransientScope ([ccf1ff4](https://github.com/antvis/L7/commit/ccf1ff464e1b220650e61c0999846725b075ef3a))
- **schema-validation:** support validation for layer's options ([9c5766d](https://github.com/antvis/L7/commit/9c5766d0e37958d67f7072d465f51e2aa3d53939))
- **text:** text add textAllowOverlap propertry ([4dcc177](https://github.com/antvis/L7/commit/4dcc17794112c914eb4233b365b9f7e5c316da26))
- 增加对于点要素的自动标注 ([86d89dd](https://github.com/antvis/L7/commit/86d89dd5bff0d83a2b2c4acfb14853e549148310))
- 增加对于点要素的自动标注 ([8feefb6](https://github.com/antvis/L7/commit/8feefb6d7580674c41948e0c4279e178d127b7d6))
- **polygon-layer:** 支持多个平行光源配置 ([63e70a3](https://github.com/antvis/L7/commit/63e70a36796667c90987e8f522a125f32e5071d0))
- **polygon-layer:** 支持多个平行光源配置 ([32cdcf8](https://github.com/antvis/L7/commit/32cdcf83f37dbe532336d8393f95d98aa94b3d5b))
- **source:** reuse tileSource ([a9d2c27](https://github.com/antvis/L7/commit/a9d2c276d74166d8dece3e7f45f6a7d3e4d009d2))
- **source:** reuse tileSource ([4ce9d60](https://github.com/antvis/L7/commit/4ce9d602569850e26ba550f0cf8b7753abf054c6))
- **worker:** worker Source ([40947c0](https://github.com/antvis/L7/commit/40947c04ec85610bb1694f9a203ad174139fb2f3))
- **worker:** worker Source ([1a5faae](https://github.com/antvis/L7/commit/1a5faaea45b9c7dbdb3da5d4d86da9709e8a397d))
- **worker:** worker Source ([3bbdb5e](https://github.com/antvis/L7/commit/3bbdb5ec8870244f4ab0dc7cadbc49f7055a2256))
- **worker:** worker Source ([d7d66a2](https://github.com/antvis/L7/commit/d7d66a26f636e9cf29e314b8e76bf876eae2df00))
- lighting ([4d19584](https://github.com/antvis/L7/commit/4d1958467e0d112ec0bd1d5b2499294c909bf337))
- lighting ([f8269ee](https://github.com/antvis/L7/commit/f8269ee35bd1a50bb150366cecdad5958919013d))
- **hexagon:** hexagon heatmap ([00d58a0](https://github.com/antvis/L7/commit/00d58a03c5dfa92c5812c2b94fca4831694ceff6))
- **hexagon:** hexagon heatmap ([f6847e1](https://github.com/antvis/L7/commit/f6847e15d644c84448dcb49ce3dc63f3ee0819fb))
- **l7:** add shader module ([8a45456](https://github.com/antvis/L7/commit/8a454561ad1241f6b5bfea72d0c5967b2464c284))
- **l7:** add shader module ([a6d4774](https://github.com/antvis/L7/commit/a6d477480444ea7e0c24456b31fc3b920e05506e))
- **l7:** feat heatmap layer ([109f3f1](https://github.com/antvis/L7/commit/109f3f12d0913442f676691317b827b67b948d29))
- **l7:** feat heatmap layer ([eec6a12](https://github.com/antvis/L7/commit/eec6a121ac4c1a13f3442d6285533395a70bbcf6))
- **layer:** add controller ([7d33a17](https://github.com/antvis/L7/commit/7d33a17f4d5a984a740f1c8d3b4a0a604a1817e7))
- **layer:** add controller ([d562f86](https://github.com/antvis/L7/commit/d562f86251869776761819ef85656bf74654bd02))
- **layer:** add lengendcdg method ([c8ac525](https://github.com/antvis/L7/commit/c8ac525c020db01be12e9d182e82226aa809f45a))
- **point-layer:** optimize 2d circle ([ee5611d](https://github.com/antvis/L7/commit/ee5611d892d9875b3d592cdfdd8c49296ab2a03b))
- **point-layer:** optimize 2d circle ([e8704a1](https://github.com/antvis/L7/commit/e8704a1e7e305a5952bb9ba62012fa8a1708c6f9))
- **point-layer:** vertex compression ([5e0bac0](https://github.com/antvis/L7/commit/5e0bac0fe410eb589ecfade7e1f09ebfbf5d18a2))
- **point-layer:** vertex compression ([ef2a9dd](https://github.com/antvis/L7/commit/ef2a9dd95746fa92b2459736cec6824cbea17c37))
- support bevel joint, dashline & anti-alias ([c0ea754](https://github.com/antvis/L7/commit/c0ea7545221a5aaf57742be52449cbe5a390f1c0))
- support bevel joint, dashline & anti-alias ([393c5d0](https://github.com/antvis/L7/commit/393c5d0c5aeb4665ef2e78ad0733580bfd4ee33e))
- **interaction:** add hash ([17d8483](https://github.com/antvis/L7/commit/17d8483a38a6e7acbdc98fbcacaaebfdee81a090))
- **interaction:** add hash ([a290efb](https://github.com/antvis/L7/commit/a290efb7875cf2d8a122e10d9c4d8d8fa3f6efbd))
- **layer:** add lengendcdg method ([14ce71d](https://github.com/antvis/L7/commit/14ce71d7bb9143892d42874bba890373127e9f4f))
- **layer:** add repaint method ([48de69f](https://github.com/antvis/L7/commit/48de69f7d9d49ccd5b10f9652fc3a949d705bee0))
- **layer:** add repaint method ([3d2bde5](https://github.com/antvis/L7/commit/3d2bde558e4bb305408ecf21fbde8008219821c0))
- **layer:** add tile ([28bd807](https://github.com/antvis/L7/commit/28bd807916dc57100f87aa0d5bad84d0c0601acf))
- **layer:** add tile ([181d7bc](https://github.com/antvis/L7/commit/181d7bc42f6a0be656669113486cb54d8c388d94))
- **map:** add mapbox ([418b3bc](https://github.com/antvis/L7/commit/418b3bcbc973900406f1a1093fc043f33b00c3a8))
- **map:** add mapbox ([8bb5bc6](https://github.com/antvis/L7/commit/8bb5bc66470ee527ba6d742b118054302beeaa72))
- **mapbox:** add mapbox ([ef30053](https://github.com/antvis/L7/commit/ef30053ff3824c07d0c4d6879d3af2de5cc7f9cf))
- **mapbox:** add mapbox ([e856519](https://github.com/antvis/L7/commit/e856519fa71e7662de5a6aed41c1ea68feef6d75))
- **package:** update version ([25f9af3](https://github.com/antvis/L7/commit/25f9af30bba55ebb4e5d1b5d8d6ad0ae495c8906))
- **package:** update version ([eda3042](https://github.com/antvis/L7/commit/eda3042b3f8c134791f84be75997055c8df5684b))
- **pick:** update pick method ([2b21158](https://github.com/antvis/L7/commit/2b21158568295b629e7bbb516507c7b1ac11ec22))
- **pick:** update pick method ([a1c534d](https://github.com/antvis/L7/commit/a1c534da698f615de54435e1b53c82629b432226))
- **scene:** 按需进行渲染刷新 ([6b2d9b7](https://github.com/antvis/L7/commit/6b2d9b76caf40f276017afc2f3751ec76a68b7e5))
- **scene:** 按需进行渲染刷新 ([691f223](https://github.com/antvis/L7/commit/691f2237d0ca6d6e45a708e3eaa25b2a6a3eb0b9))
- **scene:** 实例化支持传入地图实例 ([e60e51c](https://github.com/antvis/L7/commit/e60e51c12d294a475a798d6b83957e7b76549711))
- **scene:** 实例化支持传入地图实例 ([f0db13e](https://github.com/antvis/L7/commit/f0db13e711eed9657faeb68e4b0fd1e1a32b80fc))
- **source:** hexagon ([3ab8aac](https://github.com/antvis/L7/commit/3ab8aac11a17ce93e74add1b066a8d50e93dd86f))
- **source:** hexagon ([7d73d7f](https://github.com/antvis/L7/commit/7d73d7f34843d2eed8c916ed9b5350883c0ed491))
- **src:** threejs render ([e75f215](https://github.com/antvis/L7/commit/e75f215625c0cc56c531254a8082d39690ea693f))
- **tile:** add image tile layer ([f4f63c4](https://github.com/antvis/L7/commit/f4f63c48b1f8cc15d502bf1cda8ce12012b995bc))
- **tile:** add image tile layer ([ab11b98](https://github.com/antvis/L7/commit/ab11b98e54262a6ab1e6e7abe05172d04ed07e83))
- **tile:** add tile ([5e494fe](https://github.com/antvis/L7/commit/5e494fe7529252a256d147014257cafcc1c1bd78))
- **tile:** add tile ([6dd6c5d](https://github.com/antvis/L7/commit/6dd6c5dd018551c67a42c1e1e28373c55ede58e9))
- **tile:** fix point tile layer ([f0a1099](https://github.com/antvis/L7/commit/f0a10992ddcbd9639640d21617020df009503f18))
- **tile:** fix point tile layer ([b6d2109](https://github.com/antvis/L7/commit/b6d2109a68a3f6d0c35963368bad3e0f94388802))
- **tilelayer:** add mask ([e018661](https://github.com/antvis/L7/commit/e018661b7ad8acbfdcd01f85ef15d217f8d3b277))
- **tilelayer:** add mask ([fb26f6e](https://github.com/antvis/L7/commit/fb26f6e5e89b598629aaf206d3d3f444b645150b))
### Performance Improvements
- **shader:** 优化线动画效果 ([9b2a4ca](https://github.com/antvis/L7/commit/9b2a4ca26cd58791a667e373a2bd04d63dc1570c))
- **shader:** 优化线动画效果 ([94b7630](https://github.com/antvis/L7/commit/94b76304ef6b8989ccbdd955b4d24a1c09105b36))
## 2019.11.22
### L7 2.0 beta
- 新架构
- 多地图引擎

21
LICENSE.md Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Alipay.inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

91
README.md Normal file
View File

@ -0,0 +1,91 @@
# L7
[![travis ci](https://travis-ci.com/antvis/L7.svg?branch=master)](https://travis-ci.com/antvis/L7) [![](https://flat.badgen.net/npm/v/@antv/l7?icon=npm)](https://www.npmjs.com/package/@antv/l7) ![最近提交](https://badgen.net/github/last-commit/antvis/L7)
Large-scale WebGL-powered Geospatial data visualization analysis framework.
[中文 README](./README.zh-CN.md)
[GitHub](https://github.com/antvis/L7)
Powered by WebGL, the rendering technology of L7 supports fast and efficient rendering of big data, 2D/3D rendering, possible through calculation and analysis of spatial data by GPU Parallel Compu-ting.
L7 focuses on geographic data expressivenessinteraction and design of geographic visualization layers. The basemaps on the platform are powered by third-party services
## 🌄 l7 visualization demos
![l7 demo](https://gw.alipayobjects.com/mdn/rms_855bab/afts/img/A*S-73QpO8d0YAAAAAAAAAAABkARQnAQ)
## 🌟 Highlight features of L7 2.0
- 🌏 Data-driven Visualization
Layer visualization API design base Semiology of Graphics.
It supports rich map visualization types for a better insight on data.
- 🌏 High performance rendering with 2D/3D effect
Real-time and dynamic rendering with millions of spatial data.
- 🌏 Simple and flexible data format
L7 supports a wide variety of data formats including CSV, JSON, geojson, among others, eliminating the need to run conversions ahead of time.
- 🌏 Multi-basemap
For global users, Mapbox is easy to be embedded by a simple line of code.
## Getting Started
### 📦 Installation
```
npm install @antv/l7
```
### Init Map by L7 scene
```javascript
import { Scene } from '@antv/l7';
import { Mapbox } from '@antv/l7-maps';
const scene = new Scene({
id: 'map',
map: new Mapbox({
style: 'light',
pitch: 0,
center: [107.054293, 35.246265],
zoom: 4.056,
}),
});
```
### Add Layer
```javascript
import { PointLayer } from '@antv/l7';
const pointLayer = new PointLayer()
.source(data)
.shape('circle')
.size('mag', [1, 25])
.color('mag', ['#5B8FF9', '#5CCEA1'])
.style({
opacity: 0.3,
strokeWidth: 1,
});
scene.addLayer(pointLayer);
```
## :memo: Documentation
- [Getting started with L7](https://l7.antv.vision/en/docs/api/l7)
- [Tutorials](https://l7.antv.vision/en/docs/tutorial/quickstart)
- [API documentation](https://l7.antv.vision/en/docs/api/l7)
- [Examples](https://l7.antv.vision/en/examples/gallery/basic)
- [Contributor documentation](./.github/CONTRIBUTING.md)
## ✅ License
[MIT license](./LICENSE).

125
README.zh-CN.md Normal file
View File

@ -0,0 +1,125 @@
## L7 地理空间数据可视分析引擎
[![travis ci](https://travis-ci.com/antvis/L7.svg?branch=master)](https://travis-ci.com/antvis/L7) [![](https://flat.badgen.net/npm/v/@antv/l7?icon=npm)](https://www.npmjs.com/package/@antv/l7) ![最近提交](https://badgen.net/github/last-commit/antvis/L7)
[README](./README.md)
[GitHub](https://github.com/antvis/L7)
```bash
git clone https://github.com/antvis/L7 --depth=1
```
L7 是由蚂蚁金服 AntV 数据可视化团队推出的基于 WebGL 的开源大规模地理空间数据可视分析开发框架。L7 中的 L 代表 Location7 代表世界七大洲寓意能为全球位置数据提供可视分析的能力。L7 专注数据可视化化表达,通过颜色、大小、纹理,方向,体积等视觉变量设置实现从数据到信息清晰,有效的表达。
L7 能够满足常见的地图图表BI 系统的可视化分析、以及 GIS交通电力国土农业城市等领域的空间信息管理分析等应用系统开发需求。
![l7 demo](https://gw.alipayobjects.com/mdn/rms_855bab/afts/img/A*S-73QpO8d0YAAAAAAAAAAABkARQnAQ)
## 🌟 核心特性
🌏 数据驱动可视化展示
数据驱动,灵活数据映射,从数到形,支持丰富的地图可视化类型,更好洞察数据。
🌏 2D3D 一体化的海量数据高性能渲染
海量空间数据实时,可交互,动态渲染,
🌏 简单灵活的数据接入
支持 CSVJSONGeoJSON 等数据格式接入,可以根据需求自定义数据格式,无需复杂的空间数据转换。
🌏 多地图底图支持,支持离线内网部署
屏蔽不同底图之间的差异用户只需要关注数据层表达交互。高德地图国内合法合规的地理底图Mapbox 满足国际化业务需求。
## 🌈 支持丰富的图表类型
#### 点图层
- 气泡图
- 散点图
- 符号地图
- 3D 柱状地图
- 聚合地图
- 复合图表地图
- 自定义 Marker
#### 线图层
- 路径地图
- 弧线,支持 2D 弧线、3D 弧线以及大圆航线
- 等值线
#### 面图层
- 填充图
- 3D 填充图
#### 热力图
- 经典热力图
- 蜂窝热力图
- 网格热力图
#### 栅格地图
- 图片
- Raster
## 📦 如何使用
### 安装
```
npm install @antv/l7@beta
```
### 初始化地图
```javascript
import { Scene } from '@antv/l7';
import { Mapbox } from '@antv/l7-maps';
const scene = new Scene({
id: 'map',
map: new Mapbox({
style: 'light',
pitch: 0,
center: [107.054293, 35.246265],
zoom: 4.056,
}),
});
```
### 添加图层
```javascript
import { PointLayer } from '@antv/l7';
const pointLayer = new PointLayer()
.source(data)
.shape('circle')
.size('mag', [1, 25])
.color('mag', ['#5B8FF9', '#5CCEA1'])
.style({
opacity: 0.3,
strokeWidth: 1,
});
scene.addLayer(pointLayer);
```
## :memo: 文档
- [开始使用](https://l7.antv.vision/en/docs/api/l7)
- [教程](https://l7.antv.vision/en/docs/tutorial/quickstart)
- [文档](https://l7.antv.vision/en/docs/api/l7)
- [示例](https://l7.antv.vision/en/examples/gallery/basic)
- [贡献](./.github/CONTRIBUTING.md)
## ✅ License
[MIT license](./LICENSE).

133
babel.config.js Normal file
View File

@ -0,0 +1,133 @@
// @see https://babeljs.io/docs/en/next/config-files#project-wide-configuration
module.exports = api => {
api.cache(() => process.env.NODE_ENV);
const isSite = api.env('site');
const isCDNBundle = api.env('bundle');
const isCommonJS = api.env('cjs');
const isESModule = api.env('esm');
const isTest = api.env('test');
if (isSite) {
return {
presets: [
'babel-preset-gatsby'
],
plugins: [
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
'transform-inline-environment-variables',
[
'@babel/plugin-proposal-decorators',
{
legacy: true
}
],
[
// import glsl as raw text
'babel-plugin-inline-import',
{
extensions: [
// 由于使用了 TS 的 resolveJsonModule 选项JSON 可以直接引入,不需要当作纯文本
'.pbf',
'.glsl'
]
}
]
]
};
}
return {
presets: [
[
'@babel/env',
{
// https://babeljs.io/docs/en/babel-preset-env#usebuiltins
// useBuiltIns: 'usage',
...isCDNBundle ? { corejs: '3.0.0' } : {},
useBuiltIns: isCDNBundle ? 'usage' : false,
// set `modules: false` when building CDN bundle, let rollup do commonjs works
// @see https://github.com/rollup/rollup-plugin-babel#modules
modules: (isCDNBundle || isESModule) ? false : 'auto',
targets: {
chrome: 58,
browsers: [ 'ie >= 11' ]
}
}
],
[
'@babel/preset-react',
{
development: isCommonJS
}
],
'@babel/preset-typescript'
],
plugins: [
isCDNBundle ? {} : '@babel/plugin-transform-runtime',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-syntax-async-generators',
// '@babel/plugin-transform-parameters',
'transform-node-env-inline',
[
'@babel/plugin-proposal-decorators',
{
legacy: true
}
],
[
'@babel/plugin-proposal-class-properties',
{
// @see https://github.com/storybookjs/storybook/issues/6069#issuecomment-472544973
loose: true
}
],
'@babel/plugin-syntax-dynamic-import',
// let rollup do commonjs works
// @see https://github.com/rollup/rollup-plugin-babel#modules
(isCDNBundle || isESModule) ? {} : '@babel/plugin-transform-modules-commonjs',
// 开发模式下以原始文本引入,便于调试
isCDNBundle ? {} : [
// import glsl as raw text
'babel-plugin-inline-import',
{
extensions: [
// 由于使用了 TS 的 resolveJsonModule 选项JSON 可以直接引入,不需要当作纯文本
// '.json',
'.glsl'
]
}
],
isCDNBundle ? {} : [
'transform-import-styles'
],
[
// @see https://github.com/babel/babel/issues/8741#issuecomment-509041135
'const-enum',
{
transform: 'constObject'
}
],
// 按需引用 @see https://github.com/lodash/babel-plugin-lodash
'lodash'
// 内联 WebGL 常量 @see https://www.npmjs.com/package/babel-plugin-inline-webgl-constants
// isCDNBundle ? 'inline-webgl-constants' : {},
],
ignore: [
// /node_modules\/(?![kdbush|supercluster|async])/,
'node_modules',
...!isTest ? [
'**/*.test.tsx',
'**/*.test.ts',
'**/*.story.tsx',
'__snapshots__',
'__tests__',
'__stories__',
'**/*/__snapshots__',
'**/*/__tests__'
] : []
]
};
};

2
build/bundle.ts Normal file
View File

@ -0,0 +1,2 @@
// @ts-ignore
export * from '@antv/l7';

View File

@ -0,0 +1,33 @@
import { createFilter } from 'rollup-pluginutils';
// borrow from https://github.com/uber/luma.gl/blob/master/dev-modules/babel-plugin-remove-glsl-comments/index.js#L4-L5
const INLINE_COMMENT_REGEX = /\s*\/\/.*[\n\r]/g;
const BLOCK_COMMENT_REGEX = /\s*\/\*(\*(?!\/)|[^*])*\*\//g;
// 生产环境压缩 GLSL
export default function glsl(include, minify) {
const filter = createFilter(include);
return {
name: 'glsl',
transform(code, id) {
if (!filter(id)) return;
if (minify) {
code = code
.trim() // strip whitespace at the start/end
.replace(/\n+/g, '\n') // collapse multi line breaks
// remove comments
.replace(INLINE_COMMENT_REGEX, '\n')
.replace(BLOCK_COMMENT_REGEX, '')
.replace(/\n\s+/g, '\n') // strip identation
// .replace(/\s?([+-\/*=,])\s?/g, '$1') // strip whitespace around operators
// .replace(/([;\(\),\{\}])\n(?=[^#])/g, '$1'); // strip more line breaks
}
return {
code: `export default ${JSON.stringify(code)};`,
map: { mappings: '' }
};
}
};
}

100
build/rollup.config.js Normal file
View File

@ -0,0 +1,100 @@
import path from 'path';
import alias from '@rollup/plugin-alias';
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import { terser } from 'rollup-plugin-terser';
import analyze from 'rollup-plugin-analyzer';
import babel from 'rollup-plugin-babel';
import glsl from './rollup-plugin-glsl';
import postcss from 'rollup-plugin-postcss';
import url from 'postcss-url';
const { BUILD, MINIFY } = process.env;
const minified = MINIFY === 'true';
const production = BUILD === 'production';
const outputFile = !production
? 'packages/l7/dist/l7-dev.js'
: minified
? 'packages/l7/dist/l7.js'
: 'packages/l7/dist/l7-dev.js';
function resolveFile(filePath) {
return path.join(__dirname, '..', filePath);
}
module.exports = [
{
input: resolveFile('build/bundle.ts'),
output: {
file: resolveFile(outputFile),
format: 'umd',
name: 'L7',
globals: {
'mapbox-gl': 'mapboxgl'
}
},
external: [
'mapbox-gl'
],
treeshake: minified,
plugins: [
alias(
{
resolve: [ '.tsx', '.ts' ],
entries: [
{
find: /^@antv\/l7-(.*)/,
replacement: resolveFile('packages/$1/src'),
},
{
find: /^@antv\/l7$/,
replacement: resolveFile('packages/l7/src'),
}
]
}
),
resolve({
browser: true,
preferBuiltins: false,
extensions: [ '.js', '.ts' ]
}),
glsl(
[ '**/*.glsl' ],
true
),
json(),
postcss({
extract: false,
plugins: [
url({ url: 'inline' })
]
}),
// @see https://github.com/rollup/rollup-plugin-node-resolve#using-with-rollup-plugin-commonjs
commonjs({
namedExports: {
eventemitter3: [ 'EventEmitter' ],
// @see https://github.com/rollup/rollup-plugin-commonjs/issues/266
lodash: [
'isNil',
'uniq',
'clamp',
'isObject',
'isFunction',
'cloneDeep',
'isString',
'isNumber',
'merge'
]
}
}),
babel({
extensions: [ '.js', '.ts' ]
}),
// terser(),
minified ? terser() : false,
analyze({
summaryOnly: true,
limit: 20
})
]
}
];

5
commitlint.config.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
extends: [
'@commitlint/config-conventional'
]
};

41
demos/demo/arc.js Normal file
View File

@ -0,0 +1,41 @@
import { Scene, LineLayer } from '@antv/l7';
import { Mapbox } from '@antv/l7-maps';
const scene = new Scene({
id: 'map',
map: new Mapbox({
pitch: 0,
style: 'dark',
center: [0, 23.107329],
zoom: 0,
}),
});
fetch(
'https://gw.alipayobjects.com/os/basement_prod/b83699f9-a96d-49b8-b2ea-f99299faebaf.json',
)
.then((res) => res.json())
.then((data) => {
function getAirportCoord(idx) {
return [data.airports[idx][3], data.airports[idx][4]];
}
const routes = data.routes.map(function(airline) {
return {
coord: [getAirportCoord(airline[1]), getAirportCoord(airline[2])],
};
});
const layer = new LineLayer({})
.source(routes, {
parser: {
type: 'json',
coordinates: 'coord',
},
})
.size(0.6)
.shape('arc')
.color('rgb(5, 5, 50)')
.style({
opacity: 0.05,
});
scene.addLayer(layer);
});

110
demos/demo/bike.js Normal file
View File

@ -0,0 +1,110 @@
/* eslint-disable no-eval */
import { Scene, LineLayer, PointLayer } from '@antv/l7';
import { Mapbox } from '@antv/l7-maps';
const scene = new Scene({
id: 'map',
map: new Mapbox({
pitch: 40,
style: 'dark',
center: [ 3.438, 40.16797 ],
zoom: 0.51329
})
});
Promise.all(
[ fetch('https://gw.alipayobjects.com/os/basement_prod/9acd4831-5655-41a5-b0a0-831603e0092d.json').then(function(d) {
return d.text();
}).then(JSON.parse), fetch('https://gw.alipayobjects.com/os/basement_prod/dbe4e40b-3fbf-4a20-b36b-7a8bd3b8aef2.csv').then(function(d) {
return d.text();
}), fetch('https://gw.alipayobjects.com/os/basement_prod/89d20ef7-77df-44ca-a238-6e3679ab3ae4.csv').then(function(d) {
return d.text();
}) ]).then(function onLoad([ coordinates, trips, stations ]) {
const stationArray = parseCSV(stations);
const stationObj = {};
stationArray.forEach(function(st) {
stationObj[st.station_id] = {
x: st.longitude * 1,
y: st.latitude * 1
};
});
const tripsArray = parseCSV(trips);
const triplines = [];
tripsArray.forEach(function(trip) {
if (stationObj[trip.start_station] && stationObj[trip.end_station]) {
const line = {
x: stationObj[trip.start_station].x,
y: stationObj[trip.start_station].y,
x1: stationObj[trip.end_station].x,
y1: stationObj[trip.end_station].y,
duration: trip.duration
};
triplines.push(line);
}
});
const roadlayer = new LineLayer().source(coordinates).shape('line')
.size(0.6)
.color('#eee')
.active(true)
.style({
opacity: 0.9
});
const stationLayer = new PointLayer().source(stations, {
parser: {
type: 'csv',
x: 'longitude',
y: 'latitude'
}
}).shape('circle')
.active(true)
.size(40)
.color('#fec44f')
.animate(true)
.style({
opacity: 1.0
})
.render();
const arclayer = new LineLayer().source(triplines.slice(0, 1000), {
parser: {
type: 'json',
x: 'x',
y: 'y',
x1: 'x1',
y1: 'y1'
}
})
.color('#ff6b34')
.shape('arc3d')
.size(1)
.style({
opacity: 1.0
})
.animate({
interval: 0.5,
trailLength: 0.5,
duration: 1
});
arclayer.fitBounds();
scene.addLayer(roadlayer);
scene.addLayer(stationLayer);
scene.addLayer(arclayer);
});
function parseCSV(data) {
const lines = data.split('\n');
const header = lines[0];
const columns = header.split(',');
return lines.slice(1).filter(function(l) {
return l;
}).map(function(line) {
const obj = {};
line.split(',').forEach(function(value, i) {
const name = columns[i];
obj[name] = value;
});
return obj;
});
}

Binary file not shown.

View File

@ -0,0 +1,25 @@
import { Scene, ImageLayer } from '@antv/l7';
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'amap',
style: 'light',
center: [ 121.2680, 30.3628 ],
zoom: 13
});
const layer = new ImageLayer({});
layer.source(
'https://gw.alipayobjects.com/zos/rmsportal/FnHFeFklTzKDdUESRNDv.jpg',
{
parser: {
type: 'image',
extent: [ 121.168, 30.2828, 121.384, 30.4219 ]
}
}
);
scene.on('loaded', () => {
scene.addLayer(layer);
});

View File

@ -0,0 +1,21 @@
{
"title": {
"zh": "栅格图层",
"en": "Gallery"
},
"demos": [
{
"filename": "image.js",
"title": "图片",
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*ZrCaR53185IAAAAAAAAAAABkARQnAQ"
},
{
"filename": "raster.js",
"title": "地形"
},
{
"filename": "light.js",
"title": "夜光图"
}
]
}

View File

@ -0,0 +1,60 @@
import { RasterLayer, Scene } from '@antv/l7';
import * as GeoTIFF from 'geotiff';
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'mapbox',
style: 'light',
center: [121.2680, 30.3628],
zoom: 3,
});
async function getTiffData() {
const response = await fetch(
'https://gw.alipayobjects.com/os/rmsportal/XKgkjjGaAzRyKupCBiYW.dat',
);
const arrayBuffer = await response.arrayBuffer();
const tiff = await GeoTIFF.fromArrayBuffer(arrayBuffer);
const image = await tiff.getImage();
const width = image.getWidth();
const height = image.getHeight();
const values = await image.readRasters();
return {
data: values[0],
width,
height,
min: 0,
max: 8000,
};
}
async function addLayer() {
const tiffdata = await getTiffData();
const layer = new RasterLayer({});
layer
.source(tiffdata.data, {
parser: {
type: 'raster',
width: tiffdata.width,
height: tiffdata.height,
min: 0,
max: 8000,
extent: [73.482190241, 3.82501784112, 135.106618732, 57.6300459963],
},
})
.style({
heightRatio:100,
opacity: 0.8,
rampColors: {
colors: [ '#FF4818', '#F7B74A', '#FFF598', '#91EABC', '#2EA9A1', '#206C7C' ].reverse(),
positions: [0, 0.2, 0.4, 0.6, 0.8, 1.0]
},
});
return layer;
}
scene.on('loaded', async () =>{
const layer = await addLayer();
scene.addLayer(layer);
scene.render();
})

View File

@ -0,0 +1,4 @@
---
title: Raster Map
order: 0
---

View File

@ -0,0 +1,4 @@
---
title: 栅格图层
order: 0
---

View File

@ -0,0 +1,56 @@
import { AMapScene, LineLayer } from '@antv/l7-react';
import * as React from 'react';
export default React.memo(function Map() {
const [ data, setData ] = React.useState();
React.useEffect(() => {
const fetchData = async () => {
const response = await fetch(
'https://gw.alipayobjects.com/os/basement_prod/32e1f3ab-8588-46cb-8a47-75afb692117d.json'
);
const raw = await response.json();
setData(raw);
};
fetchData();
}, []);
return (
<>
<AMapScene
map={{
center: [ 110.19382669582967, 50.258134 ],
pitch: 0,
style: 'dark',
zoom: 1
}}
style={{
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0
}}
>
<LineLayer
key={'2'}
source={{
data
}}
size={{
values: 1
}}
color={{
values: '#fff'
}}
shape={{
values: 'line'
}}
style={{
opacity: 1
}}
/>
)}
</AMapScene>
</>
);
});

View File

@ -0,0 +1,14 @@
{
"title": {
"zh": "Scene 组件",
"en": "Scene Component"
},
"demos": [
{
"filename": "amap.jsx",
"title": "高德地图",
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*ZiMnSZlmblIAAAAAAAAAAABkARQnAQ"
}
]
}

View File

@ -0,0 +1,4 @@
---
title: React Map
order: 0
---

View File

@ -0,0 +1,4 @@
---
title: React 地图
order: 0
---

View File

@ -0,0 +1,56 @@
import { PointLayer, Scale, Scene, Layers, Zoom } from '@antv/l7';
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'amap',
style: 'dark',
center: [121.40, 31.258134],
zoom: 14,
});
fetch('https://gw.alipayobjects.com/os/basement_prod/893d1d5f-11d9-45f3-8322-ee9140d288ae.json')
.then((res) => res.json())
.then((data) => {
const pointLayer =
new PointLayer({
})
.source(data, {
parser: {
type: 'json',
x: 'longitude',
y: 'latitude'
}
}).shape('circle')
.size('unit_price', [5, 25])
.color('name',['#49B5AD', "#5B8FF9"])
.style({
opacity: 0.3,
strokeWidth: 1,
})
scene.addLayer(pointLayer);
var overlayers = {
"围栏填充": pointLayer,
};
var baseLayers = {
"基础地图": pointLayer,
};
const layersControl = new Layers({
overlayers: overlayers,
});
scene.addControl(layersControl);
});
const zoomControl = new Zoom();
const scaleControl = new Scale({
position:"bottomright"
});
scene.addControl(zoomControl);
scene.addControl(scaleControl);

View File

@ -0,0 +1,18 @@
import { Scale, Zoom, Scene } from '@antv/l7';
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'mapbox',
style: 'light',
center: [-97.119140625, 38.75408327579141],
zoom: 2,
});
const zoomControl = new Zoom();
const scaleControl = new Scale({
position:'rightbottom',
});
scene.addControl(zoomControl);
scene.addControl(scaleControl);

View File

@ -0,0 +1,16 @@
{
"title": {
"zh": "地图",
"en": "Category"
},
"demos": [
{
"filename": "amap.js",
"title": "高德底图组件",
},
{
"filename": "mapbox.js",
"title": "MapBox底图组件"
}
]
}

View File

@ -0,0 +1,55 @@
import { Scale, Zoom, Scene, Layers, PointLayer } from '@antv/l7';
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'amap',
style: 'dark',
center: [121.40, 31.258134],
zoom: 5,
});
fetch('https://gw.alipayobjects.com/os/basement_prod/893d1d5f-11d9-45f3-8322-ee9140d288ae.json')
.then((res) => res.json())
.then((data) => {
const pointLayer =
new PointLayer({
})
.source(data, {
parser: {
type: 'json',
x: 'longitude',
y: 'latitude'
}
}).shape('circle')
.size('unit_price', [5, 25])
.color('name',['#49B5AD', "#5B8FF9"])
.style({
opacity: 0.3,
strokeWidth: 1,
})
scene.addLayer(pointLayer);
var overlayers = {
"围栏填充": pointLayer,
};
var baseLayers = {
"基础地图": pointLayer,
};
const layersControl = new Layers({
overlayers: overlayers,
baseLayers,
});
scene.addControl(layersControl);
});
const zoomControl = new Zoom();
const scaleControl = new Scale();
scene.addControl(zoomControl);
scene.addControl(scaleControl);

View File

@ -0,0 +1,4 @@
---
title: control
order: 2
---

View File

@ -0,0 +1,6 @@
---
title: 组件
order: 2
---

View File

@ -0,0 +1,37 @@
import { LineLayer, Scene } from '@antv/l7';
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'mapbox',
style: 'light',
center: [102.602992, 23.107329],
zoom: 13,
});
fetch('https://gw.alipayobjects.com/os/rmsportal/ZVfOvhVCzwBkISNsuKCc.json')
.then((res) => res.json())
.then((data) => {
const layer =
new LineLayer({
})
.source(data)
.size(1)
.shape('line')
.color(
'ELEV',
[
'#E8FCFF',
'#CFF6FF',
'#A1E9ff',
'#65CEF7',
'#3CB1F0',
'#2894E0',
'#1772c2',
'#105CB3',
'#0D408C',
'#002466',
].reverse(),
)
scene.addLayer(layer);
});

View File

@ -0,0 +1,13 @@
{
"title": {
"zh": "图库",
"en": "Gallery"
},
"demos": [
{
"filename": "line.js",
"title": "线图层",
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*KCyXTJrePiYAAAAAAAAAAABkARQnAQ"
}
]
}

View File

@ -0,0 +1,4 @@
---
title: Data
order: 1
---

View File

@ -0,0 +1,4 @@
---
title: 数据
order: 1
---

View File

@ -0,0 +1,9 @@
import { Scene } from '@antv/l7';
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'amap',
style: 'dark',
center: [121.40, 31.258134],
zoom: 5,
});

View File

@ -0,0 +1,10 @@
import { Scene } from '@antv/l7';
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'mapbox',
style: 'light',
center: [ -97.119140625, 38.75408327579141],
zoom: 2,
});

View File

@ -0,0 +1,18 @@
{
"title": {
"zh": "地图",
"en": "Category"
},
"demos": [
{
"filename": "amap.js",
"title": "高德底图",
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*KCyXTJrePiYAAAAAAAAAAABkARQnAQ"
},
{
"filename": "mapbox.js",
"title": "MapBox底图",
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*KCyXTJrePiYAAAAAAAAAAABkARQnAQ"
}
]
}

View File

@ -0,0 +1,6 @@
---
title: map
order: 0
---
初始 L7 地图实例

View File

@ -0,0 +1,9 @@
---
title: 地图
order: 0
redirect_from:
- /zh/tutorial
---
初始 L7 地图实例

View File

@ -0,0 +1,98 @@
# ConfigSchemaValidation 设计
用户在使用 L7 的 Scene/Layer API 时,由于参数配置项众多难免会误传。需要在运行时通过校验提前发现并给出友好的提示。
另外由于 L7 允许用户自定义 Layer 与 LayerPlugin规范化参数配置项也能提升易用性和质量。
这方面 Webpack 做的很好,使用 [schema-utils](https://github.com/webpack/schema-utils) 基于 JSON Schema 对 Plugin 和 Loader 进行校验。如果传入了错误的配置项,会给出友好的提示:
```
Invalid configuration object. MyPlugin has been initialised using a configuration object that does not match the API schema.
- configuration.optionName should be a integer.
```
和 Webpack 一样,我们也选择 [ajv](https://github.com/epoberezkin/ajv) 作为 JSON Schema 校验器。
目前我们只在 Layer 初始阶段进行校验,一旦校验失败会中断后续初始化插件的处理,并在控制台给出校验失败信息。后续需要在属性更新时同样进行校验。
## 地图参数校验
当用户传入地图参数时,需要进行校验:
```javascript
// l7-core/services/config/mapConfigSchema.ts
export default {
properties: {
// 地图缩放等级
zoom: {
type: 'number',
minimum: 0,
maximum: 20,
},
// 地图中心点
center: {
item: {
type: 'number',
},
maxItems: 2,
minItems: 2,
},
// 仰角
pitch: {
type: 'number',
},
},
};
```
## Layer 基类配置项 Schema
目前在基类中我们声明了如下属性及其对应的校验规则:
```javascript
export default {
properties: {
// 开启拾取
enablePicking: {
type: 'boolean',
},
// 开启高亮
enableHighlight: {
type: 'boolean',
},
// 高亮颜色:例如 [0, 0, 1, 1] 或者 '#ffffff'
highlightColor: {
oneOf: [
{
type: 'array',
items: {
type: 'number',
minimum: 0,
maximum: 1,
},
},
{
type: 'string',
},
],
},
},
};
```
如果传入了错误的配置项则会在控制台给出提示。
## Layer 子类配置项 Schema
Layer 子类可以通过重载 `getConfigSchema()` 方法定义自身的特有属性。例如 `PolygonLayer` 需要定义透明度:
```javascript
protected getConfigSchema() {
return {
properties: {
opacity: {
type: 'number',
minimum: 0,
maximum: 1,
},
},
};
}
```

View File

@ -0,0 +1,213 @@
# IoC 容器、依赖注入与服务说明
在面向对象编程领域,[SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)) 、[“组合优于继承”](https://en.wikipedia.org/wiki/Composition_over_inheritance) 都是经典的设计原则。
IoC(Inversion of Control) 控制反转这种设计模式将对象的创建销毁、依赖关系交给容器处理,是以上设计原则的一种经典实践。其中它的一种实现 DI(Dependency Injection) 即依赖注入在工程领域应用十分广泛(下图来自 [Dependency-Injection-in-practice-CodeCAMP.pdf](http://www.mono.hr/Pdf/Dependency-Injection-in-practice-CodeCAMP.pdf)),最著名的当属 Spring
![](./screenshots/di-containers.png)
而在 JavaScript 领域,[Angular](https://angular.io/guide/dependency-injection)、[NestJS](https://docs.nestjs.com/fundamentals/custom-providers) 也都实现了自己的 IoC 容器。
L7 选择了 [InversifyJS](https://github.com/inversify/InversifyJS/blob/master/wiki/oo_design.md) 作为轻量的 IoC 容器,统一管理各类复杂的服务,实现松耦合的代码结构,同时具有以下收益:
* 提供高扩展性。
* 支持地图底图高德、Mapbox切换
* 支持渲染引擎替换
* 插件化
* 便于测试。测试用例中替换渲染引擎服务为基于 headless-gl 的渲染服务。
下图清晰的展示了切换引擎和底图时均不会影响核心代码:
![](./screenshots/packages.png)
# 多层次容器
L7 需要支持多场景(Scene),每个场景中又包含了多个图层(Layer)。不同的服务可能隶属全局、Scene 和 Layer因此对于容器也有层次化的要求。
试想如果我们只有一个全局容器,其中绑定的所有服务自然也都成了全局服务,在多场景下(页面中一个高德地图、一个 Mapbox销毁高德地图的渲染服务将影响到 Mapbox 的展示。
下图为 L7 的四个独立场景(两个高德、两个 MapboxDEMO 展示效果,它们应该是能互不干扰运行的:
![](./screenshots/multi-scene.png)
在 Angular 中也有[分层容器](https://angular.io/guide/hierarchical-dependency-injection)的应用。L7 使用的是 InversifyJS 提供的[层次化依赖注入功能](https://github.com/inversify/InversifyJS/blob/master/wiki/hierarchical_di.md)。
容器层次关系及数目如下:
```bash
RootContainer 1
-> SceneContainer 1.*
-> LayerContainer 1.*
```
其中每种容器包含不同类型的服务,这些服务有的是单例,有的是工厂方法。子容器应该能访问父容器中绑定的服务,即如果 RootContainer 已经绑定了全局日志服务SceneContainer 不需要重复绑定也能注入。
下面详细介绍下每种容器中的服务及其 API在自定义图层、自定义插件以及自定义后处理效果中都可以方便地使用这些服务。
## 全局容器
一些全局性服务不需要用户手动创建,也无需显式销毁。我们在全局容器中完成一次性的绑定,后续在所有场景、图层中都可以让容器注入这些服务的单例。类似 Angular 中的 [root ModuleInjector](https://angular.io/guide/hierarchical-dependency-injection#moduleinjector)。
例如日志、Shader 模块化服务应该是全局性的单例,我们在 `RootContainer` 完成依赖声明:
```typescript
// 在根容器中绑定日志服务为单例
rootContainer
.bind<ILogService>(TYPES.ILogService)
.to(LogService)
.inSingletonScope();
```
目前 L7 中全局性服务说明如下:
| 服务名称 | 类型 | 说明 |
| -------- | --- | --------- |
| logger | 全局服务 | 在控制台输出信息 |
* 日志服务。
* Shader 模块化服务。提供基本的 GLSL 模块化服务,基于字符串替换实现。
* 配置项校验服务。[详见](./ConfigSchemaValidation.md)
### 日志服务
基于 `probe.gl` 实现,默认只输出 debug 级别以上的日志信息。开发模式下通过设置日志等级输出 debug 信息,另外 debug 信息会带上时间戳打点,类似这样:
```bash
L7: 403ms map loaded
L7: 405ms add event listeners on canvas
L7: 676ms regenerate vertex attributes: color finished
```
通过 `logger` 引用,可使用 API 如下:
| 方法名 | 参数 | 返回值 | 说明 |
| -------- | ------------- | --------- | --------- |
| debug | `(message: string)` | 无 | 输出 debug 级别信息,会带上时间戳 |
| info | `(message: string)` | 无 | 输出 info 级别信息 |
| warn | `(message: string)` | 无 | 输出 warn 级别信息 |
| error | `(message: string)` | 无 | 输出 error 级别信息 |
在自定义图层中使用示例如下:
```typescript
class PolygonLayer extends BaseLayer<IPolygonLayerStyleOptions> {
protected renderModels() {
// 输出 debug 级别信息
this.logger.debug('start to render...');
}
}
```
### Shader 模块化服务
通过 `shaderModuleService` 引用,可使用 API 如下:
| 方法名 | 参数 | 返回值 | 说明 |
| -------- | ------------- | --------- | --------- |
| registerModule | `(moduleName: string, moduleParams: IModuleParams)` | 无 | 使用模块名和参数注册 GLSL 模块,其中 `IModuleParams` 格式见下面 |
| getModule | `(moduleName: string)` | `IModuleParams` | 根据模块名获取编译后的 GLSL 模块 |
GLSL 模块参数如下:
```typescript
interface IModuleParams {
vs: string; // vertex shader 字符串
fs: string; // fragment shader 字符串
uniforms?: { // 可选uniforms
[key: string]: IUniform;
};
}
```
我们以自定义后处理效果场景为例,完整教程见[自定义后处理效果](自定义后处理效果.md)
```typescript
protected setupShaders() {
// 使用 Shader 服务注册 GLSL 模块
this.shaderModuleService.registerModule('dotScreenEffect', {
vs: this.quad, // Vertex Shader 固定
fs: ``, // 暂时省略,在下一小节中详细介绍
});
// 使用 Shader 服务获取编译后的 GLSL 模块
const { vs, fs, uniforms } = this.shaderModuleService.getModule('dotScreenEffect');
// 使用渲染器服务获取视口尺寸
const { width, height } = this.rendererService.getViewportSize();
return {
vs,
fs,
uniforms: {
...uniforms,
u_ViewportSize: [width, height],
},
};
}
```
### 配置项校验服务
开发者不需要显式调用该服务。
Layer 子类可以通过重载 `getConfigSchema()` 方法定义自身的特有属性。例如 `PolygonLayer` 需要定义透明度,详见[ConfigSchemaValidation 使用方法](ConfigSchemaValidation.md)
```typescript
protected getConfigSchema() {
return {
properties: {
opacity: {
type: 'number',
minimum: 0,
maximum: 1,
},
},
};
}
```
以上就是供开发者使用的常见全局服务,下面我们将介绍场景容器及其内部服务。
## Scene 容器
场景可以承载多个图层,与地图底图一一对应。每个场景都有自己独立的容器确保多个场景间服务不会互相干扰,同时继承全局容器以便访问全局服务。容器内服务包括:
* 地图底图服务。每个场景有一个对应的地图底图。
* 渲染引擎服务。由于依赖 WebGL 上下文,基于 `regl` 实现。
* 图层管理服务。管理场景中所有的图层,负责图层的创建、销毁。
* PostProcessingPass。内置常用的后处理效果。
### 地图底图服务
兼容 Mapbox 和高德,开发者可以获取当前地图的状态、调用地图相机动作(缩放、平移、旋转)。
通过 `mapService` 引用。
常用地图状态获取方法如下:
| 方法名 | 参数 | 返回值 | 说明 |
| -------- | ------------- | --------- | --------- |
| getSize | 无 | `[number, number]` | 获取地图尺寸(像素单位) |
| getZoom | 无 | `number` | 获取当前地图缩放等级,以 Mapbox 为准 |
| getCenter | 无 | `{lng: number; lat: number}` | 获取当前地图中心点经纬度 |
| getPitch | 无 | `number` | 获取当前地图仰角 |
| getRotation | 无 | `number` | 获取当前地图逆时针旋转角度 |
| getBounds | 无 | `[[number, number], [number, number]]` | 获取当前地图可视区域 `[西南角、东北角]` |
⚠️对于一些地图属性将采用兼容性处理。
* 缩放等级,差异表现在:
1. 取值范围。高德缩放等级范围 `[3, 18]`,而 Mapbox 为 `[0, 20]`
2. 高德 `3` 缩放等级对应 Mapbox `2` 缩放等级。考虑兼容性,`getZoom()` 将返回 Mapbox 定义等级。
* 旋转角度。高德返回地图顺时针旋转角度Mapbox 返回逆时针旋转角度。考虑兼容性,`getRotation()` 将返回地图逆时针旋转角度。
除了获取地图状态,还可以控制地图进行一些相机动作。
### [WIP]渲染引擎服务
目前 L7 使用 [regl](https://github.com/regl-project/regl),但开发者不需要关心底层 WebGL 渲染引擎实现,即使后续更换了其他引擎,我们也将保持服务接口的稳定。
通过 `rendererService` 引用。
### 图层管理服务
开发者不需要显式调用。用于管理场景中所有的图层,负责图层的创建、销毁。
## Layer 容器
每个图层有独立的容器,同时继承自所属场景容器,自然也可以访问全局服务。
* 样式管理服务。
* MultiPassRenderer 服务。详见[MultiPassRenderer 说明](./MultiPassRenderer.md)
## 参考资料
* [动态依赖注入](https://github.com/inversify/InversifyJS/issues/1088)

View File

@ -0,0 +1,167 @@
# MultiPassRenderer 实现
每个 Layer 渲染时都需要经历多个流程,从最简单的清屏、拾取到各种各样的后处理。我们希望把复杂渲染流程中每个步骤都抽象出来,让 L7 内部以及用户能够方便的扩展,进行渲染流程的自定义。其中的每一个步骤称作 Pass负责串联调用各个 Pass 的渲染器称作 MultiPassRenderer。
![](./screenshots/blurpass.png)
## 接口设计
目前我们将 Pass 分成两类:
1. 渲染相关。例如 ClearPass、RenderPass、PickingPass、ShadowPass
2. 后处理相关。例如 CopyPass、BlurPass
```typescript
export enum PassType {
Normal = 'normal',
PostProcessing = 'post-processing',
}
```
每个 Pass 定义两个生命周期节点,初始化和渲染,并将当前 Layer 作为参数传入。因此 Pass 中可以访问 Layer 上的属性及方法:
```typescript
export interface IPass {
getType(): PassType;
init(layer: ILayer): void;
render(layer: ILayer): void;
}
```
其中后处理相关的 Pass 比较特殊,例如最后一个 PostProcessingPass 需要自动切换 renderTarget 为屏幕:
```typescript
export interface IPostProcessingPass extends IPass {
setRenderToScreen(renderToScreen: boolean): void;
isEnabled(): boolean;
setEnabled(enabled: boolean): void;
}
```
具体实现依赖 `@antv/l7-renderer` 实现,目前使用 regl 实现 IFramebuffer 等接口。
## 内置 Pass
目前我们仅对外开放 PostProcessing 后处理相关 Pass 的配置。在 L7 内部我们使用如下流程:
```
ClearPass -> RenderPass -> [ ...其他后处理 Pass ] -> CopyPass
```
目前各内置 Pass 说明如下:
| Pass 名称 | 类型 | 参数 | 说明 |
| -------- | --- | ------------- | --------- |
| ClearPass | normal | 无 | 清除 framebufferclearColor 为 [0, 0, 0, 0] |
| RenderPass | normal | 无 | 渲染到 framebuffer作为后续后处理的输入 |
| PickingPass | normal | 无 | 负责拾取,[详见](./PixelPickingEngine.md) |
| TAAPass | normal | 无 | [详见](./TAA.md) |
| CopyPass | post-processing | 无 | 作为后处理最后一个 Pass负责拷贝 framebuffer 到屏幕输出 |
剩余后处理效果见最后一节。
后续待实现 Pass 如下:
- [ ] ShadowPass 负责生成 shadowMap供 PCF、CSM 等实时阴影技术使用
## 使用方法
在每个 Layer 中,通过 `enableMultiPassRenderer` 开启之后,可以配置各个 Pass 的参数。配置方法类似 babel 插件:
```typescript
const layer = new PolygonLayer({
enableMultiPassRenderer: true,
passes: [
'blurH', // 使用 BlurHPass
[
'blurV', // 使用 BlurVPass
{
blurRadius: 20, // 设置模糊半径
},
],
],
});
```
## 内置后处理效果
参考了 [glfx](https://github.com/evanw/glfx.js) 中的一些常用图像处理效果。可以按照名称引用,顺序决定了各个效果的应用次序。例如我们想依次应用噪声和模糊效果:
```typescript
const layer = new PolygonLayer({
passes: [
[
'noise', // 使用 NoisePass
{
amount: 0.5,
},
]
'blurH', // 使用 BlurHPass
'blurV', // 使用 BlurVPass
],
});
```
下面详细介绍各个后处理效果及其参数,在 DEMO 中也可以通过 GUI 任意调节参数。
### 高斯模糊
采用 [高斯模糊 blur9](https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl)。
名称:`blurH/blurV`
参数:
* `blurRadius` 水平/垂直方向模糊半径,默认值为 `8.0`
效果如下:
![](./screenshots/blurpass.png)
### ColorHalftone
CMYK halftone 效果
名称:`colorHalftone`
参数:
* `angle` pattern 旋转角度,默认值为 0
* `size` pattern 大小,默认值为 8
* `center` `[x, y]` pattern 的中心,默认值为 `[0, 0]`
效果如下:
![](./screenshots/halftone.png)
### 噪声
噪声效果。
名称:`noise`
参数:
* `amount` 噪声程度,范围 `[0, 1]`,默认值为 `0.5`
效果如下:
![](./screenshots/noise.png)
### 六边形像素化处理
六边形像素化处理。
名称:`hexagonalPixelate`
参数:
* `scale` 六边形大小,默认值为 `10`
* `center` `[x, y]` pattern 的中心,默认值为 `[0.5, 0.5]`
效果如下:
![](./screenshots/hexagonalPixelate.png)
### Sepia
Sepia 颜色映射。
名称:`sepia`
参数:
* `amount` 程度,范围 `[0, 1]`,默认值为 `0.5`
效果如下:
![](./screenshots/sepia.png)

View File

@ -0,0 +1,151 @@
# PixelPickingEngine 设计
在地图交互中除了地图底图本身提供的平移、旋转、缩放、flyTo 等相机动作,最常用的就是信息要素的拾取以及后续的高亮了。
3D 引擎常用的拾取技术通常有两种RayPicking 和 PixelPicking。前者从鼠标点击处沿着投影方向发射一根射线通过包围盒碰撞检测获取到接触到的第一个对象后续就可以进行选中对象的高亮甚至是跟随移动了以上运算均在 CPU 侧完成。
但是在 L7 的场景中,海量数据在同一个 Geometry 中,无法计算每个要素的包围盒,因此在 GPU 侧完成的 PixelPicking 更加适合。
作为拾取引擎 PixelPickingEngine除了实现内置基本的拾取 Pass最重要的是提供友好易用的 API覆盖以下常见场景
* 基本的拾取场景,用户只需要开启 Layer 拾取功能并设置高亮颜色即可。
* 拾取后展示特定 UI 组件的场景,用户需要监听事件,在回调中使用上述拾取对象完成组件展示。
* 更灵活的联动场景,用户可以不依赖 L7 内置的事件监听机制,直接拾取并高亮指定点/区域包含的要素。
本文会依次介绍:
* PixelPicking 原理
* 使用方法
* 拾取对象结构
* 拾取 API 的使用方法
* 开启/关闭拾取
* 设置高亮颜色
* 展示自定义 UI 组件
* 在自定义 Layer 中使用
## PixelPicking 原理
在执行时机方面,基于 [MultiPassRenderer](./MultiPassRenderer.md) 的设计,拾取发生在实际渲染之前:
```
ClearPass -> PixelPickingPass -> RenderPass -> [ ...其他后处理 Pass ] -> CopyPass
```
PixelPickingPass 分解步骤如下:
1. `ENCODE` 阶段。逐要素编码idx -> color传入 attributes 渲染 Layer 到纹理。
2. 获取鼠标在视口中的位置。由于目前 L7 与地图结合的方案为双 Canvas 而非共享 WebGL Context事件监听注册在地图底图上。
3. 读取纹理在指定位置的颜色进行解码color -> idx),查找对应要素,作为 Layer `onHover/onClick` 回调参数传入。
4. `HIGHLIGHT` 阶段(可选)。将待高亮要素对应的颜色传入 Vertex Shader 用于每个 Vertex 判断自身是否被选中,如果被选中,在 Fragment Shader 中将高亮颜色与计算颜色混合。
## 使用方法
### 拾取对象结构定义
拾取对象结构定义如下:
| 参数名 | 类型 | 说明 |
| -------- | --- | ------------- |
| x | `number` | 鼠标位置在视口空间 x 坐标,取值范围 `[0, viewportWidth]` |
| y | `number` | 鼠标位置在视口空间 y 坐标,取值范围 `[0, viewportHeight]` |
| lnglat | `{ lng: number; lat: number; }` | 鼠标位置经纬度坐标 |
| feature | `object` | GeoJSON feature 属性 |
### API
对于基本的拾取场景,用户只需要开启 Layer 拾取功能并设置高亮颜色即可。
而对于拾取后展示特定 UI 组件的场景,用户需要监听事件,在回调中使用上述拾取对象完成组件展示。
最后,对于更灵活的联动场景,用户可以不依赖 L7 内置的事件监听机制,直接拾取并高亮指定点/区域包含的要素。
#### 禁用/开启拾取
并不是所有 Layer 都需要拾取(例如文本渲染 Layer通过 `enablePicking` 关闭可以跳过该阶段,减少不必要的渲染开销:
```typescript
const layer = new PolygonLayer({
enablePicking: false, // 关闭拾取
});
```
L7 默认开启拾取。
#### 设置高亮颜色
如果一个 Layer 开启了拾取,我们可以通过 `highlightColor` 设置高亮颜色:
```typescript
const layer = new PolygonLayer({
enablePicking: true, // 开启拾取
enableHighlight: true, // 开启高亮
highlightColor: [0, 0, 1, 1], // 设置高亮颜色为蓝色
});
```
#### 展示自定义 UI 组件
监听 Layer 上的 `hover/mousemove` 事件就可以得到拾取对象,然后通过对象中包含的位置以及原始数据信息,就可以使用 L7 内置或者自定义 UI 组件展示:
```typescript
layer.on('hover', ({ x, y, lnglat, feature }) => {
// 展示 UI 组件
});
layer.on('mousemove', ({ x, y, lnglat, feature }) => {
// 同上
});
```
除了基于事件监听,还可以通过 Layer 的构造函数传入 `onHover` 回调,在后续 Layer 对应的 react 组件中也可以以这种方式使用:
```typescript
const layer = new PolygonLayer({
enablePicking: true,
onHover: ({ x, y, lnglat, feature }) => {
// 展示 UI 组件
},
});
```
#### 直接调用拾取引擎方法
除了默认在地图上交互完成拾取,在与其他系统进行联动时,脱离了地图交互,仍需要具备拾取指定点/区域内包含要素的能力。
```typescript
anotherSystem.on('hover', ({ x, y }) => {
layer.pick({
x,
y,
});
});
```
⚠️目前只支持拾取视口中一个点所在的要素,未来可以实现拾取指定区域内的全部要素。
### 自定义 Layer 中的拾取
用户实现自定义 Layer 时,必然需要实现 Vertex/Fragment Shader。如果也想使用拾取功能就需要在 Shader 中引入拾取模块,方法如下。
在 Vertex Shader 中引入 `picking` 模块。关于 L7 Shader 的模块化设计,[详见]()。
```glsl
// mylayer.vert.glsl
#pragma include "picking"
void main() {
setPickingColor(customPickingColors);
}
```
在 Fragment Shader 中
```glsl
// mylayer.frag.glsl
#pragma include "picking"
void main() {
// 必须在末尾,保证后续不会再对 gl_FragColor 进行修改
gl_FragColor = filterPickingColor(gl_FragColor);
}
```
其中涉及 `picking` 模块方法说明如下:
| 方法名 | 应用 shader | 说明 |
| -------- | --- | ------------- |
| `setPickingColor` | `vertex` | 比较自身颜色编码与高亮颜色,判断是否被选中,传递结果给 fragment |
| `filterPickingColor` | `fragment` | 当前 fragment 被选中则使用高亮颜色混合,否则直接输出原始计算结果 |
## 参考资料
* [Deck.gl 交互文档](https://deck.gl/#/documentation/developer-guide/adding-interactivity)
* [Deck.gl Picking 实现](https://deck.gl/#/documentation/developer-guide/writing-custom-layers/picking)
* 「Interactive.Computer.Graphics.Top.Down.Approach - 3.9 Picking」

118
dev-docs/TAA.md Normal file
View File

@ -0,0 +1,118 @@
# 在地理场景中应用 TAA
## 问题背景
关于走样产生的原因以及常用的反走样手段,可以参考「知乎 - 反走样技术(一):几何反走样」[🔗](https://zhuanlan.zhihu.com/p/28800047)。
我之前也简单总结了下 SSAA、MLAA/SMAA、FXAA 等反走样技术的实现细节。
其中 MSAA 作为浏览器内置实现,开发者使用起来很简单:
> 相对于着色走样人眼对几何走样更敏感。MSAA 的原理很简单,它仍然把一个像素划分为若干个子采样点,但是相较于 SSAA每个子采样点的颜色值完全依赖于对应像素的颜色值进行简单的复制该子采样点位于当前像素光栅化结果的覆盖范围内不进行单独计算。此外它的做法和 SSAA 相同。由于 MSAA 拥有硬件支持,相对开销比较小,又能很好地解决几何走样问题,在游戏中应用非常广泛(我们在游戏画质选项中常看到的 4x/8x/16x 抗锯齿一般说的就是 MSAA 的子采样点数量分别为4/8/16个
下图为 4x MSAA 采样点示意:
![](./screenshots/MSAA.png)
在 Mapbox 中左图未开启 MSAA 而右图选择开启,观察立方体边缘可以发现明显的几何走样:相关 [ISSUE](https://github.com/mapbox/mapbox-gl-js/pull/8474)。
![](./screenshots/mapbox-MSAA.png)
但是 MSAA 存在一些限制:
* WebGL1 不支持对 FBO 进行,因此开启 post-processing 后处理时 MSAA 就失效了。当然 WebGL2 支持 🔗。
* 即使开启,浏览器在某些情况下也不保证应用 🔗。
因此在需要后处理的场景中(例如 L7 的热力图需要 blur pass、PBR 中的 SSAO 环境光遮蔽),只能采用其他反走样手段。
## TAA(Temporal Anti-Aliasing) 原理
来自「知乎 - Experimentalize TAA with no code」🔗
> 严格来说 TAA 并不能算一个具体的算法,而是更像一个统一的算法框架。和 SSAA 一样TAA 也能够同时减轻几何走样和着色走样的问题。
关于 TAA 的原理「GDC - Temporal Reprojection
Anti-Aliasing in INSIDE」[🔗](http://twvideo01.ubm-us.net/o1/vault/gdc2016/Presentations/Pedersen_LasseJonFuglsang_TemporalReprojectionAntiAliasing.pdf) 讲的十分清晰。如果相机和物体的相对位置在当前帧之前发生过变化,那么当前帧就可以以若干前序帧进行修正。
![](./screenshots/taa-1.png)
但如果在前序帧中相机和物体都没有发生过变化,那对于当前帧就无从修正了。因此可以对视锥进行抖动,在渲染每一帧之前,使用抖动矩阵对投影矩阵进行偏移,最终实现视锥的偏移:
![](./screenshots/taa-step1.png)
然后在 FS 中,最关键的就是 reproject 这一步:
![](./screenshots/taa-step2.png)
对于静止场景「Three.js - TAA example」[🔗](https://threejs.org/examples/#webgl_postprocessing_taa)、「ECharts.GL - temporalSuperSampling」[🔗](https://echarts.apache.org/zh/option-gl.html#globe.temporalSuperSampling) 都采用了这种方法。
## 实现方法
由于需要对投影矩阵进行抖动,我们需要选取低差异序列。
来自「知乎 - 低差异序列(一)- 常见序列的定义及性质」🔗,右图明显比左图纯随机生成覆盖面广:
![](./screenshots/halton.png)
参考 Echarts.GL我们选择 `Halton(2,3)` 低差异序列:
```typescript
const offset = this.haltonSequence[this.frame % this.haltonSequence.length];
this.cameraService.jitterProjectionMatrix(
((offset[0] * 2.0 - 1.0) / width) * jitterScale,
((offset[1] * 2.0 - 1.0) / height) * jitterScale,
);
```
在每一帧都会尝试进行累加。如果在连续运动过程中TAA 的累加过程必然来不及完成,此时只需要输出当前帧原始结果即可,随后尝试继续轮询累加是否完成。因此在累加完成之前,都会输出当前帧未经 TAA 的结果。
最后我们需要进行加权平均,历史帧的权重应当越来越小:
![](./screenshots/taa-step3.png)
这里我们选择当前帧权重为 0.9,历史帧为 0.1
```typescript
useFramebuffer(this.outputRenderTarget, () => {
this.blendModel.draw({
uniforms: {
u_opacity: layerStyleOptions.opacity || 1,
u_MixRatio: this.frame === 0 ? 1 : 0.9,
u_Diffuse1: this.sampleRenderTarget,
u_Diffuse2:
this.frame === 0
? layer.multiPassRenderer.getPostProcessor().getReadFBO()
: this.prevRenderTarget,
},
});
});
```
最后我们将最终的混合结果“拷贝”给后处理模块,实现渐进增强的效果:
```typescript
useFramebuffer(
layer.multiPassRenderer.getPostProcessor().getReadFBO(),
() => {
this.copyModel.draw({
uniforms: {
u_Texture: this.copyRenderTarget,
},
});
},
);
// 调用后处理模块应用后续效果
layer.multiPassRenderer.getPostProcessor().render(layer);
```
## 最终效果
为了更直观地看到效果,在 DEMO 中我们可以调节相机抖动范围:
![](./screenshots/taa-result.gif)
## 参考资料
* 「知乎 - 反走样技术(一):几何反走样」[🔗](https://zhuanlan.zhihu.com/p/28800047)
* 「知乎 - Experimentalize TAA with no code」[🔗](https://zhuanlan.zhihu.com/p/41642855)
* 「ECharts.GL - temporalSuperSampling」[🔗](https://echarts.apache.org/zh/option-gl.html#globe.temporalSuperSampling)
* 「Mapbox - set custom layers and extrusion examples to use antialias: true」[🔗](https://github.com/mapbox/mapbox-gl-js/pull/8474)
* 「Three.js - TAA example」[🔗](https://threejs.org/examples/#webgl_postprocessing_taa)
* 「Paper - Amortized Supersampling」[🔗](http://hhoppe.com/supersample.pdf)
* 「GDC - Temporal Reprojection Anti-Aliasing in INSIDE」[🔗](http://twvideo01.ubm-us.net/o1/vault/gdc2016/Presentations/Pedersen_LasseJonFuglsang_TemporalReprojectionAntiAliasing.pdf)
* 「知乎 - 低差异序列(一)- 常见序列的定义及性质」[🔗](https://zhuanlan.zhihu.com/p/20197323)

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

219
dev-docs/使用方法.md Normal file
View File

@ -0,0 +1,219 @@
# 使用方法
L7 提供三种使用方式CDN、Submodule 以及 React 组件。
## 通过 CDN 使用
首先在 `<head>` 中引入 L7 CDN 版本的 JS 文件:
```html
<head>
<script src='https://api.l7/v2.0.0-beta/l7.js'></script>
</head>
```
如果使用 Mapbox还需要额外引入 Mapbox 的 JS 和 CSS 文件,这一步可以参考 [Mapbox 文档](https://docs.mapbox.com/mapbox-gl-js/overview/#quickstart)
```html
<head>
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.css' rel='stylesheet' />
<!-- 上一步引入的 L7 JS 和 CSS -->
</head>
```
⚠️高德采用异步加载,因此不需要引入任何额外静态文件。
然后在 `<body>` 中定义一个容器并设置一个 `id`。通过全局 `L7` 这个命名空间可以获取场景 `L7.Scene` 和图层 `L7.PolygonLayer`
```html
<body>
<div
id="map"
style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;"
></div>
<script>
(async function() {
// 获取数据
const response = await fetch(
'https://gw.alipayobjects.com/os/basement_prod/d2e0e930-fd44-4fca-8872-c1037b0fee7b.json',
);
const data = await response.json();
// 创建场景
const scene = new L7.Scene({
id: 'map', // 容器 id
map: new L7.Mapbox({ // 高德地图为 L7.AMap
style: 'mapbox://styles/mapbox/streets-v9',
center: [110.19382669582967, 50.258134],
pitch: 0,
zoom: 3,
token: 'pg.xxx', // 高德或者 Mapbox 的 token
}),
});
// 创建图层
const layer = new L7.PolygonLayer({
enablePicking: true,
enableHighlight: true,
passes: [
[
'colorHalftone',
{
size: 8,
},
],
],
});
layer
.source(data)
.size('name', [0, 10000, 50000, 30000, 100000])
.color('name', [
'#2E8AE6',
'#69D1AB',
'#DAF291',
'#FFD591',
'#FF7A45',
'#CF1D49',
])
.shape('fill')
.style({
opacity: 0.8,
});
// 添加图层到场景中
scene.addLayer(layer);
})();
</script>
</body>
```
⚠️需要获取高德或者 Mapbox 的使用 token 并传入 `L7.Scene` 的构造函数,获取方式如下:
* 高德地图开发者 Key [申请方法](https://lbs.amap.com/dev/key/)
* [Mapbox Access Tokens](https://docs.mapbox.com/help/how-mapbox-works/access-tokens/#creating-and-managing-access-tokens)
## 通过 Submodule 使用
首先通过 `npm/yarn` 安装 `@antv/l7@beta`
```bash
npm install --save @antv/l7@beta
// or
yarn add @antv/l7@beta
```
然后就可以使用其中包含的场景和各类图层:
```typescript
import { Scene, PolygonLayer } from '@antv/l7';
import { AMap } from '@antv/l7-maps';
(async function() {
// 获取数据
const response = await fetch(
'https://gw.alipayobjects.com/os/basement_prod/d2e0e930-fd44-4fca-8872-c1037b0fee7b.json',
);
const data = await response.json();
// 创建场景
const scene = new Scene({
id: 'map',
map: new AMap({
center: [110.19382669582967, 50.258134],
pitch: 0,
style: 'dark',
zoom: 3,
token: 'pg.xxx', // 高德或者 Mapbox 的 token
}),
});
// 创建图层
const layer = new PolygonLayer({});
layer
.source(data)
.size('name', [0, 10000, 50000, 30000, 100000])
.color('name', [
'#2E8AE6',
'#69D1AB',
'#DAF291',
'#FFD591',
'#FF7A45',
'#CF1D49',
])
.shape('fill')
.style({
opacity: 0.8,
});
// 添加图层到场景中
scene.addLayer(layer);
})();
```
L7 目前的文档都通过这种方式使用,可以参考项目中的 stories
* [高德地图](https://github.com/antvis/L7/blob/next/stories/MapAdaptor/components/AMap.tsx)
* [Mapbox](https://github.com/antvis/L7/blob/next/stories/MapAdaptor/components/Mapbox.tsx)
## [WIP] React
React 组件待开发,目前可以暂时以 Submodule 方式使用:
```tsx
import { Scene, PolygonLayer } from '@antv/l7';
import { AMap } from '@antv/l7-maps';
import * as React from 'react';
export default class AMapExample extends React.Component {
private scene: Scene;
public componentWillUnmount() {
this.scene.destroy();
}
public async componentDidMount() {
const response = await fetch(
'https://gw.alipayobjects.com/os/basement_prod/d2e0e930-fd44-4fca-8872-c1037b0fee7b.json',
);
const scene = new Scene({
id: 'map',
map: new AMap({
center: [110.19382669582967, 50.258134],
pitch: 0,
style: 'dark',
zoom: 3,
token: 'pg.xxx', // 高德或者 Mapbox 的 token
}),
});
const layer = new PolygonLayer({});
layer
.source(await response.json())
.size('name', [0, 10000, 50000, 30000, 100000])
.color('name', [
'#2E8AE6',
'#69D1AB',
'#DAF291',
'#FFD591',
'#FF7A45',
'#CF1D49',
])
.shape('fill')
.style({
opacity: 0.8,
});
scene.addLayer(layer);
this.scene = scene;
}
public render() {
return (
<div
id="map"
style={{
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
}}
/>
);
}
}
```
⚠️组件 Unmount 时需要通过 `scene.destroy()` 手动销毁场景。

352
dev-docs/构建方案.md Normal file
View File

@ -0,0 +1,352 @@
# 构建方案
考虑到 L7 提供的三种[使用方法](./使用方法.md)CDN、Submodule 和 React 组件,我们需要提供对应的构建方案。
由于 React 组件待开发,下面我们将从方案技术细节、优化手段两方面介绍 CDN 和 Submodule 的构建方案。
## CDN
考虑到后续将引入 WebWorker 特性,目前 Webpack4 暂时还不支持多种 targetweb + webworker混合的输出模式相关 [ISSUE](https://github.com/webpack/webpack/issues/6525)。
如果后续支持,配合 SplitChunksPlugin 应该能解决在 Worker 和不同 entry 之间共享代码的问题。
因此目前和 Mapbox 做法一样,我们使用 Rollup 构建 CDN Bundler。
打包命令如下,会在 `packages/l7/dist` 下输出产物:
```bash
yarn bundle
```
### UMD
以 L7 为命名空间,让用户可以通过类似 `L7.Scene` 的方式使用。同时以 UMD 为构建目标,输出到 `packages/l7/dist` 下:
```javascript
{
input: resolveFile('build/bundle.ts'),
output: {
file: resolveFile('packages/l7/dist/bundle.js'),
format: 'umd',
name: 'L7',
},
}
```
目前只需要暴露场景以及图层相关的 API因此 Bundler 非常简单:
```typescript
// build/bundle.ts
export * from '@antv/l7';
```
### Alias
为了帮助 resolver 定位 lerna packages需要重命名类似 `@antv/l7-scene` 这样的依赖路径:
```javascript
import alias from '@rollup/plugin-alias';
plugins: [
alias(
{
resolve: ['.tsx', '.ts'],
entries: [
{
find: /^@l7\/(.*)/,
replacement: resolveFile('packages/$1/src'),
},
]
},
),
]
```
配合 [`terser`](https://github.com/TrySound/rollup-plugin-terser) 压缩后,我们就能得到可运行的 CDN 版本了,但从减少构建产物大小出发还有很多优化可以做。
### 减少包大小
除了 Rollup 提供的 TreeShaking我们主要从三个方面考虑
* 减少第三方依赖大小尤其是 Lodash
* external Mapbox 依赖
* 压缩 GLSL 代码
* 去除多余空格、换行符和注释
* 内联 WebGL 常量
* 预计算 define 变量
#### Lodash 按需引用
通过 analysis 插件可以看到第三方依赖大小占比:
```
/node_modules/lodash/lodash.js
███████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 23.79 % (540.328 KB)
/node_modules/regl/dist/regl.js
██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 12.21 % (277.403 KB)
/node_modules/hammerjs/hammer.js
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.25 % (73.847 KB)
/node_modules/uri-js/dist/es5/uri.all.js
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.28 % (51.721 KB)
```
仔细查看 Lodash 的引用情况:
```
███████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
file: /node_modules/lodash/lodash.js
bundle space: 23.79 %
rendered size: 540.328 KB
original size: 540.51 KB
code reduction: 0.03 %
dependents: 13
- /packages/core/src/services/layer/StyleAttribute.ts
- /packages/core/src/services/shader/ShaderModuleService.ts
- /packages/core/src/services/renderer/passes/post-processing/BlurHPass.ts
```
按需引用 Lodash 常见的做法有几种:
* [loash-es](https://github.com/lodash/lodash/tree/es)
* babel-plugin-lodash
* lodash-webpack-plugin
由于我们使用 Rollup 以及 `rollup-plugin-babel`[babel-plugin-lodash](https://github.com/lodash/babel-plugin-lodash) 可以很好地解决这个问题。该插件的[原理](https://github.com/rollup/rollup/issues/610#issuecomment-270801483)其实也是引用 `lodash-es`
```javascript
// this...
import { template } from 'lodash-es';
// ...basically becomes this:
import template from 'lodash-es/template.js';
```
最终的效果还是很明显的:
```
/node_modules/regl/dist/regl.js
████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 16.55 % (277.403 KB)
/node_modules/hammerjs/hammer.js
██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 4.41 % (73.847 KB)
/node_modules/uri-js/dist/es5/uri.all.js
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.09 % (51.721 KB)
/node_modules/lodash.mergewith/index.js
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.06 % (51.256 KB)
```
#### 剔除 Mapbox
不同于高德异步加载的方式Mapbox 用户需要手动引入 Mapbox 的 JS 和 CSS因此 L7 CDN 版本就需要剔除了。通过 `globals` 假定用户负责引入 Mapbox 的 CDN 版本:
```javascript
{
output: {
globals: {
'mapbox-gl': 'mapboxgl',
},
},
external: [
'mapbox-gl',
],
}
```
这样 L7 Bundler 中就不包含 Mapbox 的 Module Bundler(mapbox-gl) 了。
#### 内联 WebGL 常量
在构建阶段可以将 WebGL 常量替换成对应的值,可以减少字符长度:
```javascript
// from
const max = gl.MAX_VERTEX_ATTRIBS;
// to
const max = 34921;
```
luma.gl 和 deck.gl 都使用了 [babel-plugin-inline-webgl-constants](https://www.npmjs.com/package/babel-plugin-inline-webgl-constants)。
来看一下实际效果,在压缩前就能减少字符长度:
```javascript
// 内联前
const usageMap = {
[gl.STATIC_DRAW]: 'static',
[gl.DYNAMIC_DRAW]: 'dynamic',
[gl.STREAM_DRAW]: 'stream'
};
// 内联后
const usageMap = {
[35044]: 'static',
[35048]: 'dynamic',
[35040]: 'stream'
};
```
#### 压缩 GLSL 代码
在开发编写 Shader 时,我们是不需要对 GLSL 代码进行压缩的,因为在 Shader 编译失败时能根据错误信息定位到具体行列。
但是在生产环境下,我们就需要把 GLSL 源代码中包含的**多余**的换行、空格以及注释去掉,减少最终引入字符串的大小。
这里需要注意的是并不是所有换行都可以简单去除,例如 `define` 语句末尾的换行一定要保留。
luma.gl 和 deck.gl 使用了 [babel-plugin-remove-glsl-comments](https://github.com/uber/luma.gl/tree/master/dev-modules/babel-plugin-remove-glsl-comments) 简单地移除注释,但很明显,多余的空格和换行符依然存在。
因此我们需要写一个简单的 Rollup 插件:
```javascript
export default function glsl(include, minify) {
const filter = createFilter(include);
return {
name: 'glsl',
transform(code, id) {
if (!filter(id)) return;
if (minify) {
code = code
.trim() // strip whitespace at the start/end
.replace(/\n+/g, '\n') // collapse multi line breaks
// remove comments
.replace(INLINE_COMMENT_REGEX, '\n')
.replace(BLOCK_COMMENT_REGEX, '')
.replace(/\n\s+/g, '\n') // strip identation
}
return {
code: `export default ${JSON.stringify(code)};`,
map: { mappings: '' }
};
}
};
}
```
#### GLSL minifier
以上针对 GLSL 的压缩仅限于字符替换,更彻底的优化必然需要生成 GLSL 对应的 AST从而进行变量重命名、死代码消除等等更高级的优化手段。[glsl-minifier](https://github.com/TimvanScherpenzeel/glsl-minifier) 就是这样一个 CLI 工具。
其中的预计算特性有点类似 [Prepack](https://github.com/facebook/prepack),在构建阶段就计算出 `define` 变量的值:
```glsl
#define SPREAD 8.00
#define MAX_DIR_LIGHTS 0
#define MAX_POINT_LIGHTS 0
#define MAX_SPOT_LIGHTS 0
#define MAX_HEMI_LIGHTS 0
#define MAX_SHADOWS 0
#define GAMMA_FACTOR 2
uniform mat4 viewMatrix;
uniform vec3 cameraPosition;
uniform vec2 resolution;
uniform float time;
uniform sampler2D texture;
void main() {
vec2 uv = gl_FragCoord.xy / resolution.xy;
float v = texture2D( texture, uv ).x;
if (v == 1000.) discard;
v = sqrt(v);
gl_FragColor = vec4( vec3( 1. - v / SPREAD ), 1.0 );
}
```
上述代码压缩结果如下,`define` 统统不见了,变量名也进行了改写:
```glsl
uniform highp vec2 resolution;uniform sampler2D texture;void main(){highp vec2 a;a=(gl_FragCoord.xy/resolution);lowp vec4 b;b=texture2D(texture,a);if((b.x==1000.0)){discard;}lowp vec4 c;c.w=1.0;c.xyz=vec3((1.0-(sqrt(b.x)/8.0)));gl_FragColor=c;}
```
当然 glsl-minifier 做的远不止这些,还会应用变量名改写、死代码消除等等优化手段:
> Optimisations include function inlining, dead code removal, copy propagation, constant folding, constant propagation, arithmetic optimizations and so on. Minifications includes variable rewriting and whitespace trimming.
显然这种手段要求我们的 Shader 代码在构建时是稳定的,然而 L7 使用的 GLSL 模块化方案需要在运行时进行模块拼接,如果在构建时代码片段中包含的变量发生了改写,势必影响运行时的拼接结果。另外 minifier 会校验代码的正确性,不理解我们自定义的模块引入语句 `pragma include 'module'` 是一定会报错的。
以这样的 Shader 为例:
```glsl
#pragma include "project"
void main() {
// 从 project 模块引入方法
project(position);
}
```
执行压缩时会报错:
```bash
$ node_modules/.bin/glsl-minifier -i ./build/example.frag -o ./build/example.min.frag
Error:
(28,2): error: no function with name 'project'
Exiting glsl-minifier!
```
因此要想使用这个终极压缩方案,需要修改 L7 目前的 GLSL 模块化方案,代码拼接不能在运行时而需要在构建时完成。但这样就很难兼顾扩展性,毕竟用户自定义图层的 Shader 代码肯定只有运行时才能拿到。
所以一个折中的办法是在构建时先对 L7 内置图层的 Shader 代码进行模块化处理,得到最终的 GLSL 文本,然后再 minify。同时保留运行时模块化拼接的能力应对用户自定义图层。
## Submodule
npm 和 yarn 只提供了例如 `npm link` 以及 `yarn link` 这样的功能,而 yarn workspaces 只提供了 monorep 需要的底层 link 功能。相比之下 lerna 提供了更高级的功能例如 publish 和 version。因此 yarn workspaces 和 lerna 完全可以组合使用,这也是例如 Jest 等大型项目的使用方式。
![](./screenshots/monorep.png)
构建命令如下,会在各个 package 下生成 `/lib``/es` 两个文件夹分别包含 ES2015 和 ESModule 产物:
```bash
yarn build
```
### 编译 TS
使用 TS 有两种构建方式:
* native TypeScript with tsc
* [@babel/preset-typescript](https://babeljs.io/docs/en/babel-preset-typescript)
由于我们的项目中需要使用到一些 babel plugin装饰器、引入 GLSL 等),因此后者显然是更好的选择。这里我们使用 babel 7 的项目全局配置 configFile。
为了合并 ES2015 与 ESModule我们参考 [redux](https://babeljs.io/blog/2018/06/26/on-consuming-and-publishing-es2015+-packages#conflating-javascript-modules-and-es2015)
```json
// redux package.json
{
"main": "lib/redux.js", // ES5 + Common JS
"module": "es/redux.js", // ES5 + JS Modules
}
```
开发模式加上 `--watch` 即可。
* `--root-mode upward` 使用 root 下的 babel 配置文件
* `--out-dir dist` 输出到 /dist 文件夹下
* `--delete-dir-on-start` 每次构建前清空,因此不需要 `rimraf`
```json
"scripts": {
"build": "run-p build:*",
"build:cjs": "BABEL_ENV=cjs babel src --root-mode upward --out-dir lib --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments",
"build:esm": "BABEL_ENV=esm babel src --root-mode upward --out-dir es --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments"
},
```
### 生成 TS 声明文件
和构建前类型检查不同,此时我们需要 tsc 输出类型声明文件了:
```json
{
"postbuild": "yarn build:declarations",
"build:declarations": "lerna exec --stream --no-bail 'tsc --project ./tsconfig.build.json'"
}
```
当然不需要包含 story 和测试用例:
```json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"emitDeclarationOnly": true,
"declaration": true,
"rootDir": "./",
"baseUrl": "./",
"paths": {
"@antv/l7-*": ["packages/*/src"],
"@antv/l7": ["packages/l7/src"],
"*": ["node_modules", "packages"]
}
},
"exclude": ["**/*.story.*", "**/__tests__/**/*", "**/*.spec.*", "dist"],
"include": []
}
```
### 按需引入地图依赖
以 L7 Bundler 方式使用时,由于需要在运行时根据用户配置项选择地图底图,会导致构建时需要将全部地图依赖引入,无法进行 TreeShaking。
目前高德地图使用运行时异步加载方式引入,不会导致该问题,但 Mapbox 同样使用 Bundler对于高德用户就多余了。
[ISSUE](https://github.com/antvis/L7/issues/86)

View File

@ -0,0 +1,142 @@
# 自动化测试方案
如何测试一个 WebGL 应用渲染结果是否正确呢?常用的做法是进行像素比对,当然这也只能用于一些简单的判断例如渲染是否成功,整体的 Snapshot 比对开销很大。
但不管怎么说,这都意味着我们必须使用 WebGL API 进行真实的渲染。
以上过程在测试用例中描述如下:
```javascript
// 1. 绘制
// 2. 读取像素
const pixels = new Uint8Array(width * height * 4);
gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
// 3. 判断某个像素点是否符合预期
```
在与测试框架结合时,常用的方案有:
* Electron 除了 WebGL APIDOM API 等其他浏览器实现对于 WebGL 测试都是多余的,在 CI 时需要安装的依赖过大,所需的启动时间也很长。
* [node-webgl](https://github.com/mikeseven/node-webgl) 不同于 WebGL可以直接调用 OpenGL 驱动,但同样包含了很多 WebGL 之外的特性。
这里我们选择 [headless-gl](https://github.com/stackgl/headless-gl),一个纯粹的 WebGL 1 规范的实现。并且能够很容易集成进现有的 [CI 流程](https://github.com/stackgl/headless-gl#how-can-i-use-headless-gl-with-a-continuous-integration-service)中,例如 [TravisCI](https://travis-ci.org/) 和 [AppVeyor](http://www.appveyor.com/)。
## 测试框架
在配置测试框架前,我们必须解决一个 WebGL 项目中常见的问题。
### 引入 GLSL 文件
如何在测试时正确引入 GLSL 文件是一个问题。目前各个 3D 引擎常用的做法有两种:
* 以字符串形式直接写在 `.js` 文件中。`luma.gl/deck.gl` 使用[这种方式](https://github.com/uber/deck.gl/blob/7.1-release/modules/layers/src/arc-layer/arc-layer-fragment.glsl.js)。
* 使用 `.glsl` 编写,测试前使用构建脚本自动生成对应的 `.js` 文件。`Three.js`、`clay.gl` 使用[这种方式](https://github.com/pissang/claygl/blob/master/build/glsl2js.js)。
前者的好处是测试流程无需做过多修改,坏处则是无法享受编辑器对于 GLSL 的语法高亮,影响开发体验。而后者又需要编写额外的 `glsl2js` 的转换脚本。
我们显然希望如后者一样直接写 GLSL但最好能让测试框架帮助我们完成自动转换的工作。
之前我们选择 `@babel/preset-typescript` 而非官方 `tsc` 的一大原因就是可以使用 `babel` 丰富的插件,`babel-plugin-inline-import` 就能完成类似 webpack 中 `raw-loader` 的功能,直接以字符串形式引入 GLSL 代码:
```javascript
// 以字符串形式引入 GLSL 代码
import circleFrag from '../../shaders/circle_frag.glsl';
```
这样测试框架只需要使用同一套 babel 项目全局配置就行了。我们使用 Jest
```javascript
// jest.config.js
module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'babel-jest',
},
}
```
下面就可以编写测试用例了。
## 测试用例编写
我们将测试用例分成三类:
* 内部服务的单元测试
* 渲染服务结果的 Snapshot 快照测试
* React 组件测试
将测试用例放在任意路径的 `__tests__` 文件夹下并以 `xxx.spec.ts` 命名就可以帮助框架发现并执行了。
使用 `yarn test` 运行所有测试用例:
![](./screenshots/jest.png)
### 单元测试
这类测试直接使用 Jest API 就好了,我们以 `@antv/l7-core` 模块的 `ShaderModuleService` 为例,编写一个简单的测试用例:
```typescript
// services/shader/__test__/shader.spec.ts
import 'reflect-metadata';
import IShaderModuleService from '../IShaderModuleService';
import ShaderModuleService from '../ShaderModuleService';
describe('ShaderService', () => {
let shaderService: IShaderModuleService;
beforeEach(() => {
shaderService = new ShaderModuleService();
});
it('should register common module correctly and generate fragment/vertex shader code', () => {
const rawShaderCode = `
#define PI 3.14
`;
const commonModule = {
fs: rawShaderCode,
vs: rawShaderCode,
};
shaderService.registerModule('common', commonModule);
const { vs, fs } = shaderService.getModule('common');
expect(vs).toMatch(/3\.14/);
expect(fs).toMatch(/3\.14/);
});
});
```
### 渲染结果测试
得益于 L7 使用的基于 Inversify 的依赖注入方案,我们能够很轻易地将渲染服务替换为基于 headless-gl 的渲染服务。
具体到我们目前的渲染服务实现 `regl`,它能轻易做到这一点。事实上 regl 的[测试用例](https://github.com/regl-project/regl/blob/gh-pages/test/util/create-context.js#L28)也是这样使用的。
### [WIP] React 组件测试
### Coverage Report
我们使用 Coveralls.io
```json
// package.json
"coveralls": "jest --coverage && cat ./tests/coverage/lcov.info | coveralls",
```
运行 `yarn coveralls` 可以查看代码覆盖率,我们为分支、行覆盖率等指标设置了阈值:
```javascript
// jest.config.js
module.exports = {
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
};
```
## TravisCI
TravisCI 检测到 `yarn.lock` 就会默认安装 `yarn` 并使用它安装依赖,所以不需要[额外的配置](https://yarnpkg.com/en/docs/install-ci#travis-tab)。
TravisCI 配合之前的 Coveralls.io。

View File

@ -0,0 +1,174 @@
# 自定义后处理效果
L7 自定义了一套较为灵活的渲染管线,在后处理效果方面提供了最大程度的扩展性。除了直接使用内置的常用效果(例如下图中 ColorHalftone、六边形像素化、噪声、Sepia开发者还可以自定义任何后处理效果在场景中完成注册即可应用到任意图层上。
![](./screenshots/multi-scene.png)
下面我们以 [glfx.js](http://evanw.github.io/glfx.js/demo/) 中的 Dot Screen 效果(下图)为例,介绍如何在 PolygonLayer 中应用这种效果。完整 DEMO 代码[在此]()。
![](./screenshots/custom-effect.png)
我们将分成三步介绍:
1. 定义效果
* 定义效果参数
* 继承后处理效果基类
* 编写 Fragment Shader
2. 在场景中注册效果
3. 在图层中使用效果
## 定义效果
### 定义效果参数
实现任何一种后处理效果,我们都希望提供一些灵活的参数,可以在运行时供使用者修改。以我们需要实现的 Dot Screen 效果为例,参数接口 `IDotScreenEffectConfig` 定义如下:
```typescript
interface IDotScreenEffectConfig {
center: [number, number]; // pattern 圆心
angle: number; // dot 旋转角度
size: number; // dot 尺寸
}
```
### 继承后处理效果基类
为了最大程度减少样板代码L7 提供了 `BasePostProcessingPass` 基类供子类继承,同时通过泛型将上一步定义的参数接口传入:
```typescript
import { BasePostProcessingPass } from '@antv/l7';
class DotScreenEffect extends BasePostProcessingPass<IDotScreenEffectConfig> {
//... 省略重载方法
}
```
接下来我们只需要重载基类的一个方法 `setupShaders`。在这个方法中我们可以使用 L7 内置的服务,例如 Shader 服务、渲染服务等,各服务说明及 API 使用方式[详见](./IoC%20容器、依赖注入与服务说明.md)。
```typescript
protected setupShaders() {
// 使用 Shader 服务注册 GLSL 模块
this.shaderModuleService.registerModule('dotScreenEffect', {
vs: this.quad, // Vertex Shader 固定
fs: ``, // 暂时省略,在下一小节中详细介绍
});
// 使用 Shader 服务获取编译后的 GLSL 模块
const { vs, fs, uniforms } = this.shaderModuleService.getModule('dotScreenEffect');
// 使用渲染器服务获取视口尺寸
const { width, height } = this.rendererService.getViewportSize();
return {
vs,
fs,
uniforms: {
...uniforms,
u_ViewportSize: [width, height],
},
};
}
```
### 编写 Fragment Shader
在编写 Fragment Shader 时,可以按照如下模版。由于 L7 实现了简单的 GLSL 模块化,可以使用一些特殊的语法,例如:
* Uniform 设置默认值
* 引入 L7 内置 GLSL 模块
```glsl
varying vec2 v_UV;
uniform sampler2D u_Texture;
uniform vec2 u_ViewportSize : [1.0, 1.0];
// 自定义效果参数声明
// 自定义效果函数 myCustomEffect 定义
void main() {
// 纹理采样
gl_FragColor = vec4(texture2D(u_Texture, v_UV));
// 应用自定义效果函数
gl_FragColor = myCustomEffect(gl_FragColor, u_ViewportSize, v_UV);
}
```
Dot Screen 效果具体 GLSL 代码可以参考 [luma.gl](https://github.com/uber/luma.gl/blob/master/modules/engine/src/effects/shader-modules/fun-filters/dotscreen.js#L11-L30)。
完整 Fragment Shader 代码如下。需要注意的是这里 Uniform 名需要和效果配置项属性名统一,即 `size` 对应 `u_Size`、`angle` 对应 `u_Angle`。:
```glsl
varying vec2 v_UV;
uniform sampler2D u_Texture;
uniform vec2 u_ViewportSize : [1.0, 1.0];
// 自定义效果参数及默认值声明
uniform vec2 u_Center : [0.5, 0.5];
uniform float u_Angle : 1;
uniform float u_Size : 3;
// 自定义效果实现
// @see https://github.com/uber/luma.gl/blob/master/modules/engine/src/effects/shader-modules/fun-filters/dotscreen.js#L11-L30
float pattern(vec2 texSize, vec2 texCoord) {
float scale = 3.1415 / u_Size;
float s = sin(u_Angle), c = cos(u_Angle);
vec2 tex = texCoord * texSize - u_Center * texSize;
vec2 point = vec2(
c * tex.x - s * tex.y,
s * tex.x + c * tex.y
) * scale;
return (sin(point.x) * sin(point.y)) * 4.0;
}
vec4 dotScreen_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
float average = (color.r + color.g + color.b) / 3.0;
return vec4(vec3(average * 10.0 - 5.0 + pattern(texSize, texCoord)), color.a);
}
void main() {
gl_FragColor = vec4(texture2D(u_Texture, v_UV));
gl_FragColor = dotScreen_filterColor(gl_FragColor, u_ViewportSize, v_UV);
}
```
至此我们就完成了效果的定义。
## 在场景中注册
一种效果要想生效,必须先在场景中完成注册。`scene.registerPostProcessingPass()` 接受两个参数分别为上一步定义的效果构造函数以及效果名。
后续我们在图层中使用时就可以通过效果名引用了:
```typescript
// 场景定义
const scene = new Scene({
id: 'map',
map: new Mapbox({
style: 'mapbox://styles/mapbox/streets-v9',
center: [110.19382669582967, 50.258134],
pitch: 0,
zoom: 3,
}),
});
// 注册自定义后处理效果
scene.registerPostProcessingPass(
DotScreenEffect, // 效果构造函数
'dotScreenEffect', // 效果名,便于后续在图层中引用
);
```
## 在图层中使用效果
和 L7 内置的后处理效果使用方法一致,通过效果名引用,同时传入定义参数即可:
```typescript
const layer = new PolygonLayer({
enablePicking: true,
enableHighlight: true,
passes: [
[
'dotScreenEffect', // 引用效果名
{
size: 8, // 传入参数
angle: 1,
},
],
],
});
```
最终效果如下:
![](./screenshots/dotscreen.png)

74
docs/api/changelog.en.md Normal file
View File

@ -0,0 +1,74 @@
---
title: ChangeLog
order: 10
---
## 2020.03.12 2.1 正式版
###✨ Features
- 新增 l7-react 版本
- 可自定义样式的聚合图 MakerLayer
- 新增 quantile、quantize 度量
- 地图导出功能
### 🍏 Improvements
- IE 11 支持
- 更新拾取机制,拾取更高效
- 优化依赖包减少包体积
### 🐞 Bug Fixes
- setData 更新机制
- color,size,shape 更新重绘问题
## 2020.01.06 2.0 正式版
[Github](https://github.com/antvis/L7) https://github.com/antvis/L7 欢迎 Star
###✨ Features
• 新增弧线图,路径图动画功能
• 新增气泡图水波动画功能
• 新增聚合地图
• 新增文本标注,支持避让
• 新增城市建筑图层
• 新增栅格地图,支持卫星遥感数据可视化
• 新增图层交互事件
### 🍏 Improvements
• Marker 支持事件和自定义数据
• 弧线支持虚线样式
• 面图层支持,文本标注,气泡图效果
• 重构了文档结构
• source 支持 map,join,filter 数据处理支持
• source 支持数据更新
• 支持 blend 效果配置
• 支持通过地图实例初始化地图
• 官网新增所有图表概览页面
### 🐞 Bug Fixes
• 修复容器 resize 不能正常响应
• 修复 babel 打包问题
• 修复地图组件加载报错问题
• 修复样式配置 strokeColor- stroke

102
docs/api/changelog.zh.md Normal file
View File

@ -0,0 +1,102 @@
---
title: 发布日志
order: 10
---
## 2020.04.20 2.2 正式版本
###✨ Features
#### [L7-Draw 地图绘制组件发布](../draw/start)
支持基础图形绘制、平移、修改、删除
- 绘制 UI 组件支持
- 绘制圆形
- 绘制矩形
- 绘制点
- 绘制线
- 绘制面
### 🍏 Improvements
- 要素拾取支持添加 buffer
- 图层拾取支持冒泡机制,默认拾取最上层
### 🐞 Bug Fixes
- pointLayer 聚合支持多种数据格式化
- 修复热力图移动端不能正常渲染
- 修复 3D 热力图高德地图正使用
- L7 版本锁定
- 修复点图层描边模糊问题
## 2020.03.12 2.1 正式版
###✨ Features
- 新增 l7-react 版本
- 可自定义样式的聚合图 MakerLayer
- 新增 quantile、quantize 度量
- 地图导出功能
### 🍏 Improvements
- IE 11 支持
- 更新拾取机制,拾取更高效
- 优化依赖包减少包体积
### 🐞 Bug Fixes
- setData 更新机制
- color,size,shape 更新重绘问题
## 2020.01.06 2.0 正式版
[Github](https://github.com/antvis/L7) https://github.com/antvis/L7 欢迎 Star
###✨ Features
• 新增弧线图,路径图动画功能
• 新增气泡图水波动画功能
• 新增聚合地图
• 新增文本标注,支持避让
• 新增城市建筑图层
• 新增栅格地图,支持卫星遥感数据可视化
• 新增图层交互事件
### 🍏 Improvements
• Marker 支持事件和自定义数据
• 弧线支持虚线样式
• 面图层支持,文本标注,气泡图效果
• 重构了文档结构
• source 支持 map,join,filter 数据处理支持
• source 支持数据更新
• 支持 blend 效果配置
• 支持通过地图实例初始化地图
• 官网新增所有图表概览页面
### 🐞 Bug Fixes
• 修复容器 resize 不能正常响应
• 修复 babel 打包问题
• 修复地图组件加载报错问题
• 修复样式配置 strokeColor- stroke

View File

@ -0,0 +1,86 @@
---
title: Control
order: 3
---
地图组件 用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例,比例尺
L7 目前支持 Control
- Zoom 放大缩小
- Scale 比例尺
- Layers 图层列表
## 构造函数
#### option
position: `string` 控件位置支持是个方位
- bottomright
- topright
- bottomleft,
- topleft`
### 组件介绍
```
import { Scale, Layers, Zoom } from '@antv/l7';
```
#### Zoom
放大缩小组件 默认左上角
```javascript
const zoomControl = new Zoom({
position: 'topleft',
});
scene.addControl(zoomControl);
```
#### Scale
比例尺组件 默认左下角
```javascript
const scaleControl = new Scale({
position: 'bottomleft',
});
scene.addControl(scaleControl);
```
#### Layers
图层列表目前支持可视化的图层控制
```javascript
const overlayers = {
点图层: layer,
};
const layersControl = new Layers({
overlayers,
});
scene.addControl(layersControl);
```
## 方法
#### setPosition
设置组件位置
```javascript
control.setPosition('bottomright');
```
#### remove
移除地图组件
```javascript
control.remove();
```

View File

@ -0,0 +1,102 @@
---
title: Control 控件
order: 3
---
地图组件用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例、比例尺
L7 目前支持 Control
- Zoom 放大缩小
- Scale 比例尺
- Layers 图层列表
## 构造函数
#### option
position: `string` 控件位置支持是个方位
- bottomright
- topright
- bottomleft,
- topleft`
### 组件介绍
```
import { Scale, Layers, Zoom } from '@antv/l7';
```
#### Zoom
放大缩小组件 默认左上角
```javascript
const zoomControl = new Zoom({
position: 'topleft',
});
scene.addControl(zoomControl);
```
#### Scale
比例尺组件 默认左下角
```javascript
const scaleControl = new Scale({
position: 'bottomleft',
});
scene.addControl(scaleControl);
```
#### Layers
图层列表目前支持可视化的图层控制
配置项
option 控件配置项
overlayers 将一组图层添加到图层列表,
overlayers Object
key: 列表显示的图层名字可以自定义
layer: 图层对象
overlayers 示例
```javascript
const layer = {
图层一: layer1,
图层二: layer2,
};
```
```javascript
const overlayers = {
点图层: layer,
};
const layersControl = new Layers({
overlayers,
});
scene.addControl(layersControl);
```
## 方法
#### setPosition
设置组件位置
```javascript
control.setPosition('bottomright');
```
#### remove
移除地图组件
```javascript
control.remove();
```

View File

@ -0,0 +1,87 @@
---
title: Marker
order: 3
---
Marker 地图标注 目前只支持 2D dom 标注
## 构造函数
Marker
`const Marker = new L7.Marker(option)`
#### option
- color        `string` ![L7 Marker](https://gw.alipayobjects.com/zos/basement_prod/b10e0efd-8379-4b04-bcbb-5cfefaa0327f.svg)设置默认 marker 的颜色
- element    `Dom|string`    自定义 marker Dom 节点,可以是 dom 实例,也可以是 dom id
- anchor     `string`  锚点位置   支持 center, top, top-left, top-right, bottom, bottom-left,bottom-                        right,left, right
- offsets    `Array`  偏移量  [ 0, 0 ] 分别表示 X, Y 的偏移量
### 添加到 Scene
```javascript
scene.addMarker(marker);
```
## 方法
#### setLnglat
设置 marker 经纬度位置
#### remove
移除 marker
#### getElement
获取 marker dom Element
#### getLngLat
获取 marker 经纬度坐标
#### togglePopup
开启或者关闭 marker 弹出框
#### setPopup
为 marker 设置 popup
#### getPopup
获取 marker 弹出框
## 示例代码
#### 默认 Marker
`const marker = new L7.Marker({color:'blue'})`
#### 自定义 Marker
```javascript
var el = document.createElement('label');
el.className = 'labelclass';
el.textContent = data[i].v;
el.style.background = getColor(data[i].v);
new L7.Marker({
element: el,
}).setLnglat([data[i].x * 1, data[i].y]);
```
#### 设置 popup
```javascript
var popup = new L7.Popup({
anchor: 'left',
}).setText(item.name);
new L7.Marker({
element: el,
})
.setLnglat(item.coordinates)
.setPopup(popup);
```

View File

@ -0,0 +1,141 @@
---
title: Marker 标注
order: 3
---
Marker 地图标注 目前只支持 2D Dom 标注
## 构造函数
Marker
`const Marker = new L7.Marker(option)`
#### option
- color        `string` 
![map-marker.png](https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*BJ6cTpDcuLcAAAAAAAAAAABkARQnAQ)  设置默认 marker 的颜色
- element    `Dom|string`    自定义 marker Dom 节点,可以是 dom 实例,也可以是 dom id
- anchor     `string`  锚点位置   支持 center, top, top-left, top-right, bottom, bottom-left,bottom-right,left, right
- offsets    `Array`  偏移量  [ 0, 0 ] 分别表示 X, Y 的偏移量
- extData 用户自定义属性,支持任意数据类型,存储 marker 属性信息
### 添加到 Scene
```javascript
scene.addMarker(marker);
```
## 方法
#### setLnglat
设置 marker 经纬度位置
#### remove
移除 marker
#### getElement
获取 marker dom Element
### setElement
- element `dom`
设置 element 通过此方法更新 Marker 样式
#### getLngLat
获取 marker 经纬度坐标
#### togglePopup
开启或者关闭 marker 弹出框
#### openPopup
打开 Popup
### closePopup
关闭 popup
#### setPopup
为 marker 设置 popup
#### getPopup
获取 marker 弹出框
#### getExtData()
获取用户自定义数据
#### setExtData(data)
设置用户自定义数据
## 示例代码
#### 默认 Marker
`const marker = new L7.Marker({color:'blue'})`
#### 自定义 Marker
```javascript
var el = document.createElement('label');
el.className = 'labelclass';
el.textContent = data[i].v;
el.style.background = getColor(data[i].v);
const marker = new L7.Marker({
element: el,
}).setLnglat([data[i].x * 1, data[i].y]);
scene.addMarker(marker);
```
#### 设置 popup
```javascript
var popup = new L7.Popup({
anchor: 'left',
}).setText(item.name);
new L7.Marker({
element: el,
})
.setLnglat(item.coordinates)
.setPopup(popup);
```
## 事件
### 鼠标事件
- mousemove
- click
- mousedown
- mouseup
- dblclick
- contextmenu
- mouseover
- mouseout
事件返回数据
- target 事件触发源
- data extData 用户自定义数据
- lnglat marker 经纬度
```javascript
marker.on('click', (e) => {});
```
## demo 地址
[demo1](../../../examples/tutorial/marker)

View File

@ -0,0 +1,122 @@
---
title: Marker Layer
order: 3
---
MarkerLayer 不同于 PointLayer 图层
**技术差异**
- MarkerLayer 地图元素采用 Dom 元素绘制
- PointLayer 通过 WebGL 绘制元素。
**功能差异**
- MarkerLayer 元素的自定义性比较强,任何 HTML+ CSS 的组合都可可以绘制在地图上。
- PointLayer 自定义性比较弱,实现成本比较高,优势可以绘制大量的数据,性能比交互。
## 使用
```javascript
import { Marker, MarkerLayer } from '@antv/l7';
```
### 构造函数
```javascript
const markerLayer = new MarkerLayer(option);
// 调用 addMarker方法 将多个Marker添加到Layer
scene.addMarkerLayer(markerLayer);
```
#### option
- cluster 聚合 `boolean` 默认 `false`
- clusterOption 聚合配置
- field `string` 聚合统计字段
- method `sum| max| min| mean`
- element `function` 通过回调函数设置聚合 Marker 的样式,返回 dom 元素
回调函数包含以下参数
point_count 默认 聚合元素个数
clusterData `Array` 聚合节点的原始数据
point_sum 聚合求和 根据 field 和 method 计算
point_max 聚合最大值 根据 field 和 method 计算
point_min 聚合最小值 根据 field 和 method 计算
point_mean 聚合平均值 根据 field 和 method 计算
后续会增加更多配置项目
### 方法
#### addMarker
参数
- marker `IMarker` 需要添加的 Marker
添加 Marker
通过 Marker 对象实例化一个 Marker
```javascript
const marker = new Marker().setLnglat(); // 添加进Marker必须设置经纬度才能添加
markerLayer.addMarker(marker);
```
为 Marker 添加属性信息,
如果聚合参数设置统计配置项 `field| method`需要为 Marker 添加属性信息
通过 Marker 的 extData[配置项](./marker#option)设置 Marker 属性信息
```javascript
const marker = new Marker({
extData: nodes.features[i].properties,
}).setLnglat({
lng: coordinates[0],
lat: coordinates[1],
});
```
#### removeMarker
从 MarkerLayer 移除 Marker
#### getMarkers
获取 MarkerLayer 中的所有 Marker
#### clear
清除掉所有的 Marker
####
### Scene
#### addMarkerLayer
添加 MarkerLayer
```javascript
scene.addMarkerLayer(layer);
```
#### removeMarkerLayer
移除 MarkerLayer
```javascript
scene.removeMarkerLayer(layer);
```
### demo 地址
[markerLayer ](../../../examples/point/marker#markerlayer)
[markerLayer 聚合](../../../examples/point/marker#clustermarker)

View File

@ -0,0 +1,120 @@
---
title: Marker 图层
order: 3
---
MarkerLayer 是 Marker 的升级版Marker 是独立的地图标注MarkerLayer 则是统一管理大量的 Marker 数据。
**技术差异**
- Marker Dom 绘制一个地图元素
- MarkerLayer 统一管理多个 DomMarker
- PointLayer 通过 WebGL 绘制元素。
**功能差异**
- MarkerLayer 元素的自定义性比较强,任何 HTML+ CSS 的组合都可以绘制在地图上。
- PointLayer 自定义性比较弱,实现成本比较高,优势可以绘制大量的数据,性能比较好。
## 使用
```javascript
import { Marker, MarkerLayer } from '@antv/l7';
```
### 构造函数
```javascript
const markerLayer = new MarkerLayer(option);
// 调用 addMarker方法 将多个Marker添加到Layer
scene.addMarkerLayer(markerLayer);
```
#### option
- cluster 聚合 `boolean` 默认 `false`
- clusterOption 聚合配置
- field `string` 聚合统计字段
- method `sum| max| min| mean`
- element `function` 通过回调函数设置聚合 Marker 的样式,返回 dom 元素
回调函数包含以下参数
- point_count 默认 聚合元素个数
- clusterData `Array` 聚合节点的原始数据
- point_sum 聚合求和 根据 field 和 method 计算
- point_max 聚合最大值 根据 field 和 method 计算
- point_min 聚合最小值 根据 field 和 method 计算
- point_mean 聚合平均值 根据 field 和 method 计算
### 方法
#### addMarker
参数
- marker `IMarker` 需要添加的 Marker
添加 Marker
通过 Marker 对象实例化一个 Marker
```javascript
const marker = new Marker().setLnglat(); // 添加进Marker必须设置经纬度才能添加
markerLayer.addMarker(marker);
```
为 Marker 添加属性信息,
如果聚合参数设置统计配置项 `field| method`需要为 Marker 添加属性信息
通过 Marker 的 extData[配置项](./marker#option)设置 Marker 属性信息
```javascript
const marker = new Marker({
extData: nodes.features[i].properties,
}).setLnglat({
lng: coordinates[0],
lat: coordinates[1],
});
```
#### removeMarker
从 MarkerLayer 移除 Marker
#### getMarkers
获取 MarkerLayer 中的所有 Marker
#### clear
清除掉所有的 Marker
####
### Scene
#### addMarkerLayer
添加 MarkerLayer
```javascript
scene.addMarkerLayer(layer);
```
#### removeMarkerLayer
移除 MarkerLayer
```javascript
scene.removeMarkerLayer(layer);
```
### demo 地址
[markerLayer ](../../../examples/point/marker#markerlayer)
[markerLayer 聚合](../../../examples/point/marker#clustermarker)

View File

@ -0,0 +1,154 @@
---
title: Popup
order: 0
---
地图标注信息窗口,用于展示地图要素的属性信息
## 构造函数
Popup
```javascript
const popup = new L7.Popup(option);
```
#### option
- closeButton
- closeOnClick
- maxWidth
- anchor
#### 添加到地图
```javascript
scene.addPopup(popup);
```
## 方法
#### setLnglat
设置 popup 的经纬度位置
**参数**lnglat
支持数组
```javascript
[112, 32];
```
经纬度对象
```javascript
const lnglat = {
lng: 112.323,
lat: 30.456,
};
```
```javascript
popup.setLnglat([112, 32]);
```
#### setHTML
**参数**html 字符串
设置 popup html 内容
```javascript
var html = `<p>省份
${feature.s} </p><p>地区
${feature.m}</p><p>数值
${feature.t}</p>`;
popup.setHTML(html);
```
#### setDOMContent
- 参数 htmlNode dom 对象
区别于 setHtml 对象只能传字符串
**tips**
如果需要将 react 组件渲染到 popup 可以用此方法。
#### setText
设置 popup 显示文本内容
```javascript
popup.setText('hello world');
```
#### open
显示 popup
```javascript
popup.open();
```
#### close
显示 popup
```javascript
popup.close();
```
#### open
显示 popup
```javascript
popup.open();
```
#### close
显示 popup
```javascript
popup.close();
```
#### remove
移除 popup
```javascript
popup.remove();
```
## 事件
### open
```javascript
popup.on('open', () => {});
```
#### close
```javascript
popup.on('close', () => {});
```
## 示例代码
#### 添加 popup
```
var html = '<p>'+feature.m+'</p>';
const popup= new L7.Popup().setLnglat([112, 32]).setHTML(html);
scene.addPopup(popup);
```
## demo 地址
[demo1](../../../examples/point/column)
[demo2](../../../examples/line/path)

View File

@ -0,0 +1,138 @@
---
title: Popup 信息框
order: 0
---
地图标注信息窗口,用于展示地图要素的属性信息
## 构造函数
Popup
```javascript
const popup = new L7.Popup(option);
```
#### option
- closeButton
- closeOnClick
- maxWidth
- anchor
#### 添加到地图
```javascript
scene.addPopup(popup);
```
## 方法
#### setLnglat
设置 popup 的经纬度位置
**参数**lnglat
支持数组
```javascript
[112, 32];
```
经纬度对象
```javascript
const lnglat = {
lng: 112.323,
lat: 30.456,
};
```
```javascript
popup.setLnglat([112, 32]);
```
#### setHTML
**参数**html 字符串
设置 popup html 内容
```javascript
var html = `<p>省份
${feature.s} </p><p>地区
${feature.m}</p><p>数值
${feature.t}</p>`;
popup.setHTML(html);
```
#### setDOMContent
- 参数 htmlNode dom 对象
区别于 setHtml 对象只能传字符串
**tips**
如果需要将 react 组件渲染到 popup 可以用此方法。
#### setText
设置 popup 显示文本内容
```javascript
popup.setText('hello world');
```
#### open
显示 popup
```javascript
popup.open();
```
#### close
关闭 popup
```javascript
popup.close();
```
#### remove
移除 popup
```javascript
popup.remove();
```
## 事件
### open
```javascript
popup.on('open', () => {});
```
#### close
```javascript
popup.on('close', () => {});
```
## 示例代码
#### 添加 popup
```
var html = '<p>'+feature.m+'</p>';
const popup= new L7.Popup().setLnglat([112, 32]).setHTML(html);
scene.addPopup(popup);
```
## demo 地址
[demo1](../../../examples/point/column)
[demo2](../../../examples/line/path)

View File

@ -0,0 +1,124 @@
---
title: 标准地图
order: 2
---
## 五种地图类型
- WorldLayer 世界地图
- CountryLayer 国家地图,目前只支持中国
- ProvinceLayer 省级地图
- CityLayer 市级地图
- CountyLayer 县级地图
## 构造函数
参数:
- scene L7 scene 对象
- option 行政区划配置项
- zIndex 图层绘制顺序
- data `Array` 属性数据用于可视化渲染
- visible 地图是否可见
- joinBy 数据关联,属性数据如何内部空间数据关联绑定 目前支持 NAME_CHN,adcode 字段连接
对照表 `Array [string, string]` 第一个值为空间数据字段,第二个为传入数据字段名
- depth 数据显示层级 0国家级1:省级2: 市级3线级
- showBorder `boolean` 是否显示国界线,默认显示,不建议不显示
- simplifyTolerance 数据抽稀容差,默认不抽稀 `boolean | number` 单位为度,一度约 111km数字越大精度越低。参考设置数据 0.01
- label 标注配置项 支持常量,不支持数据映射
- enable `boolean` 是否显示标注
- color 标注字体颜色 常量
- field 标注字段 常量
- size 标注大小 常量
- stroke 文字描边颜色
- strokeWidth 文字描边宽度
- textAllowOverlap 是否允许文字压盖
- opacity 标注透明度
- fill 填充配置项 支持数据映射
- color 图层填充颜色,支持常量和数据映射
常量:统一设置成一样的颜色
数据映射
- field 填充映射字段
- values 映射值,同 color 方法第二个参数数组,回调函数
- style 同 polygonLayer 的 style 方法
- activeColor 鼠标滑过高亮颜色
- bubble 气泡图
- enable `boolean` 是否显示气泡 default false
- color 气泡颜色 支持常量、数据映射
- size 气泡大小 支持常量、数据映射
- shape 气泡形状 支持常量、数据映射
- style 气泡图样式 同 PointLayer
- stroke 填充描边颜色 `ProvinceLayer, CityLayer, CountyLayer`
- strokeWidth 填充描边宽度 `ProvinceLayer, CityLayer, CountyLayer`
- autoFit 是否自动缩放到图层范围 `boolean`
- popup 信息窗口
- openTriggerEvent 触发事件 例如 'mousemove' | 'click';
- closeTriggerEvent 触发事件 例如 'mousemove' | 'click';
- enable 是否开启 `boolean`
- triggerEvent 触发事件 例如 'mousemove' | 'click';
- Html popup html 字符串,支持回调函数 (properties: any) => string;
- chinaNationalStroke 中国国界线颜色 `CountryLayer`
- chinaNationalWidth 中国国界线宽度 `CountryLayer`
- coastlineStroke 海岸线颜色 `CountryLayer`
- coastlineWidth 海岸线宽度 `WorldLayer` `CountryLayer`
- nationalWidth 国界线 `WorldLayer` `CountryLayer`
- nationalStroke 国界线 `WorldLayer` `CountryLayer`
- provinceStroke 省界颜色 `CountryLayer depth= 012时生效`
- provinceStrokeWidth 省界宽度 `CountryLayer depth = 012时生效`
- cityStroke 市级边界颜色 `CountryLayer depth =12时生效`
- cityStrokeWidth 市级边界宽度 `CountryLayer depth =12 时生效`
- countyStroke 县级边界颜色 `CountryLayer depth =2时生效`
- countyStrokeWidth 县级边界宽度 `CountryLayer depth =2时生效`
⛔ ProvinceLayer, CityLayer, CountyLayer 如需要设置描边颜色,宽度使用 storke,strokeWidth 配置。
### 数据
District 提供 polygon 数据需要跟用户的属性数据,通过关系字段进行连接
- [国家名称对照表](https://gw.alipayobjects.com/os/bmw-prod/b6fcd072-72a7-4875-8e05-9652ffc977d9.csv)
- [省级行政名称*adcode*对照表.csv](https://gw.alipayobjects.com/os/bmw-prod/2aa6fb7b-3694-4df3-b601-6f6f9adac496.csv)
- [市级行政区划及编码](https://gw.alipayobjects.com/os/bmw-prod/d2aefd78-f5df-486f-9310-7449cc7f5569.csv)
- [县级行政区名称级编码](https://gw.alipayobjects.com/os/bmw-prod/fafd299e-0e1e-4fa2-a8ac-10a984c6e983.csv)
### 属性
行政区划组件每个图层有多个子图层组成,如标注层,国界线、省界线等等,
#### fillLayer
图层事件可以通过该属性进行设置
### 方法
#### updateData(data, joinBy)
更新显示数据,
参数:
- data 需要更新的数据
- joinBy 关联字段 可选,如果不设置保持和初始化一致。
### getFillData
获取填充数据,可用于绘制独立的边界线
#### show
显示图层
#### hide
图层隐藏不显示
#### destroy
移除并销毁图层

View File

@ -0,0 +1,129 @@
---
title: 标准地图
order: 2
---
## 五种地图类型
- WorldLayer 世界地图
- CountryLayer 国家地图,目前只支持中国
- ProvinceLayer 省级地图
- CityLayer 市级地图
- CountyLayer 县级地图
## 构造函数
参数:
- scene L7 scene 对象
- option 行政区划配置项
- zIndex 图层绘制顺序
- data `Array` 属性数据用于可视化渲染
- visible 地图是否可见
- joinBy 数据关联,属性数据如何内部空间数据关联绑定 目前支持 NAME_CHN,adcode 字段连接
- simplifyTolerance 数据抽稀容差,默认不抽稀 `boolean | number` 单位为度,一度约 111km数字越大精度越低。参考设置数据 0.01
对照表 `Array [string, string]` 第一个值为空间数据字段,第二个为传入数据字段名
- depth 数据显示层级 0国家级1:省级2: 市级3线级
- label 标注配置项 支持常量,不支持数据映射
- enable `boolean` 是否显示标注
- color 标注字体颜色 常量
- field 标注字段 常量
- size 标注大小 常量
- stroke 文字描边颜色
- strokeWidth 文字描边宽度
- textAllowOverlap 是否允许文字压盖
- opacity 标注透明度
- spacing: `number` 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
- padding: `[number, number]` 文本相对锚点的偏移量 [x, y]
其他包括 text [style 的配置](../layer/point_layer/text#style)
- fill 填充配置项 支持数据映射
- color 图层填充颜色,支持常量和数据映射
常量:统一设置成一样的颜色
数据映射
- field 填充映射字段
- values 映射值,同 color 方法第二个参数数组,回调函数
- filter 图层过滤方法,支持常量和数据映射 同 layer.filter 方法
数据映射 - field 填充映射字段 - values 回调函数 `false` 返回值将会被过滤掉
- style 同 polygonLayer 的 style 方法
- activeColor 鼠标滑过高亮颜色, `string | boolean` 如果设置为 `false`取消高亮
- bubble 气泡图
- enable `boolean` 是否显示气泡 default false
- color 气泡颜色 支持常量、数据映射
- size 气泡大小 支持常量、数据映射
- shape 气泡形状 支持常量、数据映射
- style 气泡图样式 同 PointLayer
- showBorder `boolean` 是否显示国界线,默认显示,不建议不显示
- stroke 填充描边颜色 `ProvinceLayer, CityLayer, CountyLayer`
- strokeWidth 填充描边宽度 `ProvinceLayer, CityLayer, CountyLayer`
- autoFit 是否自动缩放到图层范围 `boolean`
- popup 信息窗口
- enable 是否开启 `boolean`
- openTriggerEvent 触发事件 例如 'mousemove' | 'click';
- closeTriggerEvent 触发事件 例如 'mousemove' | 'click';
- Html popup html 字符串,支持回调函数 (properties: any) => string;
- chinaNationalStroke 中国国界线颜色 `CountryLayer`
- chinaNationalWidth 中国国界线宽度 `CountryLayer`
- coastlineStroke 海岸线颜色 `CountryLayer`
- coastlineWidth 海岸线宽度 `WorldLayer` `CountryLayer`
- nationalWidth 国界线 `WorldLayer` `CountryLayer`
- nationalStroke 国界线 `WorldLayer` `CountryLayer`
- provinceStroke 省界颜色 `CountryLayer depth= 012时生效`
- provinceStrokeWidth 省界宽度 `CountryLayer depth = 012时生效`
- cityStroke 市级边界颜色 `CountryLayer depth =12时生效`
- cityStrokeWidth 市级边界宽度 `CountryLayer depth =12 时生效`
- countyStroke 县级边界颜色 `CountryLayer depth =2时生效`
- countyStrokeWidth 县级边界宽度 `CountryLayer depth =2时生效`
⛔ ProvinceLayer, CityLayer, CountyLayer 如需要设置描边颜色,宽度使用 storke,strokeWidth 配置。
### 数据
District 提供 polygon 数据需要跟用户的属性数据,通过关系字段进行连接
- [国家名称对照表](https://gw.alipayobjects.com/os/bmw-prod/b6fcd072-72a7-4875-8e05-9652ffc977d9.csv)
- [省级行政名称*adcode*对照表.csv](https://gw.alipayobjects.com/os/bmw-prod/2aa6fb7b-3694-4df3-b601-6f6f9adac496.csv)
- [市级行政区划及编码](https://gw.alipayobjects.com/os/bmw-prod/d2aefd78-f5df-486f-9310-7449cc7f5569.csv)
- [县级行政区名称级编码](https://gw.alipayobjects.com/os/bmw-prod/fafd299e-0e1e-4fa2-a8ac-10a984c6e983.csv)
### 属性
行政区划组件每个图层有多个子图层组成,如标注层,国界线、省界线等等,
#### fillLayer
图层事件可以通过该属性进行设置
### 方法
#### updateData(data, joinBy)
更新显示数据,
参数:
- data 需要更新的数据
- joinBy 关联字段 可选,如果不设置保持和初始化一致。
### getFillData
获取填充数据,可用于绘制独立的边界线
#### show
显示图层
#### hide
图层隐藏不显示
#### destroy
移除并销毁图层

View File

@ -0,0 +1,162 @@
---
title: 钻取地图
order: 2
---
钻取是改变展现数据维度的层次变换分析的粒度。它包括向上钻取drillup和向下钻取drilldown
钻取地图支持两种可视化类型
- 填充图:在地图上显示每个区域,根据区域值设置区块填充颜色
- 气泡图:每个区域用气泡显示,根据区域值设置气泡的颜色和大小
## 使用
```javascript
import { DrillDownLayer } from '@antv/l7-district';
```
DrillDownLayer 提供默认提供通过 Layer 的交互事件,实现上钻下钻的交互,默认点击当前图层(click)向下钻取,双击非地图区域(undblclick)向上钻取。你可以更改默认交互的的触发事件。通过也可以更改默认的交互行为。
### 构造函数
- scene L7 scene 对象
- option 行政区划配置项
- drillDepth `number` 下钻深度 `0 | 1 | 2` 1 市级 2县级
- customTrigger 是否自定义下钻交互,默认 `false`
- drillDownTriggerEvent 向下钻取的触发事件 ⛔customTrigger 为 true 时不生效
- drillUpTriggleEvent 向上钻取的触发事件 ⛔customTrigger 为 true 时不生效
- provinceData 省级数据
- cityData 市级数据 可以是全量的数据,下钻时可以不需要重新设置数据
- countyData 县级数据 可以是全量的数据,下钻时可以不需要重新设置数据
- joinBy 数据关联,属性数据如何内部空间数据关联绑定 目前支持 NAME_CHN,adcode 字段连接
对照表 `Array [string, string]` 第一个值为空间数据字段,第二个为传入数据字段名
- label 文本配置项 `labelOption`
- bubble 气泡配置项 `bubbleOption`
- fill 填充配置项 `fillOption`
- province `layerOption` 省级图层配置,如果不设置等同全局配置
- city `layerOption` 市级图层配置,如果不设置等同全局配置
- county `layerOption` 县级图层配置,如果不设置等同全局配置
#### layerOption
下钻各个层级的配置项,可以独立配置,每一层级的样式,不设置和上一层就保持一致
- joinBy: [string, string];
- label: `Partial<ILabelOption>`;
- bubble: `Partial<IBubbleOption>`;
- fill: `Partial<IFillOptions>`;
⛔ 中国地图视角设置,省界,海岸线,宽度通过以下属性
- chinaNationalStroke 中国国界线颜色
- chinaNationalWidth 中国国界线宽度
- coastlineStroke 海岸线颜色
- coastlineWidth 海岸线宽度
- nationalWidth 国界线
- nationalStroke 国界线
- provinceStroke 省界颜色
- provinceStrokeWidth 省界宽度
#### labelOption
文本标注配置项,目前只支持常量配置,不支持数据映射
- enable `boolean` 是否开启标注 `true`
- color `string` 标注颜色
- field `string` 标注字段名 默认 `NAME_CHN`
- size `number` 文本大小 默认 `8`
- stroke `string` 描边颜色 `#fff`
- strokeWidth `number` 描边宽度 `2`
- textAllowOverlap: `boolean` 文字是否允许压盖 `true`
- opacity `number` 透明度 `1`
- spacing: `number` 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
- padding: `[number, number]` 文本相对锚点的偏移量 [x, y]
其他包括 text [style 的配置](../layer/point_layer/text#style)
#### bubbleOption
气泡图配置项
- enable `boolean` 是否显示气泡 `true`
- shape: AttributeType; 气泡形状支持数据映射
- size: AttributeType; 气泡大小支持数据映射
- color: AttributeType; 气泡颜色支持数据映射
- scale: { // 数字度量
field: string; 度量字段
type: ScaleTypeName; 度量字段
};
- style: {
opacity: number; 透明度
stroke: string; 填充色
strokeWidth: number; 填充宽度
};
#### fill
填充图样式
- scale: ScaleTypeName | null; 填充颜色度量类型
- color: AttributeType; 填充颜色支持数据映射
- style: any; 填充图样式
- activeColor: string; 填充图高亮颜色
## 属性
为了实现灵活相关图层的可视化样式,将内部图层通过属性对外透出
### provinceLayer
全国地图 CountyLayer
### cityLayer
省级地图 ProvinceLayer
### countyLayer
市级地图 CityLayer
## 方法
### drillDown
向下钻取 自定义钻取交互行为时使用
** 参数 **
- adcode 下钻层级的行政区划代码, 可以设置一个或者多个,多个使用
- data 下钻层级的数据,可选,如果不设置取全局配置
- joinBy 下钻关联字段 `Array` 可选 如果不设置取全局配置
```javascirpt
drillLayer.drillDown(['110100'])
```
### drillUp
向上钻取
```javascirpt
drillLayer.drillUp(['110100'])
```
### updateData
参数
- layer 更新图层名称 `province|city|county`
- data 数据
- joinBy 可选
### show
显示图形
### hide
隐藏图层
### destroy
移除并销毁图层

View File

@ -0,0 +1,159 @@
---
title: 钻取地图
order: 2
---
钻取是改变展现数据维度的层次变换分析的粒度。它包括向上钻取drillup和向下钻取drilldown
钻取地图支持两种可视化类型
- 填充图:在地图上显示每个区域,根据区域值设置区块填充颜色
- 气泡图:每个区域用气泡显示,根据区域值设置气泡的颜色和大小
## 使用
```javascript
import { DrillDownLayer } from '@antv/l7-district';
```
DrillDownLayer 提供默认提供通过 Layer 的交互事件,实现上钻下钻的交互,默认点击当前图层(click)向下钻取,双击非地图区域(undblclick)向上钻取。你可以更改默认交互的的触发事件。通过也可以更改默认的交互行为。
### 构造函数
- scene L7 scene 对象
- option 行政区划配置项
- drillDepth `number` 下钻深度 `0 | 1 | 2` 1 市级 2县级
- customTrigger 是否自定义下钻交互,默认 `false`
- drillDownTriggerEvent 向下钻取的触发事件 ⛔customTrigger 为 true 时不生效
- drillUpTriggleEvent 向上钻取的触发事件 ⛔customTrigger 为 true 时不生效
- provinceData 省级数据
- cityData 市级数据 可以是全量的数据,下钻时可以不需要重新设置数据
- countyData 县级数据 可以是全量的数据,下钻时可以不需要重新设置数据
- joinBy 数据关联,属性数据如何内部空间数据关联绑定 目前支持 NAME_CHN,adcode 字段连接
对照表 `Array [string, string]` 第一个值为空间数据字段,第二个为传入数据字段名
- label 文本配置项 `labelOption`
- bubble 气泡配置项 `bubbleOption`
- fill 填充配置项 `fillOption`
- province `layerOption` 省级图层配置,如果不设置等同全局配置
- city `layerOption` 市级图层配置,如果不设置等同全局配置
- county `layerOption` 县级图层配置,如果不设置等同全局配置
#### layerOption
下钻各个层级的配置项,可以独立配置,每一层级的样式,不设置和上一层就保持一致
- joinBy: [string, string];
- label: `Partial<ILabelOption>`;
- bubble: `Partial<IBubbleOption>`;
- fill: `Partial<IFillOptions>`;
⛔ 中国地图视角设置,省界,海岸线,宽度通过以下属性
- chinaNationalStroke 中国国界线颜色
- chinaNationalWidth 中国国界线宽度
- coastlineStroke 海岸线颜色
- coastlineWidth 海岸线宽度
- nationalWidth 国界线
- nationalStroke 国界线
- provinceStroke 省界颜色
- provinceStrokeWidth 省界宽度
#### labelOption
文本标注配置项,目前只支持常量配置,不支持数据映射
- enable `boolean` 是否开启标注 `true`
- color `string` 标注颜色
- field `string` 标注字段名 默认 `NAME_CHN`
- size `number` 文本大小 默认 `8`
- stroke `string` 描边颜色 `#fff`
- strokeWidth `number` 描边宽度 `2`
- textAllowOverlap: `boolean` 文字是否允许压盖 `true`
- opacity `number` 透明度 `1`
#### bubbleOption
气泡图配置项
- enable `boolean` 是否显示气泡 `true`
- shape: AttributeType; 气泡形状支持数据映射
- size: AttributeType; 气泡大小支持数据映射
- color: AttributeType; 气泡颜色支持数据映射
- scale: { // 数字度量
field: string; 度量字段
type: ScaleTypeName; 度量字段
};
- style: {
opacity: number; 透明度
stroke: string; 填充色
strokeWidth: number; 填充宽度
};
#### fill
填充图样式
- scale: ScaleTypeName | null; 填充颜色度量类型
- color: AttributeType; 填充颜色支持数据映射
- style: any; 填充图样式
- activeColor: string; 填充图高亮颜色
## 属性
为了实现灵活相关图层的可视化样式,将内部图层通过属性对外透出
### provinceLayer
全国地图 CountyLayer
### cityLayer
省级地图 ProvinceLayer
### countyLayer
市级地图 CityLayer
## 方法
### drillDown
向下钻取 自定义钻取交互行为时使用
** 参数 **
- adcode 下钻层级的行政区划代码, 可以设置一个或者多个,多个使用
- data 下钻层级的数据,可选,如果不设置取全局配置
- joinBy 下钻关联字段 `Array` 可选 如果不设置取全局配置
```javascirpt
drillLayer.drillDown(['110100'])
```
### drillUp
向上钻取
```javascirpt
drillLayer.drillUp(['110100'])
```
### updateData
参数
- layer 更新图层名称 `province|city|county`
- data 数据
- joinBy 可选
### show
显示图形
### hide
隐藏图层
### destroy
移除并销毁图层

Some files were not shown because too many files have changed in this diff Show More