0.0.3 • Published 9 years ago
ember-leaflet-heatmap-layer v0.0.3
ember-leaflet-heatmap-layer
Brings Heatmap.js functionality into Ember-Leaflet.
Installation
ember install ember-leaflet-heatmap-layerUsage
{{#leaflet-map lat=lat lng=lng zoom=zoom}}
{{tile-layer url="http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png"}}
{{heatmap-layer data=data valueField='...' maxValue=... minValue=... }}
{{/leaflet-map}}Options
dataheatmap data in format[{lat:24.6408,lng:46.7728,value:3}]minValueminimal value, default0maxValuemaximalValue, default1latFieldlatitude field name, defaultlatlngFieldlongitude field name, defaultlngvalueFieldvalue field name, defaultvalueblurThe blur factor that will be applied to all datapoints. The higher the blur factor is, the smoother the gradients will be, default0.85minOpacityThe minimum opacity the lowest value in the heatmap will have (will be overridden if opacity set), default0maxOpacityThe maximum opacity the lowest value in the heatmap will have (will be overridden if opacity set), default0.8opacity(optional) A global opacity for the whole heatmap. This overrides maxOpacity and minOpacity if set!backgroundColorA background color string in form of hexcode, color name, or rgb(a)gradientAn object that represents the gradient (syntax: number string 0,1 : color string), check out the exampleradiusThe radius each datapoint will have (if not specified on the datapoint itself), default2. Radius should be small ONLY if scaleRadius is true (or small radius is intended). If scaleRadius is false it will be the constant radius used in pixels.scaleRadiusdefaulttrueuseLocalExtremaif set to false the heatmap uses the global maximum for colorization, defalttrue
Gradient example
var gradient = {
// enter n keys between 0 and 1 here
// for gradient color customization
'.5': 'blue',
'.8': 'red',
'.95': 'white'
}Running
ember serve- Visit your app at http://localhost:4200.
Running Tests
npm test(Runsember try:eachto test your addon against multiple Ember versions)ember testember test --server
Building
ember build
For more information on using ember-cli, visit https://ember-cli.com/.