Taginfo now supports JSONP. See http://wiki.openstreetmap.org/wiki/Taginfo/API#JSONP
Jochen On Fri, Apr 08, 2011 at 07:13:08PM +0200, Pasithee Jupiter wrote: > Date: Fri, 8 Apr 2011 19:13:08 +0200 > From: Pasithee Jupiter <[email protected]> > To: [email protected] > Subject: [OSM-dev] taginfo jsonp support > > 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 > _______________________________________________ > dev mailing list > [email protected] > http://lists.openstreetmap.org/listinfo/dev -- Jochen Topf [email protected] http://www.remote.org/jochen/ +49-721-388298 _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

