Use of beforeFn which run custom code before some shape is rendered. In the example, before each path is added to the final set, the event is triggered. Inside the trigger function, this is the XML node and the parameter attrs is the attributes to be applied to the shape element.
Use of afterFn which run custom code after some shape is rendered. In the example, after each path is added to the final set, the event is triggered. Inside the trigger function, this is the Raphael shape and the parameter svgNode is the XML node and attrs is the attributes to be applied to the shape element.
We load some SVG element dinamically directly adding the svg path string (drop marker).