docs: update docs

This commit is contained in:
thinkinggis 2020-06-10 20:43:18 +08:00
parent 0f33e6b298
commit 281bc8f78f
4 changed files with 23 additions and 8 deletions

View File

@ -10,7 +10,12 @@ L7 Layer 接口设计遵循图形语法,所有图层都继承于该基类。
语法示例
```javascript
const layer = new Layer(option).source().color().size().shape().style();
const layer = new Layer(option)
.source()
.color()
.size()
.shape()
.style();
scene.addLayer(layer);
```
@ -78,7 +83,7 @@ layer.source(data, {
transforms: [
{
type: 'map',
callback: function (item) {
callback: function(item) {
const [x, y] = item.coordinates;
item.lat = item.lat * 1;
item.lng = item.lng * 1;

View File

@ -10,7 +10,12 @@ L7 Layer 接口设计遵循图形语法,所有图层都继承于该基类。
语法示例
```javascript
const layer = new Layer(option).source().color().size().shape().style();
const layer = new Layer(option)
.source()
.color()
.size()
.shape()
.style();
scene.addLayer(layer);
```
@ -82,7 +87,7 @@ layer.source(data, {
transforms: [
{
type: 'map',
callback: function (item) {
callback: function(item) {
const [x, y] = item.coordinates;
item.lat = item.lat * 1;
item.lng = item.lng * 1;

View File

@ -1,2 +1,2 @@
const version = '2.2.11';
const version = '2.2.12';
export { version };

View File

@ -30,9 +30,14 @@ export default class ZoomComponent extends React.Component {
this.scene = scene;
const layer = new PolygonLayer({});
layer.source(data).color('#fff').shape('name', 'text').size(16).style({
opacity: 1.0,
});
layer
.source(data)
.color('#fff')
.shape('name', 'text')
.size(16)
.style({
opacity: 1.0,
});
scene.addLayer(layer);
const zoomControl = new Zoom({
position: 'bottomright',