Extension to Google Geolocation API

It's no secret that Google Geolocation API, which can provide geolocation data based on IP addresses, often does not show results even for developed countries. In this case Null will be returned.
There is a small simple addition to Google API.

In your project you simply need to place a small script:
<script type="text/javascript" src=""></script>
It contains only one object WIPlocation, its format is similar to google.loader.ClientLocation

Next, add to the code the following:
if (!google.loader.ClientLocation) {
 google.loader.ClientLocation = WIPlocation;

Now, if Google was unable to determine the location, instead of "unknown" you get the country of user.

There are no restrictions of API requests per day.

Format google.loader.ClientLocation is described here.

Object WIPlocation has one more property:
WIPlocation.zoom - zoom level for the country, that can be used to create the map:
map.setCenter(new google.maps.LatLng(google.loader.ClientLocation.latitude, google.loader.ClientLocation.longitude), WIPlocation.zoom);