Hello guys,
I'm more of a scripter (than app developer), who's worked a bit with ArcGIS and Google APIs in the past (still fairly new to recent JS / Node / Express type frameworks but working on learning them) ...meaning that I'll probably miss some concepts on the first try, but hopefully they'll sink in soon. I've only been experimenting with Cesium for a few months sporadically, and my initial goals are to transition data from some GE Enterprise and similar projects over to use a Cesium framework (like many people are trying with Cesium). We're also interested in using the Entity API some in the longer-term, but are more immediately focused on trying to integrate legacy GIS services (many are cross-origin) via your connectors like ArcGisMapServerImageryProvider, WebMapServiceImageryProvider, KmlDataSource, etc.
I'll probably post additional questions later, which related to some recent tests, but for now I'll just ask about proxies for KML (for some reason, those aren't working for me as well as for the other data types). I've been just using the recommended Node framework so far, and had some success with using the DefaultProxy object which has been included with source recently (new Cesium.DefaultProxy("/proxy/"). Recently, when I've used DefaultProxy with external ArcGIS Map Services, this setting has worked without issues (assuming no authenticated service dependencies).
For example, this source requires the proxy parameter, but works fine for me:
var agsLayer = layers.addImageryProvider(new Cesium.ArcGisMapServerImageryProvider( {
url : "http://svinetfc3.fs.fed.us/ArcGIS_NPSG/rest/services/NPSG/Fire_Danger/MapServer",
layers : "0",
proxy : new Cesium.DefaultProxy("/proxy/")
}));
However, when I try the same type of thing with KmlDataSource (below - different source), it's not working for me currently:
var kmlLayer = viewer.dataSources.add(Cesium.KmlDataSource.load("http://activefiremaps.fs.fed.us/data/kml/conus.kmz"', new Cesium.DefaultProxy("/proxy/")));
The example above works fine for me with GE Client. I've also tried accessing KML files locally, but there's still CORS issues since the KML tags usually reference external sources as well. Since we're consuming multiple external services which don't (and won't) have CORS enabled, using the proxy seems our only choice in order to consume that KML data (don't have control over any external whitelists either). I've read most threads here related to KML, CORS, and proxies, but am not sure if something else changed recently with the Cesium.KmlDataSource, or if I need to do more work with proxies or Node configuration, to get external KMLs working. Why do ArcGIS Map Services work with DefaultProxy as-is, but then KML sources don't? Do these need much different handlers?
Any suggestions are appreciated.
Thanks,
Chris