Skip to content

Commit

Permalink
Updated to accept a minOpacity
Browse files Browse the repository at this point in the history
Built the dist

Added build commands to README

@mourner suggestions updated

Squashing commits

Squashing again
  • Loading branch information
Robert Wagner authored and Robert Wagner committed Nov 21, 2014
1 parent a4af187 commit 857e08c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ To include the plugin, just use `leaflet-heat.js` from the `dist` folder:
<script src="leaflet-heat.js"></script>
```

## Building
To build the dist files run:
```npm install && npm run prepublish```


## Reference

#### L.heatLayer(latlngs, options)

Constructs a heatmap layer given an array of `LatLng` points and an object with the following options:

- **minOpacity** - the minimum opacity the heat will start at
- **maxZoom** - zoom level where the points reach maximum intensity (as intensity scales with zoom),
equals `maxZoom` of the map by default
- **max** - maximum point intensity, `1.0` by default
Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet-heat.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/HeatLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
L.HeatLayer = (L.Layer ? L.Layer : L.Class).extend({

// options: {
// minOpacity: 0.05,
// maxZoom: 18,
// radius: 25,
// blur: 15,
Expand Down Expand Up @@ -174,7 +175,7 @@ L.HeatLayer = (L.Layer ? L.Layer : L.Class).extend({
// console.timeEnd('process');

// console.time('draw ' + data.length);
this._heat.data(data).draw();
this._heat.data(data).draw(this.options.minOpacity);
// console.timeEnd('draw ' + data.length);

this._frame = null;
Expand Down

0 comments on commit 857e08c

Please sign in to comment.