I've coded up a quick demo here. When you load the page, your IP address is passed to GeoLite City, a free GeoLocation database offered by MaxMind. The call returns your latitude, longitude, city, region and country, which is displayed in the top right-hand corner of the page.
The latitude and longitude returned by GeoLite City is in turn passed to Google Places API, which returns the location of restaurants within 500 metres of your own location. (Alternatively, enter the desired latitude and longitude directly.)
|City||Sample IP address||Latitude||Longitude|
|Rio de Janeiro, Brazil||188.8.131.52||-22.9||-43.2333|
|Johannesburg, South Africa||184.108.40.206||-26.2||28.0833|
Change the Place type from Restaurant to one of the other types offered by the Places API - for example, Places of Worship. Then change the range from 500 metres to say, 1000 metres, to change the radius of search.
Change the IP address to see how you can jump from one continent to another. Notice how the City, Region and Country information is updated in the top right-hand corner.