On 11/30/10 2:56 PM, Phil Scadden wrote:
This is not particularly useful for cross-domain requests though -
unless the service returns JSON padded with a callback.
E.g.
http://demo.opengeo.org/geoserver/wfs?VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=tiger:poi&MAXFEATURES=1&OUTPUTFORMAT=json&FORMAT_OPTIONS=callback:foo
Using syntax like the request above, you can dynamically inject
scripts into your page that load features cross-origin.
That looks exceedingly useful to me! I use script injection a lot to get
around local file restrictions in Chrome and cross-site access. How
would go about building that into OL as alternative to POST for wfs
getfeature queries?
One thing to note is that Internet Explorer's limitation of 2083
character URLs will make this only practical if you are not issuing
requests with large filters.
To implement something like this in OpenLayers, the HTTP related
protocols could be given an option to do script injection instead of
XHR. A plain old Script protocol would be a nice clean alternative as well.
Tim
--
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.
_______________________________________________
Dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-dev