From 8d120c805de0a1a51909dd7c59d5a4dbb9c6a5bd Mon Sep 17 00:00:00 2001 From: Trevan Richins Date: Thu, 29 Oct 2015 13:18:23 -0600 Subject: [PATCH] Leaflet.heat intensity is between 0.0 and 1.0 --- .../public/vislib/__tests__/visualizations/tile_maps/markers.js | 2 +- src/ui/public/vislib/visualizations/marker_types/heatmap.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/public/vislib/__tests__/visualizations/tile_maps/markers.js b/src/ui/public/vislib/__tests__/visualizations/tile_maps/markers.js index 4ead77f9f4953..24d8378f96a5e 100644 --- a/src/ui/public/vislib/__tests__/visualizations/tile_maps/markers.js +++ b/src/ui/public/vislib/__tests__/visualizations/tile_maps/markers.js @@ -305,7 +305,7 @@ describe('Marker Tests', function () { var arr = markerLayer._dataToHeatArray(max); var index = _.random(mapData.features.length - 1); var feature = mapData.features[index]; - var featureValue = parseInt(feature.properties.value / max * 100); + var featureValue = feature.properties.value / max; var featureArr = feature.geometry.coordinates.slice(0).concat(featureValue); expect(arr[index]).to.eql(featureArr); }); diff --git a/src/ui/public/vislib/visualizations/marker_types/heatmap.js b/src/ui/public/vislib/visualizations/marker_types/heatmap.js index 1973053be1e9c..4272342a67208 100644 --- a/src/ui/public/vislib/visualizations/marker_types/heatmap.js +++ b/src/ui/public/vislib/visualizations/marker_types/heatmap.js @@ -199,7 +199,7 @@ export default function HeatmapMarkerFactory(Private) { heatIntensity = feature.properties.value; } else { // show bucket value normalized to max value - heatIntensity = parseInt(feature.properties.value / max * 100); + heatIntensity = feature.properties.value / max; } return [lat, lng, heatIntensity];