It would be possible for a experienced developer. You have to know the portions of the old code that would have to be added to the widget and proper requires to be used and how to interact with the map object from the widget. Needless to say there will be nothing simple about the conversion, but it is possible.