Hey- Semantica wrote: > Hi all, > > I am considering doing my getLegend requests via XMLHTTPRequest instead of > img.src and have run into the common problem of cross-site scripting errors. > Does someone have an example on how to work around this issue using a > proxy-host or something else? Out of interest, what does OL use to load the > map images from a WMS? Does it use the OpenLayers.ProxyHost? >
The source for image tiles is set via the src attribute on Image objects. That is, img.src = "foo.png". Unless you are relying on the data url scheme (not in IE < 8 ) [1], how do you plan on using the image data you get from your XMLHttpRequest? Referrer spoofing and url caching? If you want to set up a proxy and use OpenLayers.ProxyHost, see if the FAQ helps [2]. [1] http://en.wikipedia.org/wiki/Data_URI_scheme#Web_browser_support [2] http://faq.openlayers.org/proxyhost/all/ > Thank you in advance! -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
