Skip to content
Snippets Groups Projects
Commit b773f0a2 authored by Dave McCormick's avatar Dave McCormick
Browse files

removing unused attempt at heatmap service

parent a92ec078
No related branches found
No related tags found
No related merge requests found
......@@ -54,43 +54,6 @@ $scope.map = {
};
});
(function() {
'use strict';
var heatmapService = function() {
var dataPoints = [];
this.addPoint = function(lat, lon, proximity) {
var weight = this.weight(proximity);
var newPoint = {
location: new google.maps.LatLng(lat, lon),
weight: weight
};
dataPoints.push(newPoint);
return newPoint;
};
this.getPoints = function() {
return dataPoints;
};
this.weight = function(proximity) {
// Weight is normalized by max distance
var maxDistance = 500; // meters
// Cap distance to maxDistance
if (distance > maxDistance) {
distance = maxDistaance;
}
var weight = (maxDistance - distance) / maxDistance;
return weight;
};
};
angular.module('myApp').service('heatmapService', [
heatmapService
]);
})();
</script>
</head>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment