diff --git a/README.md b/README.md
index ffd1a6a230..c06e9576fb 100755
--- a/README.md
+++ b/README.md
@@ -10,12 +10,11 @@ $ npm install
$ npm run test-live
# build watching file changes and run demos
-$ npm run dev
+$ npm run start
# run demos
$ npm run demos
```
-visit online demo
-https://antv.alipay.com/zh-cn/l7/1.x/demo/index.html
+
## How to Contribute
diff --git a/demos/01_animatePoint.html b/demos/01_animatePoint.html
index 65c681a953..f1f7e61013 100644
--- a/demos/01_animatePoint.html
+++ b/demos/01_animatePoint.html
@@ -43,7 +43,6 @@ return {
]
}
}
-console.log(pointOnCircle(10))
const scene = new L7.Scene({
id: 'map',
mapStyle: 'light', // 样式URL
@@ -76,7 +75,7 @@ scene.on('loaded', () => {
circleLayer.setData(pointOnCircle(timestamp / 1000));
requestAnimationFrame(animateMarker);
}
- //animateMarker(0);
+ animateMarker(0);
/**
const layerText = scene.PointLayer({
diff --git a/demos/greatcircle.html b/demos/01_circle.html
similarity index 50%
rename from demos/greatcircle.html
rename to demos/01_circle.html
index b2d1fe28f5..c427571ff5 100644
--- a/demos/greatcircle.html
+++ b/demos/01_circle.html
@@ -3,7 +3,7 @@
- 弧线图
+ 气泡图
@@ -13,39 +13,37 @@
-
-
+
diff --git a/demos/01_point_distribute.html b/demos/01_point_distribute.html
index a3d1bd8f73..2d5267344c 100644
--- a/demos/01_point_distribute.html
+++ b/demos/01_point_distribute.html
@@ -45,7 +45,8 @@ scene.on('loaded', () => {
.style({
stroke: 'rgb(255,255,255)',
strokeWidth: 0,
- opacity: 1.0
+ opacity: 1.0,
+ bending:'additive'
})
.render();
});
diff --git a/demos/03_1_extrude_polygon.html b/demos/03_1_extrude_polygon.html
index f8b80004ae..42b3d5f250 100644
--- a/demos/03_1_extrude_polygon.html
+++ b/demos/03_1_extrude_polygon.html
@@ -31,6 +31,7 @@ const scene = new L7.Scene({
});
window.scene = scene;
+
scene.on('loaded', () => {
$.getJSON('https://gw.alipayobjects.com/os/rmsportal/xxvoBnsYNEPiAXGRmlPD.json', city => {
citylayer = scene.PolygonLayer()
@@ -39,7 +40,7 @@ scene.on('loaded', () => {
.shape('extrude')
.size('max',(value)=>{
- if(value<0)value =0;
+ if(value<0)value =1;
return value * 1000;
})
.active(true)
@@ -48,7 +49,6 @@ scene.on('loaded', () => {
})
.render();
-
const citylayer2 = scene.PolygonLayer()
.source(city)
.shape('line')
@@ -56,7 +56,7 @@ scene.on('loaded', () => {
.style({
opacity: 1
})
- .render();
+ .render();
});
});
diff --git a/demos/03_choropleths_polygon.html b/demos/03_choropleths_polygon.html
index 0700fcf2b9..e141d1476c 100644
--- a/demos/03_choropleths_polygon.html
+++ b/demos/03_choropleths_polygon.html
@@ -81,7 +81,6 @@ scene.on('loaded', () => {
}
})
.shape('fill')
- .pattern('id1')
.active(true)
.style({
opacity: 1
@@ -97,7 +96,10 @@ scene.on('loaded', () => {
})
//.render();
- console.log(citylayer);
+
+ citylayer.on('mouseleave',(e)=>{
+ console.log(e);
+ })
citylayer.on('click',(e)=>{
$("#info").css({'left': e.pixel.x,'top':e.pixel.y, display:'block'});
$("#info").html(`${e.feature.properties.area || e.feature.properties.name }${e.feature.properties.pm2_5_24h || 0}
`);
diff --git a/demos/06_text.html b/demos/06_text.html
index 3fd2bc4f61..45708e187f 100644
--- a/demos/06_text.html
+++ b/demos/06_text.html
@@ -29,7 +29,7 @@ const scene = new L7.Scene({
});
window.scene = scene;
scene.on('loaded', () => {
- $.get('./data/provincePoint.json', data => {
+ $.get('https://gw.alipayobjects.com/os/basement_prod/abcfe339-b8bc-46ce-8ff4-c96185b6235f.json', data => {
scene.PointLayer({
zIndex: 2
})
diff --git a/demos/08_arc_line.html b/demos/08_arc_line.html
index 8a130d82e9..ff6eb262c0 100644
--- a/demos/08_arc_line.html
+++ b/demos/08_arc_line.html
@@ -31,47 +31,26 @@ const scene = new L7.Scene({
});
scene.on('loaded', () => {
$.get('https://gw.alipayobjects.com/os/rmsportal/UEXQMifxtkQlYfChpPwT.txt', data => {
- const rows = data.split('\n');
- var features =[];
- for(var i =1;i
diff --git a/demos/gaode.html b/demos/gaode.html
new file mode 100644
index 0000000000..e8588096ed
--- /dev/null
+++ b/demos/gaode.html
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+ 简易行政区图-世界
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demos/08_point_shape.html b/demos/great_circle.html
similarity index 58%
rename from demos/08_point_shape.html
rename to demos/great_circle.html
index 5629d0ccc5..ba61152db6 100644
--- a/demos/08_point_shape.html
+++ b/demos/great_circle.html
@@ -6,7 +6,7 @@
- point_circle
+ hexagon demo
@@ -15,48 +15,45 @@
+
diff --git a/demos/grid.html b/demos/grid.html
index ba02a4fa0e..d64144ef14 100644
--- a/demos/grid.html
+++ b/demos/grid.html
@@ -53,16 +53,19 @@ scene.on('loaded', () => {
},
{
type: 'grid',
- size: 15000,
+ size: 160000,
field:'v',
method:'sum'
}
]
})
- .shape('grid')
+ .shape('squareColumn')
+ .size('count',(value)=>{
+ return value * 1000;
+ })
.active({fill:'red'})
.style({
- coverage: 0.8
+ coverage: 0.6
})
.color('count', ["#002466","#105CB3","#2894E0","#CFF6FF","#FFF5B8","#FFAB5C","#F27049","#730D1C"])
.render();
diff --git a/demos/hexgon.html b/demos/hexgon.html
index 3cc2da6a73..bbfd0379d6 100644
--- a/demos/hexgon.html
+++ b/demos/hexgon.html
@@ -25,7 +25,7 @@ const scene = new L7.Scene({
mapStyle: 'dark', // 样式URL
center: [120.132624,30.281774],
pitch: 0,
- zoom: 10
+ zoom: 7
});
scene.on('loaded', () => {
$.get('https://gw.alipayobjects.com/os/basement_prod/7359a5e9-3c5e-453f-b207-bc892fb23b84.csv', data => {
@@ -53,16 +53,19 @@ scene.on('loaded', () => {
},
{
type: 'hexagon',
- size: 6000,
+ size: 10000,
field:'v',
method:'sum'
}
]
})
.active(true)
- .shape('hexagon')
+ .size('count',(value)=>{
+ return value * 1000;
+ })
+ .shape('square')
.style({
- coverage: 0.9,
+ coverage: 0.8,
angle: 0,
})
.color('count', ["#002466","#105CB3","#2894E0","#CFF6FF","#FFF5B8","#FFAB5C","#F27049","#730D1C"])
diff --git a/demos/hz.html b/demos/hz.html
new file mode 100644
index 0000000000..fe2058e2a1
--- /dev/null
+++ b/demos/hz.html
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+ city demo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demos/json.html b/demos/json.html
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/demos/meshline.html b/demos/meshline.html
deleted file mode 100644
index 612c43868b..0000000000
--- a/demos/meshline.html
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
- line demo
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demos/polygon_jsondata.html b/demos/polygon_jsondata.html
index cca750f0ca..036e5eb549 100644
--- a/demos/polygon_jsondata.html
+++ b/demos/polygon_jsondata.html
@@ -19,7 +19,7 @@
-
+
+
+
+
+
+