mirror of https://gitee.com/antv-l7/antv-l7
fix: devDependencies
This commit is contained in:
parent
54a69cefd2
commit
c551308470
|
@ -10,12 +10,7 @@ L7 Layer 接口设计遵循图形语法,所有图层都继承于该基类。
|
||||||
语法示例
|
语法示例
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const layer = new Layer(option)
|
const layer = new Layer(option).source().color().size().shape().style();
|
||||||
.source()
|
|
||||||
.color()
|
|
||||||
.size()
|
|
||||||
.shape()
|
|
||||||
.style();
|
|
||||||
|
|
||||||
scene.addLayer(layer);
|
scene.addLayer(layer);
|
||||||
```
|
```
|
||||||
|
@ -83,7 +78,7 @@ layer.source(data, {
|
||||||
transforms: [
|
transforms: [
|
||||||
{
|
{
|
||||||
type: 'map',
|
type: 'map',
|
||||||
callback: function(item) {
|
callback: function (item) {
|
||||||
const [x, y] = item.coordinates;
|
const [x, y] = item.coordinates;
|
||||||
item.lat = item.lat * 1;
|
item.lat = item.lat * 1;
|
||||||
item.lng = item.lng * 1;
|
item.lng = item.lng * 1;
|
||||||
|
|
|
@ -10,12 +10,7 @@ L7 Layer 接口设计遵循图形语法,所有图层都继承于该基类。
|
||||||
语法示例
|
语法示例
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const layer = new Layer(option)
|
const layer = new Layer(option).source().color().size().shape().style();
|
||||||
.source()
|
|
||||||
.color()
|
|
||||||
.size()
|
|
||||||
.shape()
|
|
||||||
.style();
|
|
||||||
|
|
||||||
scene.addLayer(layer);
|
scene.addLayer(layer);
|
||||||
```
|
```
|
||||||
|
@ -87,7 +82,7 @@ layer.source(data, {
|
||||||
transforms: [
|
transforms: [
|
||||||
{
|
{
|
||||||
type: 'map',
|
type: 'map',
|
||||||
callback: function(item) {
|
callback: function (item) {
|
||||||
const [x, y] = item.coordinates;
|
const [x, y] = item.coordinates;
|
||||||
item.lat = item.lat * 1;
|
item.lat = item.lat * 1;
|
||||||
item.lng = item.lng * 1;
|
item.lng = item.lng * 1;
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antv/g2": "^3.5.9",
|
"@antv/g2": "^3.5.9",
|
||||||
"@antv/l7-district": "2.2.42",
|
"@antv/l7-district": "^2.2.42",
|
||||||
"@antv/l7-draw": "2.3.40",
|
"@antv/l7-draw": "^2.3.40",
|
||||||
"@antv/l7-react": "^2.2.37",
|
"@antv/l7-react": "^2.2.37",
|
||||||
"@antv/l7-district": "^2.2.37",
|
"@antv/l7-district": "^2.2.37",
|
||||||
"@antv/gatsby-theme-antv": "^1.0.0-beta.11",
|
"@antv/gatsby-theme-antv": "^1.0.0-beta.11",
|
||||||
|
|
|
@ -30,14 +30,9 @@ export default class ZoomComponent extends React.Component {
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
const layer = new PolygonLayer({});
|
const layer = new PolygonLayer({});
|
||||||
|
|
||||||
layer
|
layer.source(data).color('#fff').shape('name', 'text').size(16).style({
|
||||||
.source(data)
|
opacity: 1.0,
|
||||||
.color('#fff')
|
});
|
||||||
.shape('name', 'text')
|
|
||||||
.size(16)
|
|
||||||
.style({
|
|
||||||
opacity: 1.0,
|
|
||||||
});
|
|
||||||
scene.addLayer(layer);
|
scene.addLayer(layer);
|
||||||
const zoomControl = new Zoom({
|
const zoomControl = new Zoom({
|
||||||
position: 'bottomright',
|
position: 'bottomright',
|
||||||
|
|
|
@ -52,9 +52,9 @@ export default class Country extends React.Component {
|
||||||
enable: true,
|
enable: true,
|
||||||
openTriggerEvent: 'click',
|
openTriggerEvent: 'click',
|
||||||
Html: (props: any) => {
|
Html: (props: any) => {
|
||||||
return `<span><button onclick='alert(11111)'>点击</button>${props.NAME_CHN +
|
return `<span><button onclick='alert(11111)'>点击</button>${
|
||||||
':' +
|
props.NAME_CHN + ':' + props.value
|
||||||
props.value}</span>`;
|
}</span>`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue