Geolocation Based on country

You can use the getCurrentGeolocation() API. Look at the Example: Using the Places API from Google Maps services to see how the geolocation API is used.