-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
522 additions
and
441 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Scene } from '@l7/scene'; | ||
import { ImageLayer } from '@l7/layers' | ||
const scene = new Scene({ | ||
id: 'map', | ||
pitch: 0, | ||
type: 'amap', | ||
style: 'light', | ||
center: [121.2680, 30.3628], | ||
zoom: 13, | ||
}); | ||
|
||
const layer = new ImageLayer({}); | ||
layer.source( | ||
'https://gw.alipayobjects.com/zos/rmsportal/FnHFeFklTzKDdUESRNDv.jpg', | ||
{ | ||
parser: { | ||
type: 'image', | ||
extent: [121.168, 30.2828, 121.384, 30.4219], | ||
}, | ||
}, | ||
); | ||
scene.on('loaded',()=>{ | ||
scene.addLayer(layer); | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"title": { | ||
"zh": "栅格图层", | ||
"en": "Gallery" | ||
}, | ||
"demos": [ | ||
{ | ||
"filename": "image.js", | ||
"title": "图片", | ||
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*ZrCaR53185IAAAAAAAAAAABkARQnAQ" | ||
}, | ||
{ | ||
"filename": "raster.js", | ||
"title": "地形" | ||
}, | ||
{ | ||
"filename": "light.js", | ||
"title": "夜光图" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: Raster Map | ||
order: 0 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: 栅格图层 | ||
order: 0 | ||
--- |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Scene } from '@l7/scene'; | ||
import { LineLayer } from '@l7/layers' | ||
const scene = new Scene({ | ||
id: 'map', | ||
center: [103.83735604457024,1.360253881403068], | ||
pitch: 4.00000000000001, | ||
zoom: 10.210275860702593, | ||
rotation: 19.313180925794313, | ||
type: 'mapbox', | ||
style: 'dark', | ||
}); | ||
|
||
fetch('https://gw.alipayobjects.com/os/basement_prod/ee07641d-5490-4768-9826-25862e8019e1.json') | ||
.then((res) => res.json()) | ||
.then((data) => { | ||
const layer = | ||
new LineLayer({ | ||
}) | ||
.source(data,{ | ||
parser:{ | ||
type:'json', | ||
coordinates:'path' | ||
} | ||
}) | ||
.size('level',(level)=>{ | ||
return [1.0 , level * 1] | ||
}) | ||
.shape('line') | ||
.color( | ||
'level', | ||
[ | ||
'#312B60', '#4A457E', | ||
'#615C99', '#816CAD', | ||
'#A67FB5', '#C997C7', | ||
'#DEB8D4', '#F5D4E6', | ||
'#FAE4F1', '#FFF3FC' | ||
].slice(0,8) | ||
) | ||
scene.addLayer(layer); | ||
console.log(layer); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Scene } from '@l7/scene'; | ||
import { Point3dLayer} from '@l7/layers' | ||
|
||
const scene = new Scene({ | ||
id: 'map', | ||
pitch: 35.210526315789465, | ||
type: 'amap', | ||
style: 'dark', | ||
center: [108.524505, 29.873128], | ||
zoom: 4.4, | ||
|
||
}); | ||
window.mapScene = scene; | ||
fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json') | ||
.then((res) => res.json()) | ||
.then((data) => { | ||
const pointLayer = | ||
new Point3dLayer({ | ||
}) | ||
.source(data.list, { | ||
parser: { | ||
type: 'json', | ||
x: 'j', | ||
y: 'w' | ||
} | ||
}) | ||
.shape('cylinder') | ||
.size('t', function(level) { | ||
return [1, 2, level * 2 + 20]; | ||
}) | ||
.color('t',[ | ||
'#094D4A', '#146968', | ||
'#1D7F7E', '#289899', | ||
'#34B6B7', '#4AC5AF', | ||
'#5FD3A6', '#7BE39E', | ||
'#A1EDB8', '#CEF8D6' | ||
],) | ||
.style({ | ||
opacity: 1.0, | ||
}) | ||
scene.addLayer(pointLayer); | ||
console.log(pointLayer); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { HeatMapHexagonLayer, HeatMapGrid3dLayer } from '@l7/layers'; | ||
import { Scene } from '@l7/scene'; | ||
const scene = new Scene({ | ||
id: 'map', | ||
style: 'dark', | ||
pitch: 43, | ||
center: [120.13383079335335,29.651873105004427], | ||
zoom: 7.068989519212174, | ||
type: 'mapbox', | ||
}); | ||
|
||
|
||
window.mapScene = scene; | ||
|
||
fetch( | ||
'https://gw.alipayobjects.com/os/basement_prod/a1a8158d-6fe3-424b-8e50-694ccf61c4d7.csv', | ||
) | ||
.then((res) => res.text()) | ||
.then((data) => { | ||
const layer = new HeatMapGrid3dLayer({}) | ||
.source(data, { | ||
|
||
parser:{ | ||
type:'csv', | ||
x:'lng', | ||
y:'lat', | ||
}, | ||
transforms: [ | ||
{ | ||
type: 'hexagon', | ||
size: 2500, | ||
field: 'v', | ||
method: 'sum', | ||
}, | ||
], | ||
}) | ||
.size('sum', (sum)=>{ | ||
return sum * 200; | ||
}) | ||
.shape('hexagon') | ||
.style({ | ||
coverage: 0.8, | ||
angle: 0, | ||
opacity: 1.0, | ||
}) | ||
.color( | ||
'sum', | ||
[ | ||
'#094D4A', '#146968', | ||
'#1D7F7E', '#289899', | ||
'#34B6B7', '#4AC5AF', | ||
'#5FD3A6', '#7BE39E', | ||
'#A1EDB8', '#C3F9CC', | ||
'#DEFAC0', '#ECFFB1' | ||
] | ||
); | ||
scene.addLayer(layer); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
import { Scene } from '@l7/scene'; | ||
import { PointNormalLayer } from '@l7/layers' | ||
const scene = new Scene({ | ||
id: 'map', | ||
type: 'amap', | ||
style: 'dark', | ||
center: [121.417463, 31.215175], | ||
pitch: 0, | ||
zoom: 11 | ||
|
||
}); | ||
window.mapScene = scene; | ||
fetch('https://gw.alipayobjects.com/os/rmsportal/BElVQFEFvpAKzddxFZxJ.txt') | ||
.then((res) => res.text()) | ||
.then((data) => { | ||
const pointLayer = | ||
new PointNormalLayer({ | ||
}) | ||
.source(data, { | ||
parser: { | ||
type: 'csv', | ||
y: 'lat', | ||
x: 'lng' | ||
} | ||
}).size(0.5) | ||
.color('#080298') | ||
.style({ | ||
opacity:1., | ||
}) | ||
|
||
scene.addLayer(pointLayer); | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
import { Scene } from '@l7/scene'; | ||
import { PointNormalLayer } from '@l7/layers' | ||
const scene = new Scene({ | ||
id: 'map', | ||
pitch: 64.88, | ||
type: 'amap', | ||
style: 'dark', | ||
center: [114.060288, 22.53684], | ||
zoom: 15.63, | ||
|
||
}); | ||
window.mapScene = scene; | ||
fetch('https://gw.alipayobjects.com/os/basement_prod/513add53-dcb2-4295-8860-9e7aa5236699.json') | ||
.then((res) => res.json()) | ||
.then((data) => { | ||
const pointLayer = | ||
new PointNormalLayer({ | ||
|
||
}) | ||
.source(data) | ||
.size(2) | ||
.color('h8',[ | ||
'#0A3663', '#1558AC', | ||
'#3771D9', '#4D89E5', | ||
'#64A5D3', '#72BED6', | ||
'#83CED6', '#A6E1E0', | ||
'#B8EFE2', '#D7F9F0' | ||
]) | ||
.style({ | ||
opacity:1., | ||
}) | ||
|
||
scene.addLayer(pointLayer); | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
--- | ||
title: Gallery | ||
order: 0 | ||
redirect_from: | ||
- /zh/examples/ | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
--- | ||
title: Gallery | ||
order: 0 | ||
redirect_from: | ||
- /zh/examples/ | ||
--- |
Oops, something went wrong.