Giter Club home page Giter Club logo

Comments (5)

github-actions avatar github-actions commented on June 11, 2024

Hi @zzrooen, Please star this repo if you find it useful! Thanks ⭐!
你好 @zzrooen。如果该仓库对你有用,可以 star 一下,感谢你的 ⭐!

from l7.

github-actions avatar github-actions commented on June 11, 2024

hi @zzrooen, welcome!

from l7.

lzxue avatar lzxue commented on June 11, 2024

网格大小通过 transform 实现,可以看下面的demo

https://l7.antv.antgroup.com/zh/examples/heatmap/hexagon/#world

from l7.

zzrooen avatar zzrooen commented on June 11, 2024

直接设置网格大小是可以的,但是想实现动态设置网格大小的功能,通过.source将transforms中的size设置为value1不生效
handleChange() {
this.polygonLayer.source(this.d, {
parser: {
type: "json",
x: "lng",
y: "lat",
},
transforms: [
{
type: "grid",
size: this.value1,
field: "v",
method: "sum",
},
],
});
this.polygonLayer.size("sum", [0, this.value1 * 4]);
this.scene.render();
}

from l7.

lzxue avatar lzxue commented on June 11, 2024

直接设置网格大小是可以的,但是想实现动态设置网格大小的功能,通过.source将transforms中的size设置为value1不生效 handleChange() { this.polygonLayer.source(this.d, { parser: { type: "json", x: "lng", y: "lat", }, transforms: [ { type: "grid", size: this.value1, field: "v", method: "sum", }, ], }); this.polygonLayer.size("sum", [0, this.value1 * 4]); this.scene.render(); }

更新网格大小需要通过 setData 更新

from l7.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.