PageSourceSearch

https://deck.gl/assets/js/209149b3.1d0d1bdb.js

js deck.gl collected 2026-09-24 08:43:29 UTC 5,596 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([["4784"],{95401(e,r,t){t.r(r),t.d(r,{metadata:()=>a,default:()=>d,frontMatter:()=>i,contentTitle:()=>g,toc:()=>l,assets:()=>o});var a=JSON.parse('{"id":"api-reference/aggregation-layers/aggregation-layer","title":"AggregationLayer (Experimental)","description":"AggregationLayer is the base class for all layers in @deck.gl/aggregation-layers module. It implements the most common tasks for aggregation with flexibility of customizations.","source":"@site/../docs/api-reference/aggregation-layers/aggregation-layer.md","sourceDirName":"api-reference/aggregation-layers","slug":"/api-reference/aggregation-layers/aggregation-layer","permalink":"/docs/api-reference/aggregation-layers/aggregation-layer","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/deck.gl/tree/master/website/../docs/api-reference/aggregation-layers/aggregation-layer.md","tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Aggregation Layers","permalink":"/docs/api-reference/aggregation-layers/overview"},"next":{"title":"Aggregator Interface","permalink":"/docs/api-reference/aggregation-layers/aggregator"}}'),n=t(74848),s=t(28453);let i={},g="AggregationLayer (Experimental)",o={},l=[{value:"Methods",id:"methods",level:2},{value:"<code>getAggregatorType</code>",id:"getaggregatortype",level:4},{value:"<code>createAggregator</code>",id:"createaggregator",level:4},{value:"<code>onAttributeChange</code>",id:"onattributechange",level:4},{value:"<code>renderLayers</code>",id:"renderlayers",level:4},{value:"Source",id:"source",level:2}];function c(e){let r={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",header:"header",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"aggregationlayer-experimental",children:"AggregationLayer (Experimental)"})}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"AggregationLayer"})," is the base class for all layers in ",(0,n.jsx)(r.code,{children:"@deck.gl/aggregation-layers"})," module. It implements the most common tasks for aggregation with flexibility of customizations."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"AggregationLayer"})," extends ",(0,n.jsx)(r.a,{href:"/docs/api-reference/core/composite-layer",children:"CompositeLayer"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"methods",children:"Methods"}),"\n",(0,n.jsxs)(r.p,{children:["Any layer subclassing the ",(0,n.jsx)(r.code,{children:"AggregationLayer"})," must implement the following methods:"]}),"\n",(0,n.jsx)(r.h4,{id:"getaggregatortype",children:(0,n.jsx)(r.code,{children:"getAggregatorType"})}),"\n",(0,n.jsxs)(r.p,{children:["Returns a string that indicates the type of aggregator that this layer uses, for example ",(0,n.jsx)(r.code,{children:"'gpu'"}),". The aggregator type is re-evaluated every time the layer updates (usually due to props or state change). If the type string does not match its previous value, any existing aggregator will be disposed,and ",(0,n.jsx)(r.code,{children:"createAggregator"})," is called to create a new instance."]}),"\n",(0,n.jsx)(r.h4,{id:"createaggregator",children:(0,n.jsx)(r.code,{children:"createAggregator"})}),"\n",(0,n.jsx)(r.p,{children:"Arguments:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.code,{children:"type"})," (string) - return value from ",(0,n.jsx)(r.code,{children:"getAggregatorType()"})]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:["Returns a ",(0,n.jsx)(r.a,{href:"/docs/api-reference/aggregation-layers/aggregator",children:"Aggregator"})," instance. This instance will be accessible via ",(0,n.jsx)(r.code,{children:"this.state.aggregator"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"onattributechange",children:(0,n.jsx)(r.code,{children:"onAttributeChange"})}),"\n",(0,n.jsx)(r.p,{children:"Arguments:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.code,{children:"attributeId"})," (string) - the id of an attribute that has been updated"]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:["This event handler should be used to update the props of the aggregator, if needed, and call ",(0,n.jsx)(r.code,{children:"aggregator.setNeedsUpdate"})," to request an update."]}),"\n",(0,n.jsx)(r.h4,{id:"renderlayers",children:(0,n.jsx)(r.code,{children:"renderLayers"})}),"\n",(0,n.jsx)(r.p,{children:"Returns a list of sub layers."}),"\n",(0,n.jsxs)(r.p,{children:["Aggregation results can be obtained here with ",(0,n.jsx)(r.code,{children:"aggregator.getBins"}),", ",(0,n.jsx)(r.code,{children:"aggregator.getResult"})," and ",(0,n.jsx)(r.code,{children:"aggregator.getResultDomain"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"source",children:"Source"}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.a,{href:"https://github.com/visgl/deck.gl/tree/9.4-release/modules/aggregation-layers/src/common/aggregation-layer.ts",children:"modules/aggregation-layers/src/common/aggregation-layer.ts"})})]})}function d(e={}){let{wrapper:r}={...(0,s.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453(e,r,t){t.d(r,{R:()=>i,x:()=>g});var a=t(96540);let n={},s=a.createContext(n);function i(e){let r=a.useContext(s);return a.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function g(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),a.createElement(s.Provider,{value:r},e.children)}}}]);
2//# sourceMappingURL=209149b3.1d0d1bdb.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.