Hi
When placed inside sandpit
var czml = [ ..... ]
The code displays a polyline correctly
When placed in a file 'gb.czml' and called from the following (and added to Sandpit example 'CZML Datasource'
Sandcastle.addToolbarButton('Beam', function() {
viewer.dataSources.add(Cesium.CzmlDataSource.load('../../nbn/czml/gb.czml'));
});
I get the following error (thats NOT shown in the var czml ...
"SyntaxError: Unexpected token ]" in the console
Any ideas please
Thanks
Graham
======czml start============
[
{
"id" : "document",
"name" : "N1A_TX_-1.0_dB_Contour.czml",
"version" : "1.0"
},
{
"id" : "Beam_49_Ch_1",
"name": "Beam_49_Ch_1",
"description" : "<TABLE border=\"1\"><TR><TD><B>Variable</B></TD><TD><B>Value</B></TD><TD><B>Unit</B></TD></TR><TR><TD>Channel ID</TD><TD>Beam_49_Ch_1</TD><TD></TD></TR><TR><TD>Channel Size</TD><TD>262.5</TD><TD>MHz</TD></TR><TR><TD>Gateway</TD><TD>6</TD><TD></TD></TR><TR><TD>Frequency</TD><TD>19.744 to 20.0065</TD> <TD>GHz</TD></TR><TR><TD>Directivity</TD><TD>54.17</TD> <TD>dBi</TD></TR><TR><TD>EIRP</TD><TD>68.54</TD> <TD>dBi</TD></TR></TABLE>",
"position" : {
"cartographicDegrees" : [150.3,-36.675,0]
},
"point": {
"color": {
"rgba": [255, 255, 0, 255]
},
"pixelSize": {
"number": 5
}
}
},
{
"id" : "Beam_49_Ch_1",
"name" : "-1.0",
"description" : "<TABLE border=\"1\"><TR><TD><B>Variable</B></TD><TD><B>Value</B></TD><TD><B>Unit</B></TD></TR><TR><TD>Channel ID</TD><TD>-1.0</TD><TD></TD></TR><TR><TD>Channel Size</TD><TD>262.5</TD><TD>MHz</TD></TR><TR><TD>Gateway</TD><TD>6</TD><TD></TD></TR><TR><TD>Frequency</TD><TD>19.744 to 20.0065</TD> <TD>GHz</TD></TR><TR><TD>Directivity</TD><TD>53.17</TD> <TD>dBi</TD></TR><TR><TD>EIRP</TD><TD>67.54</TD> <TD>dBi</TD></TR></TABLE>",
"polyline" : {
"positions" : {
"cartographicDegrees" : [
151.05,-36.656062,0,
151.048707,-36.65,0,
151.043497,-36.625,0,
151.038353,-36.6,0,
151.030871,-36.575,0,
151.025,-36.554939,0,
151.023401,-36.55,0,
151.015124,-36.525,0,
151.007166,-36.5,0,
151,-36.482943,0,
150.9965,-36.475,0,
150.985495,-36.45,0,
150.975,-36.426083,0,
150.974523,-36.425,0,
150.963509,-36.4,0,
150.95,-36.375752,0,
150.94958,-36.375,0,
150.935476,-36.35,0,
150.925,-36.331393,0,
150.921386,-36.325,0,
150.907258,-36.3,0,
150.9,-36.289313,0,
150.889643,-36.275,0,
150.875,-36.254483,0,
150.871525,-36.25,0,
150.852126,-36.225,0,
150.85,-36.222263,0,
150.832649,-36.2,0,
150.825,-36.191544,0,
150.810038,-36.175,0,
150.8,-36.164184,0,
150.786795,-36.15,0,
150.775,-36.137355,0,
150.761808,-36.125,0,
150.75,-36.113671,0,
150.735176,-36.1,0,
150.725,-36.091665,0,
150.704695,-36.075,0,
150.7,-36.071276,0,
150.675,-36.051486,0,
150.672877,-36.05,0,
150.65,-36.033683,0,
150.636779,-36.025,0,
150.625,-36.017296,0,
150.6,-36.00096,0,
150.598529,-36,0,
150.575,-35.985949,0,
150.554705,-35.975,0,
150.55,-35.972523,0,
150.525,-35.961099,0,
150.50072,-35.95,0,
150.5,-35.949673,0,
150.475,-35.938322,0,
150.45,-35.928449,0,
150.43978,-35.925,0,
150.425,-35.920042,0,
150.4,-35.91166,0,
150.375,-35.903279,0,
150.362421,-35.9,0,
150.35,-35.896899,0,
150.325,-35.89173,0,
150.3,-35.886541,0,
150.275,-35.881332,0,
150.25,-35.878358,0,
150.225,-35.87588,0,
150.216144,-35.875,0,
150.2,-35.873506,0,
150.175,-35.87142,0,
150.15,-35.871689,0,
150.125,-35.871975,0,
150.1,-35.87226,0,
150.075,-35.873605,0,
150.063036,-35.875,0,
150.05,-35.876657,0,
150.025,-35.879841,0,
150,-35.883031,0,
149.975,-35.888583,0,
149.95,-35.894786,0,
149.929022,-35.9,0,
149.925,-35.901025,0,
149.9,-35.908147,0,
149.875,-35.917744,0,
149.856064,-35.925,0,
149.85,-35.927335,0,
149.825,-35.936957,0,
149.8,-35.949163,0,
149.798405,-35.95,0,
149.775,-35.962374,0,
149.751228,-35.975,0,
149.75,-35.975761,0,
149.725,-35.99277,0,
149.716018,-36,0,
149.7,-36.012965,0,
149.685175,-36.025,0,
149.675,-36.033306,0,
149.654609,-36.05,0,
149.65,-36.054,0,
149.63026,-36.075,0,
149.625,-36.081736,0,
149.610817,-36.1,0,
149.6,-36.114016,0,
149.59157,-36.125,0,
149.575,-36.146723,0,
149.57285,-36.15,0,
149.557886,-36.175,0,
149.55,-36.192134,0,
149.546406,-36.2,0,
149.535054,-36.225,0,
149.525,-36.247287,0,
149.523785,-36.25,0,
149.513741,-36.275,0,
149.506422,-36.3,0,
149.5,-36.323652,0,
149.499682,-36.325,0,
149.493829,-36.35,0,
149.488995,-36.375,0,
149.486293,-36.4,0,
149.483607,-36.425,0,
149.480936,-36.45,0,
149.479243,-36.475,0,
149.479552,-36.5,0,
149.479865,-36.525,0,
149.480184,-36.55,0,
149.481396,-36.575,0,
149.484542,-36.6,0,
149.487688,-36.625,0,
149.490835,-36.65,0,
149.49476,-36.675,0,
149.5,-36.697396,0,
149.500614,-36.7,0,
149.506511,-36.725,0,
149.512408,-36.75,0,
149.518944,-36.775,0,
149.525,-36.792748,0,
149.527493,-36.8,0,
149.536093,-36.825,0,
149.544696,-36.85,0,
149.55,-36.864599,0,
149.553798,-36.875,0,
149.56508,-36.9,0,
149.575,-36.921966,0,
149.576459,-36.925,0,
149.588258,-36.95,0,
149.599926,-36.975,0,
149.6,-36.975133,0,
149.61537,-37,0,
149.625,-37.015563,0,
149.630874,-37.025,0,
149.646456,-37.05,0,
149.65,-37.055669,0,
149.662143,-37.075,0,
149.675,-37.09224,0,
149.68081,-37.1,0,
149.699604,-37.125,0,
149.7,-37.125526,0,
149.719634,-37.15,0,
149.725,-37.15685,0,
149.740539,-37.175,0,
149.75,-37.184677,0,
149.764997,-37.2,0,
149.775,-37.210001,0,
149.79006,-37.225,0,
149.8,-37.234874,0,
149.815482,-37.25,0,
149.825,-37.259392,0,
149.843246,-37.275,0,
149.85,-37.280294,0,
149.875,-37.299687,0,
149.875403,-37.3,0,
149.9,-37.318299,0,
149.909026,-37.325,0,
149.925,-37.336819,0,
149.945448,-37.35,0,
149.95,-37.352982,0,
149.975,-37.368444,0,
149.985609,-37.375,0,
150,-37.383352,0,
150.025,-37.39791,0,
150.02916,-37.4,0,
150.05,-37.410026,0,
150.075,-37.42107,0,
150.083899,-37.425,0,
150.1,-37.432081,0,
150.125,-37.44308,0,
150.143615,-37.45,0,
150.15,-37.452407,0,
150.175,-37.460605,0,
150.2,-37.468816,0,
150.218803,-37.475,0,
150.225,-37.476982,0,
150.25,-37.483217,0,
150.275,-37.488434,0,
150.3,-37.493686,0,
150.325,-37.498974,0,
150.333399,-37.5,0,
150.35,-37.501876,0,
150.375,-37.503923,0,
150.4,-37.505973,0,
150.425,-37.508026,0,
150.45,-37.507403,0,
150.475,-37.506466,0,
150.5,-37.505489,0,
150.525,-37.50405,0,
150.548959,-37.5,0,
150.55,-37.499803,0,
150.575,-37.495057,0,
150.6,-37.490304,0,
150.625,-37.48371,0,
150.65,-37.475037,0,
150.650107,-37.475,0,
150.675,-37.466299,0,
150.7,-37.457548,0,
150.71523,-37.45,0,
150.725,-37.445006,0,
150.75,-37.431947,0,
150.763275,-37.425,0,
150.775,-37.418667,0,
150.8,-37.403148,0,
150.80429,-37.4,0,
150.825,-37.382832,0,
150.834422,-37.375,0,
150.85,-37.361997,0,
150.864213,-37.35,0,
150.875,-37.340558,0,
150.889546,-37.325,0,
150.9,-37.313311,0,
150.911815,-37.3,0,
150.925,-37.28277,0,
150.930921,-37.275,0,
150.949913,-37.25,0,
150.95,-37.249882,0,
150.965573,-37.225,0,
150.975,-37.208787,0,
150.980066,-37.2,0,
150.991926,-37.175,0,
151,-37.157931,0,
151.00373,-37.15,0,
151.015453,-37.125,0,
151.025,-37.102054,0,
151.025741,-37.1,0,
151.032477,-37.075,0,
151.039185,-37.05,0,
151.045867,-37.025,0,
151.05,-37.008064,0,
151.051947,-37,0,
151.055663,-36.975,0,
151.059359,-36.95,0,
151.063036,-36.925,0,
151.066224,-36.9,0,
151.066987,-36.875,0,
151.067618,-36.85,0,
151.068006,-36.825,0,
151.068013,-36.8,0,
151.065646,-36.775,0,
151.063365,-36.75,0,
151.061167,-36.725,0,
151.058724,-36.7,0,
151.053755,-36.675,0,
151.05,-36.656062,0]
},
"material" : {
"solidColor" : {
"color" : {
"rgba" : [0, 0, 255, 255]
}
}
},
"width" : 1
}
},
]
=============czml end===============