This commit is contained in:
yy 2020-08-20 17:38:20 +08:00
commit 06dd158758
1 changed files with 5 additions and 4 deletions

View File

@ -16,11 +16,12 @@ export default class HexagonLayerDemo extends React.Component {
public async componentDidMount() { public async componentDidMount() {
const scene = new Scene({ const scene = new Scene({
id: 'map', id: 'map',
map: new GaodeMap({ map: new Mapbox({
pitch: 0, pitch: 0,
style: 'blank', style: 'blank',
center: [140.067171, 36.26186], center: [140.067171, 36.26186],
zoom: 0, zoom: 3,
maxZoom: 0, maxZoom: 0,
}), }),
}); });
@ -41,7 +42,7 @@ export default class HexagonLayerDemo extends React.Component {
}, },
transforms: [ transforms: [
{ {
type: 'hexagon', type: 'grid',
size: 200000, size: 200000,
field: 'v', field: 'v',
method: 'sum', method: 'sum',
@ -51,7 +52,7 @@ export default class HexagonLayerDemo extends React.Component {
.size('sum', (value) => { .size('sum', (value) => {
return value * 20; return value * 20;
}) })
.shape('hexagonColumn') .shape('squareColumn')
.color( .color(
'count', 'count',
[ [