The key part you might have missed on yours is either setting your initial location as a variable, which you can then re-use, or alternatively, simply referencing it as a magic variable - i.e. it’s implicit definition.
The example above uses some looping, so as it is, I just need to reference it once in any case.
In terms of screen shotting “the map”, what map would you expect? Distance measurement is not necessarily derived from a map (often it’s can be data store of nodal mappings), and even if it were, you have four independent operations, so that would be four separate maps.
If you want to grab an image of a route map, you would need to use some sort of online mapping or a third party map app that supprts the appropriate x-callback-url options to allow you to receive a map image back.
Hope that helps.