Possibly, but why would you want to do this client side? This seems like the type of operation that makes much more sense in "OSM space", not vector graphics space.