Skip to content

Commit

Permalink
fix(demo): update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
lzxue committed Nov 15, 2019
1 parent 07e8505 commit f073b39
Show file tree
Hide file tree
Showing 30 changed files with 219 additions and 542 deletions.
14 changes: 7 additions & 7 deletions examples/heatmap/heatmap/demo/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"en": "heatmap"
},
"demos": [
{
"filename": "world3d.js",

"title": "经典热力图3D",
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*NxFPSrd9oscAAAAAAAAAAABkARQnAQ"
},

{
"filename": "world.js",
"title": "经典热力图2D",
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*9zUcSK07PHgAAAAAAAAAAABkARQnAQ"
}
},
{
"filename": "world3d.js",
"title": "经典热力图3D",
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*K_nOTa1C7PoAAAAAAAAAAABkARQnAQ"
},
]
}
2 changes: 1 addition & 1 deletion examples/heatmap/heatmap/demo/world3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HeatMapLayer } from '@l7/layers';
const scene = new Scene({
id: 'map',
style: 'dark',
pitch: 0,
pitch: 57.4999999,
center: [116.49434030056, 39.868073421167621],
type: 'mapbox',
zoom: 3,
Expand Down
2 changes: 1 addition & 1 deletion examples/line/arc/demo/arcCircle.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/UEXQMifxtkQlYfChpPwT.txt')
})
.size(1)
.shape('arc')
.color('#113681')
.color('#8C1EB2')
.style({
opacity: 0.8,
blur: 0.99
Expand Down
13 changes: 6 additions & 7 deletions examples/line/arc/demo/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@
"en": "line"
},
"demos": [

{
"filename": "arc3d.js",
"title": "3D弧线"

},
{
"filename": "arcCircle.js",
"title": "大圆弧线",
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*FTp1Roy34qgAAAAAAAAAAABkARQnAQ"

},
{
"filename": "arc.js",
"title": "弧线",
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*gdcqTa6UCsYAAAAAAAAAAABkARQnAQ"
},
{
"filename": "arcCircle.js",
"title": "大圆弧线",
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*gdcqTa6UCsYAAAAAAAAAAABkARQnAQ"

}
]
}
6 changes: 3 additions & 3 deletions examples/line/line/demo/ele.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { Scene } from '@l7/scene';
import { LineLayer } from '@l7/layers'
const scene = new Scene({
id: 'map',
pitch: 0,
pitch: 40.89473684210526,
type: 'amap',
style: 'light',
center: [102.602992, 23.107329],
zoom: 14,
center: [102.60244, 23.10556],
zoom: 14.28,
});

fetch('https://gw.alipayobjects.com/os/rmsportal/ZVfOvhVCzwBkISNsuKCc.json')
Expand Down
26 changes: 11 additions & 15 deletions examples/line/line/demo/ele_dark.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { Scene } from '@l7/scene';
import { LineLayer } from '@l7/layers'
const scene = new Scene({
id: 'map',
pitch: 0,
pitch: 26.842105263157915,
type: 'amap',
style: 'dark',
center: [102.602992, 23.107329],
zoom: 14,
center: [102.601919, 23.108997],
zoom: 14.22,
});

fetch('https://gw.alipayobjects.com/os/rmsportal/ZVfOvhVCzwBkISNsuKCc.json')
Expand All @@ -24,19 +24,15 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/ZVfOvhVCzwBkISNsuKCc.json')
type: 'quantize'
})
.color(
'ELEV',
[ '#E4682F',
'#FF8752',
'#FFA783',
'#FFBEA8',
'#FFDCD6',
'#EEF3FF',
'#C8D7F5',
'#A5C1FC',
'#7FA7F9',
'#5F8AE5' ].reverse()
'ELEV',[
'#094D4A', '#146968',
'#1D7F7E', '#289899',
'#34B6B7', '#4AC5AF',
'#5FD3A6', '#7BE39E',
'#A1EDB8', '#CEF8D6'
],
)
scene.addLayer(layer);
console.log(layer);

});
});
2 changes: 1 addition & 1 deletion examples/line/line/demo/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{
"filename": "ele_dark.js",
"title": "等高线",
"screenshot":""
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*X1LgSKQbrD0AAAAAAAAAAABkARQnAQ"
},
{
"filename": "linedash.js",
Expand Down
36 changes: 0 additions & 36 deletions examples/point/basic/demo/buble.js

This file was deleted.

6 changes: 3 additions & 3 deletions examples/point/basic/demo/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ fetch('https://gw.alipayobjects.com/os/basement_prod/893d1d5f-11d9-45f3-8322-ee9
'vesica',
])
.size('unit_price', [10, 25])
.color('name',['#E4504A',"#E99431", "#EBCC53","#43A5DA","#6CC175"])
.color('name',['#5B8FF9',"#5CCEA1", "#5D7092","#F6BD16","#E86452"])
.style({
opacity:1.0,
strokeWidth: 1,
opacity:0.3,
strokeWidth: 2,

})

Expand Down
9 changes: 7 additions & 2 deletions examples/point/basic/demo/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@
},
"demos": [
{
"filename": "buble.js",
"filename": "point.js",
"title": "气泡图",
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*_9ETS5_1yCEAAAAAAAAAAABkARQnAQ"

},
{
"filename": "color.js",
"title": "形状映射",
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*K8ACRr5TY7UAAAAAAAAAAABkARQnAQ"
},
{
"filename": "world.js",
"title": "气泡图 - 电厂装机量",
"title": "气泡图",
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*DMREQYwsCF4AAAAAAAAAAABkARQnAQ"

},
Expand Down
43 changes: 21 additions & 22 deletions examples/point/basic/demo/point.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
import { Scene } from '@l7/scene';
import { PointLayer } from '@l7/layers'
import { PointLayer, PointImageLayer } from '@l7/layers'
const scene = new Scene({
id: 'map',
pitch: 0,
type: 'amap',
style: 'light',
center: [121.40, 31.258134],
zoom: 15,

center: [140.067171, 36.26186],
zoom: 5.32,
maxZoom: 10
});

fetch('https://gw.alipayobjects.com/os/basement_prod/893d1d5f-11d9-45f3-8322-ee9140d288ae.json')
window.mapScene = scene;
fetch('https://gw.alipayobjects.com/os/basement_prod/d3564b06-670f-46ea-8edb-842f7010a7c6.json')
.then((res) => res.json())
.then((data) => {

const pointLayer =
new PointLayer({
})
.source(data, {
parser: {
type: 'json',
x: 'longitude',
y: 'latitude'
}
}).shape('circle')
.size('unit_price', [5, 25])
.color('name',['#49B5AD', "#5B8FF9"])
new PointLayer({
})
.source(data)
.shape('circle')
.size('mag', [5, 16])
.scale('mag',{
type:'quantile'
})
.color('mag',(mag)=>{
return mag > 4.5? "#5B8FF9" : '#5CCEA1';
})
.style({
opacity: 0.3,
strokeWidth: 1,
strokeWidth: 1
})

scene.addLayer(pointLayer);

});

scene.addLayer(pointLayer);

});
41 changes: 0 additions & 41 deletions examples/point/basic/demo/text.js

This file was deleted.

Loading

0 comments on commit f073b39

Please sign in to comment.