Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure proxy to use to retrieve tiles. (#358)
Add support to set a proxy for Cesium to load layer not accessible due to missing CORS headers (eg. when user can't modify configuration of the mapservice used). This functionality can be activated by setting the olcs.proxy property to the OpenLayers source. The following error occurs if CORS is not configured on the remote service: ``` Image from origin 'http://remote.service.org' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. ``` The ```olcs.proxy``` property can contains: * a function ``` source.set('olcs.proxy', function (url) { return '/myproxy?url=' + encodeURIComponent(url); }); ``` * a string pointing to the proxy. In that case a ```Cesium.DefaultProxy``` will be configured on this URL.
- Loading branch information