[OSM-dev] taginfo jsonp support
Jochen Topf
jochen at remote.org
Wed Apr 13 09:22:11 BST 2011
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 <pasithee at gmail.com>
> To: dev at openstreetmap.org
> 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
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
--
Jochen Topf jochen at remote.org http://www.remote.org/jochen/ +49-721-388298
More information about the dev
mailing list