Skip to content

Commit

Permalink
fix alt for Array of Arrays and Array of LatLngs usage
Browse files Browse the repository at this point in the history
  • Loading branch information
meceo committed Nov 3, 2014
1 parent 948d40e commit 997ee85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/HeatLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ L.HeatLayer = L.Class.extend({
x = Math.floor((p.x - offsetX) / cellSize) + 2;
y = Math.floor((p.y - offsetY) / cellSize) + 2;

k = (this._latlngs[i][2] || 1) * v;
var alt = isNaN(this._latlngs[i].alt) ? (isNaN(this._latlngs[i][2]) ? 1 : this._latlngs[i][2]) : this._latlngs[i].alt
k = alt * v;

grid[y] = grid[y] || [];
cell = grid[y][x];
Expand Down

0 comments on commit 997ee85

Please sign in to comment.