Commit b773f0a2 authored by Dave McCormick's avatar Dave McCormick
Browse files

removing unused attempt at heatmap service

parent a92ec078
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment