IPad and odd CZML behavior

Hello Cesium-Dev,

I have noticed some odd CZML behavior on the IPad.

In short while all CZML files work fine on my desktop (Chrome), on the IPad some CZML files work fine, others do not behave well, and some crash the website. Since I am diagnostically-challenged, it is possible that the error has to do with my programming. In fact, historically-speaking, my programming has accounted for 100% of errors, so keep that in mind.

The application allows you to explore World War I by animating the time and place Commonwealth Soldiers died along the Western Front. Yes it is morbid, but interesting for us history nuts.

  1. On loading the application, an AJAX call is made automatically and a CZML file (ellipses with extruded heights) is returned and loaded (www.geo-animate.com/CommonwealthWarGraves/vwgViewer.php). The application works fine while the CZML is being loaded, and upon completion the IPad crashes (again, no trouble on the desktop).

  2. So I created another site exactly the same but with the automatic AJAX call disabled (www.geo-animate.com/CommonwealthWarGravesIpad/vwgViewer.php). The application works fine on the IPad. There are also two buttons that, on being clicked, load CZML files into the viewer.

2a. The first loads a series of time-tagged points that represent the approx location of the front lines between 1914 and 1918. This file loads fine, but does not display the points normally. The points are displayed only for a fleeting instant when another CZML file makes a polygon available. The rest of the time these points are not visible.
[{“id” : “document”, “name” : “CZML Point”,“version” : “1.0”},
{
“id”:“Sector0”,
“availability”:“1914-08-22T12:00:00Z/1918-11-11T12:00:00Z”,
“point”:{
“pixelSize”:5,
“color”:{
“rgba”:[255,187,51,255]
}
},
“position”:{
“cartographicDegrees”:[
“1914-08-21T06:00:00Z”,4.696,51.027,0,
“1914-08-23T06:00:00Z”,4.696,51.027,0,
“1914-08-25T06:00:00Z”,4.696,51.027,0,
“1914-08-27T06:00:00Z”,4.693,51.086,0,
“1914-08-29T06:00:00Z”,4.693,51.086,0,
“1914-08-31T06:00:00Z”,4.693,51.086,0,
“1914-09-02T06:00:00Z”,4.693,51.086,0,
“1914-09-04T06:00:00Z”,4.693,51.086,0,
“1914-09-06T06:00:00Z”,4.693,51.086,0,
“1914-09-08T06:00:00Z”,4.693,51.086,0,
“1914-09-10T06:00:00Z”,4.772,50.977,0,
“1914-09-12T06:00:00Z”,4.75,50.844,0,
“1914-09-14T06:00:00Z”,4.676,50.99,0,
“1914-09-24T06:00:00Z”,4.676,50.99,0,
“1914-09-26T06:00:00Z”,4.667,51.089,0,
“1914-09-28T06:00:00Z”,4.667,51.089,0,
“1914-09-30T06:00:00Z”,4.636,51.132,0,
“1914-10-02T06:00:00Z”,4.576,51.136,0,
“1914-10-04T06:00:00Z”,4.576,51.136,0,
“1914-10-06T06:00:00Z”,4.576,51.158,0,
“1914-10-08T06:00:00Z”,4.652,51.178,0,
“1914-10-10T06:00:00Z”,3.885,51.179,0,
“1914-10-12T06:00:00Z”,3.606,51.22,0,
“1914-10-14T06:00:00Z”,3.009,51.258,0,
“1914-10-16T06:00:00Z”,2.758,51.161,0,
“1914-10-20T06:00:00Z”,2.758,51.161,0,
“1918-09-25T06:00:00Z”,2.724,51.153,0,
“1918-11-12T06:00:00Z”,3.719,51.059,0
]
}
}]

``

2b. The second loads a series of time-tagged rectangles that describe where and when major battles were fought. This CZML file functions perfectly on the IPad.

[{“id” : “document”,“name” : “CZML Point”,“version” : “1.0”},
{
“id”:“Battle of Mons”,
“availability”:“1914-08-23T00:00:00Z/1914-08-24T23:59:59Z”,
“description”:“The British Expeditionary Force (BEF) began disembarking in France on August 13th and by the 20th had concentrated south-west of Maubeuge. The following morning they advanced in coordination with the French 5th Army to their right. By the evening of the 22nd they were positioned east and west of Mons. Meanwhile the German 1st Army, in response to a request for aid from the heavily engaged German 2nd Army west of Charleroi, turned south on the 22nd. The British and German armies ran headlong into each other beginning the morning of the 23rd. After a day of fighting the BEF, outmanned and outmaneuvered, withdrew to the southwest.

This first battle between the BEF and German 1st Army had mixed results. It was largely a tactical victory for Germany, but the BEF eluded the strategic defeat crucial to Germany’s war planning by not allowing the Germans to envelop the BEF’s western flank.

  • Battle of Mons
  • ”,
    “label”:{
    “font”:“20px times”,
    “fillColor”:[{
    “interval”:“1914-08-23T00:00:00Z/1914-08-24T23:59:59Z”,
    “rgba”:[51,37,10,255]
    }],
    “text”:“Battle of Mons”,
    “verticalOrigin”:“BOTTOM”,
    “horizontalOrigin”:“LEFT”,
    “style”:“FILL”
    },
    “position”:{“cartographicDegrees”:[3.54,50.544,0]},
    “polygon”:{
    “positions”:{
    “cartographicDegrees”:[3.54,50.544,0,4.079,50.544,0,4.079,50.371,0,3.54,50.371,0,3.54,50.544,0]
    },
    “fill”:false,
    “outline”:true,
    “outlineWidth”:3,
    “outlineColor”:[{“rgba”:[51,37,10,100]}]
    }
    }]

    ``

    Both of these files are loaded in the same manner.

    At first I thought file size might cause the problem, but the file that crashes the website on the IPad is just under 1MB and the others are less than 100KB. Plus, my other applications work just fine with file sizes much larger (see www.geo-animate.com/CesiumScripts/battleOfNormandy/animation.php).

    I appreciate any suggestions. Best Holidays, Erik

    Hello Erik,

    Are there any error messages printed to the console when the CZML file crashes?

    I got a 404 when I tried to go to the link you posted http://www.geo-animate.com/CommonwealthWarGravesIpad/vwgViewer.php

    Best,

    Hannah

    Sorry Hannah, I mis-typed the address: www.geo-animate.com/CommonwealthWarGravesIpad/cwgViewer.php

    I receive no error messages. Only a note from Chrome saying "Awe Snap,… "

    Thanks for looking at this. E