In Gephi, you can use a map-based layout to visualize your network based on node location. You need to have two attributes containing the geocoded coordinates of your nodes: latitude and longitude. There are two plugins you can use for the visualization (neither comes with Gephi by default, you have to install them from Tools -> Plugins):
- GeoLayout - when you apply that one, you have to specify the names of the attributes where longitude and latitude are recorded and select a projection (e.g. Mercator). Your nodes will be laid out accordingly.
- Map of countries - that's a plugin that displays a (fairly crude - not too detailed) outline map as a background to your network.
You can use both in sequence - though frankly I've had more success using GeoLayout, exporting the result to a vector graphic, an overlaying it on top of a map image. If your network is large and nicely spread across the geographic area, you won't even need to overlay it on a map - it will already look like one. In the Facebook visualization you've posted above for example, the outlines of continents emerge just based on where nodes/users are concentrated.