[OSM-dev] taginfo jsonp support

Pasithee Jupiter pasithee at gmail.com
Fri Apr 8 18:13:08 BST 2011


Hi all

I use the TagInfo API v2 (http://taginfo.openstreetmap.de/api/2) and found
out, that this API does not support JSONP. Is it possible to add this
functionality? Because if you call this API from an other domain e.g. using
jQuery, then you have the "same origin policy" problem (see
http://en.wikipedia.org/wiki/Same_origin_policy).

The only thing to do is, that the API need to wrap the json response in the
callback function.
A sample request could look like the following:
http://taginfo.openstreetmap.de/api/2/db/keys/values?callback=jQuery15106293216187041253_1301994447300&key=amenity&sortname=count_all&sortorder=
des

Here an example of the Google Translate API:
Request:
https://www.googleapis.com/language/translate/v2?
callback=jQuery15106293216187041253_1301994447299&key=key&q=re

Response:
jQuery15106293216187041253_1301994447299({
 "data": {
  "translations": [
   {
    "translatedText": "restaurant"
   }
  ]
 }
}
);

Is that possible? Or could I support you in developing this feature?

Thanks a lot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110408/6d9ee3b9/attachment.html>


More information about the dev mailing list