aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2011-04-13 10:14:33 +0200
committerJochen Topf <jochen@topf.org>2011-04-13 10:14:33 +0200
commitd64ea936c4ac4a6c877dfce1e6a2fa71a42e0950 (patch)
tree08b98b972f70c823f0dfa8be4938d8203b4b4165 /examples
parent968aeb70370bda68361a46c264469e831d6e1a08 (diff)
downloadtaginfo-d64ea936c4ac4a6c877dfce1e6a2fa71a42e0950.tar
taginfo-d64ea936c4ac4a6c877dfce1e6a2fa71a42e0950.tar.gz
Added JSONP support
Diffstat (limited to 'examples')
-rw-r--r--examples/jsonp.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/jsonp.html b/examples/jsonp.html
new file mode 100644
index 0000000..b9ceb38
--- /dev/null
+++ b/examples/jsonp.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html>
+ <head>
+ <title>Taginfo JSONP Test</title>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <script>
+var result;
+function jsonp(data) {
+ result = data;
+}
+ </script>
+ <script src="http://taginfo.openstreetmap.de/api/2/db/keys?include=prevalent_values&page=1&rp=15&sortname=count_all&sortorder=desc&qtype=key&callback=jsonp"></script>
+ <script>
+var key = result.data[0].key;
+alert(key);
+ </script>
+ </head>
+ <body>
+ <h1>Taginfo JSONP Test</h1>
+ </body>
+</html>