API: data in JSON- and JSONP format
There was the possibility to insert JavaScript (which contained an object with different parameters based on user's IP address) into projects. Now you can get these data in JSON- and JSONP format.
Data returned from API, based on the client's IP address:
- latitude - the latitude of the country
- longitude - the length of the country
- zoom — the degree of approximation for maps based on Google Maps
- address.city — the city (not available now)
- address.country — the country
- address.country_code — the country code according to ISO 3166-1
- address.region — the region (not available now)
JSON
The query format:http://api.wipmania.com/json
The answer looks like:
{"latitude":"51.0993","longitude":"10.4537","zoom":5,"address":{"city":"-","country":"Germany","country_code":"DE","region":"-"}}
JSONP
The query format:http://api.wipmania.com/jsonp?callback=YourFunctionHere
YourFunctionHere - your name for the function
The answer looks like:
YourFunctionHere({"latitude":"51.0993","longitude":"10.4537","zoom":5,"address":{"city":"-","country":"Germany","country_code":"DE","region":"-"}})
Example of use with JQuery:$.getJSON("http://api.wipmania.com/jsonp?callback=?",
function(data) {
alert(data.address.country);
});
As for the JavaScript version, there are no restrictions on the number of queries.Post comment
EnglishDeutschРусский
Christian Harms
15 Jun 2009 17:06#1098Deutsch
15 Jun 2009 17:06#1098Deutsch
Alrond 25 Jun 2009 13:06#1146Deutsch
Carsten
29 Sep 2009 01:09#1679Deutsch
29 Sep 2009 01:09#1679Deutsch
Anonymous
30 Oct 2009 06:10#1755Deutsch
30 Oct 2009 06:10#1755Deutsch
Alrond 01 Nov 2009 20:11#1766Deutsch
