On 11/30/10 6:05 PM, Tim Schaub wrote:
On 11/30/10 2:56 PM, Phil Scadden wrote:
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.


Here's a prototype of OpenLayers.Protocol.Script in action:
http://dev.openlayers.org/sandbox/tschaub/xdomain/examples/cross-origin.html

That example issues WFS GetFeature requests with a bbox filter without using a proxy. The protocol temporarily injects a script in the document to request and parse features. Works on FF, Chrome, Safari, and IE 6/7/8.

http://trac.osgeo.org/openlayers/ticket/2956

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

Reply via email to