diff --git a/README.md b/README.md index a9e431f9d1..11d4dff348 100644 --- a/README.md +++ b/README.md @@ -49,34 +49,35 @@ npm install @antv/l7@beta ```javascript import { Scene } from '@antv/l7'; import { Mapbox } from '@antv/l7-maps'; -new Scene({ + +const scene = new Scene({ id: 'map', map: new Mapbox({ style: 'light', pitch: 0, center: [ 107.054293, 35.246265 ], zoom: 4.056 - }) -}) - + }), +}); ``` + ### Add Layer -```javascript +```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 - }); + +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 diff --git a/docs/tutorial/map/amap.en.md b/docs/tutorial/map/amap.en.md index d4be7b109d..bb354f0535 100644 --- a/docs/tutorial/map/amap.en.md +++ b/docs/tutorial/map/amap.en.md @@ -18,7 +18,7 @@ order: 0 2.0版本在L7内部动态引入了高德地图JS API,因此不再需要单独引入高德JS API,只需设置 type 为 ```amap``` 并且传入token ```html - + ``` ### 添加div 标签指定地图容器 @@ -106,7 +106,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json')
- + + ``` ### 添加div 标签指定地图容器 @@ -106,7 +106,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json')
- + + ``` @@ -115,7 +115,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json')
- + + ``` @@ -113,7 +113,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json')
- + ``` diff --git a/docs/tutorial/quickstart.zh.md b/docs/tutorial/quickstart.zh.md index ce86741d7a..382b11b65f 100644 --- a/docs/tutorial/quickstart.zh.md +++ b/docs/tutorial/quickstart.zh.md @@ -17,7 +17,7 @@ Include the L7 JS JavaScript of your HTML file. ```html - ```