I'm building an application that will plot markers on a map - and have alarm rings animating smoothly from the markers.
The markers will have the following properties
- size
- x coordinate
- y coordinate
- alarm rating
if the alarm rating is low - I want the rings to throb very slowly, if its high to throb faster and maybe go out further.
This will be used in a dating app at some point, so like alarm rating will represent people urgently looking to find another person to date. Be good if the map falls on the users current location and an urgent user's rings just come into view.
Here is the latest fiddle, http://jsfiddle.net/NYEaX/367/
This is what I am aiming to build - http://demo.joostkiens.com/het-parool-4g/
function makeRings() {
var datapoints = circleGroup.selectAll("circle");
var radius = 1;
function myTransition(circleData){
var transition = d3.select(this).transition();
speedLineGroup.append("circle")
.attr({
"class": "ring",
"fill":"red",
"stroke":"red",
"cx": circleData.xcoord,
"cy": circleData.ycoord,
"r":radius,
"opacity": 0.4,
"fill-opacity":0.1
})
.transition()
.duration(function(){
return 100*circleData.alarmLevel;
})
.attr("r", radius + 100 )
.attr("opacity", 0)
.remove();
transition.each('end', myTransition);
}
datapoints.each(myTransition);
}