Hi Stephan, 2009/12/22 Stephan Plepelits <[email protected]>: > I just ran into a problem ... I'd like to access OpenStreetMap data > directly from a web application via a XMLHttpRequest. Unfortunately > cross-domain XMLHttpRequests are not allowed unless the foreign web server > replies with a special HTTP-header (Access-Control-Allow-Origin) and you > are using a modern browser (e.g. Firefox >=3).
Wikipedia API and others support JSON-P, this lets you load query results (only GET requests) through simple <script source="..." /> and works cross-domain. It would require that we support returning JSON instead of XML and adding the "callback" parameter to calls, but receiving JSON would be an additional gain for any javascript code using the API. I'd find that very useful, either on the main api or a separate service that syncs through planet diffs. Cheers _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

