I’ve been trying to understand why the incrementalGet function (found in the czmlLayers branch) is using the EventSource api instead of just making a regular AJAX request. The biggest issue I’m having is that I see what the incrementalGetSpec is going to test the function, but I cannot reproduce this in a browser.
The data I am trying to send looks like this:
data: [{"id":"d2495a96","external":{"url":"http://localhost:8080/Apps/CesiumViewer/test.json","pollingUpdate":{"refreshInterval":30.0},"scope":"SHARED"}},{"id":"36745", ...
I have validated that the json data is correctly formatted. I have also tried removing the “data:” prefix, but get the same errors.
The finish() function does get called, but the message event listener never gets called.
In chrome, I get this error message:
EventSource’s response has a MIME type (“text/plain”) that is not “text/event-stream”. Aborting the connection.
I tried to forcing the mime-type, and it still didn’t work.
In Firefox, I get this error message:
Firefox can’t establish a connection to the server at http://localhost:8080/Apps/CesiumViewer/test.json.
That error comes up no matter what I have tried so far.