Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhenn committed Dec 20, 2017
1 parent 0a2c55b commit 613e4b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ ClusterLayer.registerRenderer('canvas', class extends maptalks.renderer.VectorLa
// 2. find point's grid in the grids
// 3. sum up the point into the grid's collection
const points = this._markerPoints;
const prop = this.layer.options['textSumProperty'];
const sumProperty = this.layer.options['textSumProperty'];
const grids = {},
min = this._markerExtent.getMin();
let gx, gy, key,
Expand All @@ -487,8 +487,8 @@ ClusterLayer.registerRenderer('canvas', class extends maptalks.renderer.VectorLa
const geo = points[i].geometry;
let sumProp = 0;

if (prop && geo.getProperties() && geo.getProperties()[prop]) {
sumProp = geo.getProperties()[prop];
if (sumProperty && geo.getProperties() && geo.getProperties()[sumProperty]) {
sumProp = geo.getProperties()[sumProperty];
}

gx = Math.floor((points[i].x - min.x) / r);
Expand Down

0 comments on commit 613e4b8

Please sign in to comment.