You can achieve this using USQL: https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/how-to-use-real-use...
The only consideration is, you will not get the real online users, since the USQL will query the completed sessions only, as per doc:
Only closed user sessions can be queried. Live user sessions aren't taken into account.
Can you work with the built-in version? (Which already does what you need?)
Go to User behavior infograph section of the application, click View geolocation breakdown, and in the Geo locations details that appear under the infograph you already see some of the information.
If you click Expand to large view, you get a total overview.
Fun part there is that you can use the Pin to dashboard option.
Make sure to filter first, e.g. on user type Real Users.
See in the Demo environment:
World map of "www.easytravel.com" - Dynatrace Demo Live: Demo Live - Dynatrace