My code words fine under Windows and Mac, but on Android phones I get the following errors:
We load a KML file from our server and also an ACSII file. We have no control over the webserver setup to change policies in relations to CORS. Just been told it’s failing on iPhones too.
Is this a problem with Cesium? I’ve seen quite a few mentions of CORS and Cesium on Github. The lines causing our issue are:
viewer.dataSources.add(Cesium.KmlDataSource.load('https://terra-dv.com/kml_small.kml', {
camera: viewer.camera,
canvas: viewer.canvas,
clampToGround: true }));
and
new Promise((resolve, reject) => {
$.ajax({
url: 'https://terra-dv.com/aviemore2.csv',
type: 'GET',
dataType: 'text',
success: function (data) { addPolyLine(data) },
error: function (error) { loadError(error) },
}) });
Can I do this in a way that won’t cause CORS errors?