In my web app, I'm currently allowing users to draw polygons on an apartment map (essentially outlining units). The map is uploaded by the user and drawn into the canvas. The user clicks to draw the shapes on the canvas, however, I need the ability to fill the shapes at a later time, so I redraw them with SVG. Essentially, I have a canvas overlaid with SVG images.
The functionality I need works fine, however, it feels gross. The coordinates are generated from the canvas, yet stored in the DB and redrawn as SVG. Is there a better way to do this? The whole setup feels dirty to me.