mirror of https://gitee.com/antv-l7/antv-l7
fix(maps): 移除 antd 依赖
This commit is contained in:
parent
ddacfa2ce5
commit
a6c1914789
|
@ -10,7 +10,12 @@ L7 Layer 接口设计遵循图形语法,所有图层都继承于该基类。
|
||||||
语法示例
|
语法示例
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const layer = new Layer(option).source().color().size().shape().style();
|
const layer = new Layer(option)
|
||||||
|
.source()
|
||||||
|
.color()
|
||||||
|
.size()
|
||||||
|
.shape()
|
||||||
|
.style();
|
||||||
|
|
||||||
scene.addLayer(layer);
|
scene.addLayer(layer);
|
||||||
```
|
```
|
||||||
|
@ -78,7 +83,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,7 +10,12 @@ L7 Layer 接口设计遵循图形语法,所有图层都继承于该基类。
|
||||||
语法示例
|
语法示例
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const layer = new Layer(option).source().color().size().shape().style();
|
const layer = new Layer(option)
|
||||||
|
.source()
|
||||||
|
.color()
|
||||||
|
.size()
|
||||||
|
.shape()
|
||||||
|
.style();
|
||||||
|
|
||||||
scene.addLayer(layer);
|
scene.addLayer(layer);
|
||||||
```
|
```
|
||||||
|
@ -82,7 +87,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;
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
"@antv/l7-utils": "^2.2.12",
|
"@antv/l7-utils": "^2.2.12",
|
||||||
"@babel/runtime": "^7.7.7",
|
"@babel/runtime": "^7.7.7",
|
||||||
"@types/amap-js-api": "^1.4.6",
|
"@types/amap-js-api": "^1.4.6",
|
||||||
"antd": "4.2.5",
|
|
||||||
"gl-matrix": "^3.1.0",
|
"gl-matrix": "^3.1.0",
|
||||||
"inversify": "^5.0.1",
|
"inversify": "^5.0.1",
|
||||||
"mapbox-gl": "^1.2.1",
|
"mapbox-gl": "^1.2.1",
|
||||||
|
|
|
@ -30,9 +30,14 @@ export default class ZoomComponent extends React.Component {
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
const layer = new PolygonLayer({});
|
const layer = new PolygonLayer({});
|
||||||
|
|
||||||
layer.source(data).color('#fff').shape('name', 'text').size(16).style({
|
layer
|
||||||
opacity: 1.0,
|
.source(data)
|
||||||
});
|
.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',
|
||||||
|
|
Loading…
Reference in New Issue