Almost all of this is already coded in the vector branch - for creating
a feature on a vector layer.
All that is required is for the rendering of the vector to include
distance calculations and markers.
How accurate does your distance calculation need to be? Accurate
distance calculation will require access to the projection and
projection conversion which is not supported by OpenLayers.
There were some implementations discussed on the mapbuilder list,
although I'm not sure if they made it back into the codebase.