mirror of https://gitee.com/antv-l7/antv-l7
docs: 官网文档调整 (#1231)
This commit is contained in:
parent
8b1bf92108
commit
2396fe1f28
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: Docs
|
||||
order: 0
|
||||
---
|
||||
|
||||
`markdown:docs/api/district/start.zh.md`
|
|
@ -1,46 +0,0 @@
|
|||
---
|
||||
title: 文档链接
|
||||
order: 0
|
||||
---
|
||||
|
||||
旧版地图行政区划组件 - [L7Boundary](https://antv.vision/L7-boundary/)
|
||||
|
||||
新版地图行政区划组件 - [L7Plot Choropleth](https://l7plot.antv.vision/zh/docs/api/plots/choropleth)
|
||||
|
||||
🌟 旧版本行政区划组件库不再继续维护,推荐使用 L7Plot 的 [Choropleth 行政区划图表](https://l7plot.antv.vision/zh/examples/gallery#category-%E8%A1%8C%E6%94%BF%E5%8C%BA%E5%9F%9F)。
|
||||
|
||||
## 使用方式
|
||||
|
||||
1. 按图表方式,[在线示例](https://l7plot.antv.vision/zh/examples/choropleth/administrative#china-map)
|
||||
|
||||
```js
|
||||
import { Choropleth } from '@antv/l7plot';
|
||||
|
||||
const choropleth = new Choropleth('container', options);
|
||||
```
|
||||
|
||||
2. 按场景方式,[在线示例](/zh/examples/choropleth/administrative#china-map)
|
||||
|
||||
```js
|
||||
import { Scene, Mapbox } from '@antv/l7';
|
||||
import { Choropleth } from '@antv/l7plot';
|
||||
|
||||
const scene = new Scene({
|
||||
id: 'container',
|
||||
map: new Mapbox({
|
||||
style: 'light',
|
||||
center: [102.447303, 37.753574],
|
||||
zoom: 5,
|
||||
}),
|
||||
});
|
||||
|
||||
const choropleth = new Choropleth(options);
|
||||
|
||||
scene.on('loaded', () => {
|
||||
choropleth.addToScene(scene);
|
||||
});
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
Choropleth 具体 API 文档移步 [L7Plot 官网](https://l7plot.antv.vision/zh/docs/api/plots/choropleth)。
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: Docs
|
||||
order: 0
|
||||
---
|
||||
|
||||
`markdown:docs/api/draw/start.zh.md`
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: 文档链接
|
||||
order: 0
|
||||
---
|
||||
|
||||
[新站点](https://antv.vision/L7Draw/)
|
|
@ -22,7 +22,7 @@ const layer = new CanvasLayer({}).style({
|
|||
|
||||
<img width="60%" style="display: block;margin: 0 auto;" alt="案例" src='https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*hUmNQJ1sAb8AAAAAAAAAAAAAARQnAQ'/>
|
||||
|
||||
[在线案例](../../examples/point/chart#custom)
|
||||
[在线案例](/zh/examples/point/chart#custom)
|
||||
|
||||
### source
|
||||
|
||||
|
@ -40,7 +40,7 @@ const layer = new CanvasLayer({}).style({
|
|||
layer.animate(true);
|
||||
```
|
||||
|
||||
[在线案例](../../examples/point/chart#custom)
|
||||
[在线案例](/zh/examples/point/chart#custom)
|
||||
|
||||
### style
|
||||
|
|
@ -37,7 +37,7 @@ scene.addLayer(layer);
|
|||
|
||||
<img width="60%" style="display: block;margin: 0 auto;" alt="案例" src='https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*PIXmQ6m1C10AAAAAAAAAAAAAARQnAQ' />
|
||||
|
||||
[在线案例](../../examples/line/isoline#ele_dark)
|
||||
[在线案例](/zh/examples/line/isoline#ele_dark)
|
||||
|
||||
### 开启后处理
|
||||
|
|
@ -59,4 +59,4 @@ layer.animate(true);
|
|||
1.0: '#d53e4f'
|
||||
}
|
||||
|
||||
[在线案例](../../examples/wind/basic#wind)
|
||||
[在线案例](/zh/examples/wind/basic#wind)
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: 1.x history
|
||||
order: 9
|
||||
---
|
||||
|
||||
`markdown:docs/api/l7history.zh.md`
|
|
@ -1,33 +0,0 @@
|
|||
---
|
||||
title: 1.x 历史版本
|
||||
order: 9
|
||||
---
|
||||
|
||||
`markdown:docs/common/style.md`
|
||||
|
||||
## L7 1.x 版本
|
||||
|
||||
## [旧版地址](https://antv-2018.alipay.com/zh-cn/l7/1.x/index.html)
|
||||
|
||||
目前 1.x 版本最新版本为 ![L7 1.x 版本](https://badgen.net/npm/v/@antv/l7)
|
||||
|
||||
#### CDN 在线使用连接为
|
||||
|
||||
```html
|
||||
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-1.4.14/build/L7-min.js"></script>
|
||||
```
|
||||
|
||||
### npm 安装使用
|
||||
|
||||
会默认安装 1.x 的最新版本,2.0 正式版本发布后才会默认 2.0 版本
|
||||
|
||||
```
|
||||
npm install @antv/l7
|
||||
|
||||
```
|
||||
|
||||
### 1.x 版本 和文档
|
||||
|
||||
- [1.x 官网](https://antv-2018.alipay.com/zh-cn/l7/1.x/index.html)
|
||||
|
||||
- [1.x 文档](https://www.yuque.com/antv/l7/vgo25g)
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: Docs
|
||||
order: 0
|
||||
---
|
||||
|
||||
[New WebSite](https://antv.vision/L7-react/)
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: 文档链接
|
||||
order: 0
|
||||
---
|
||||
|
||||
[新站点](https://antv.vision/L7-react/)
|
|
@ -70,7 +70,7 @@ layer.on('contextmenu', (e) => console.log(e));
|
|||
|
||||
### dblclick
|
||||
|
||||
双击未拾取到元素
|
||||
双击拾取元素
|
||||
|
||||
```javascript
|
||||
layer.on('dblclick', (e) => console.log(e));
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
import { Scene, PointLayer } from '@antv/l7';
|
||||
import { GaodeMap } from '@antv/l7-maps';
|
||||
|
||||
const scene = new Scene({
|
||||
id: 'map',
|
||||
map: new GaodeMap({
|
||||
style: 'light',
|
||||
center: [ 120.19382669582967, 30.258134 ],
|
||||
zoom: 10
|
||||
})
|
||||
});
|
||||
|
||||
const radius = 0.1;
|
||||
|
||||
function pointOnCircle(angle) {
|
||||
return {
|
||||
type: 'FeatureCollection',
|
||||
features: [
|
||||
{
|
||||
type: 'Feature',
|
||||
properties: {},
|
||||
geometry: {
|
||||
type: 'Point',
|
||||
coordinates: [
|
||||
120.19382669582967 + Math.cos(angle) * radius,
|
||||
30.258134 + Math.sin(angle) * radius
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
const layer = new PointLayer({})
|
||||
.source(pointOnCircle(0))
|
||||
.shape('circle')
|
||||
.size(15) // default 1
|
||||
.active(false)
|
||||
.color('#2F54EB')
|
||||
.style({
|
||||
stroke: '#fff',
|
||||
strokeWidth: 2,
|
||||
opacity: 1
|
||||
});
|
||||
scene.addLayer(layer);
|
||||
layer.setData(pointOnCircle(1000));
|
||||
|
||||
function animateMarker(timestamp) {
|
||||
layer.setData(pointOnCircle(timestamp / 1000));
|
||||
scene.render();
|
||||
requestAnimationFrame(animateMarker);
|
||||
}
|
||||
animateMarker(0);
|
|
@ -9,11 +9,6 @@
|
|||
"title": "散点图",
|
||||
"screenshot":"https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*hH8lT6AWcqEAAAAAAAAAAAAAARQnAQ"
|
||||
},
|
||||
{
|
||||
"filename": "dynamicScatter.js",
|
||||
"title": "动态散点",
|
||||
"screenshot":"https://gw.alipayobjects.com/mdn/rms_23a451/afts/img/A*iourTIHnDk0AAAAAAAAAAAAAARQnAQ"
|
||||
},
|
||||
{
|
||||
"filename": "scatterStyleMap.js",
|
||||
"title": "样式映射散点",
|
||||
|
|
Loading…
Reference in New Issue