How can I get a msg.payload value to use it in a template and plot a map on a dashboard?

Welcome to the Node-RED forum.

Can I suggest, as a starting point, you show what you have done so far.
By this I mean 'share' your NR flow here.
This will enable people to help you (as at the moment any suggestion offered would be a complete guess).

This is how to share your code.