Matthew,
I updated getColor and getVisibility as you directed and modified the ellipsoid material callback. After doing this the example runs in Sandcastle (thank you!), and changing between the options in the dropdownlist is pretty quick.
However, zooming in and out is VERY slow at the points where the camera height is used to update the ellipsoid subdivisions, stackPartitions and slicePartitions.
I would LOVE some pointers on how to make this better if you have the time!
Below is the updated coded...
var viewer = new Cesium.Viewer('cesiumContainer', {
animation: false,
timeline: false,
baseLayerPicker: false,
geocoder: false,
homeButton: false,
infoBox: false,
sceneModePicker: false,
selectionIndicator: false,
navigationHelpButton: false,
scene3DOnly: true,
fullscreenButton: false
});
var VORMODE = 1;
// *****************************************************************************
function getSize() {
var cameraHeight = viewer.camera.positionCartographic.height;
var minSize = 50.0;
var maxSize = 20000.0;
var size = cameraHeight / 50.0;
if (size < minSize) {
size = minSize;
}
if (size > maxSize) {
size = maxSize;
}
return new Cesium.Cartesian3(size, size, size);
}
// *****************************************************************************
function getColor(MON) {
return function() {
switch (VORMODE) {
case 1:
return new Cesium.Color(1.0, 1.0, 0.0, 1.0);
case 2:
if (MON === 1) {
return new Cesium.Color(0.0, 1.0, 0.0, 1.0);
}
break;
case 3:
if (MON === 0) {
return new Cesium.Color(1.0, 0.5, 0.0, 1.0);
}
break;
case 4:
if (MON === 1) {
return new Cesium.Color(0.0, 1.0, 0.0, 1.0);
}
else {
return new Cesium.Color(1.0, 0.5, 0.0, 1.0);
}
break;
}
};
}
// *****************************************************************************
function getVisibility(MON) {
return function() {
switch (VORMODE) {
case 1:
return true;
case 2:
if (MON === 1) {
return true;
}
else {
return false;
}
break;
case 3:
if (MON === 0) {
return true;
}
else {
return false;
}
break;
case 4:
return true;
case 5:
return false;
}
};
}
// *****************************************************************************
function getSubdivisions() {
var cameraHeight = viewer.camera.positionCartographic.height;
if (cameraHeight > 6000000) { return 16; } else
if (cameraHeight > 2000000) { return 32; } else
if (cameraHeight > 1000000) { return 64; } else
{ return 128;}
}
// *****************************************************************************
function getPartitions() {
var cameraHeight = viewer.camera.positionCartographic.height;
if (cameraHeight > 6000000) { return 8; } else
if (cameraHeight > 2000000) { return 16; } else
if (cameraHeight > 1000000) { return 32; } else
{ return 64;}
}
var strData = "38.588825,-85.635996111111098,0;32.481328055555601,-99.863458055555597,1;35.043798333333299,-106.816315,1;45.417355277777801,-98.368719444444494,1;35.111706111111097,-105.03992888888899,1;41.281844722222203,-70.026681388888903,1;41.107890277777798,-81.201545555555597,1;31.6623297222222,-97.269036388888907,1;40.9814311111111,-124.108315277778,1;39.455872499999998,-74.576318611111105,1;34.211569166666699,-97.168324166666693,1;38.807212499999999,-76.866251111111097,1;31.256728888888901,-92.500975277777798,1;40.278653055555601,-80.040858333333304,1;31.185504399999999,-98.141857799999997,1;33.947587222222197,-83.324767222222206,1;42.0556388888889,-102.804444444444,1;40.017016666666699,-80.817253888888899,1;58.724690000000002,-156.75211083333301,1;40.1555775,-103.17974,1;42.7472722222222,-73.803194444444401,1;33.01249,-81.292218055555594,1;27.739799444444401,-98.021342777777804,1;42.5564844444445,-92.398935555555596,1;37.349159166666702,-105.815535277778,1;46.086970277777802,-118.292545555556,1;31.536529444444401,-82.508078333333302,1;38.934596388888899,-77.466695277777802,1;55.0604086111111,-131.57839944444399,1;42.569110555555604,-99.989680000000007,1;39.095423888888902,-94.128834722222194,1;37.158911388888903,-98.1707327777778,0;40.707098055555598,-83.968153333333305,0;40.325436944444398,-78.3037069444444,0;40.151060000000001,-82.588300833333307,1;45.082789722222202,-83.557008055555599,1;40.253349722222197,-74.907576666666699,1;36.109996944444397,-90.953670277777803,1;43.9520319444444,-76.064620000000005,1;44.4491333333333,-83.394294444444498,0;46.161698299999998,-123.8803767,1;33.629070833333301,-84.4350711111111,1;38.8098125,-75.211326388888907,1;44.979714166666703,-97.141741388888903,1;44.3200202777778,-69.7965644444444,1;44.846801944444401,-89.586593055555596,1;35.646975555555599,-119.978605555556,1;39.737521399999999,-88.856431400000005,1;45.958351944444402,-95.2326163888889,1;31.269432777777801,-82.556444722222196,1;42.236986388888901,-85.553169722222194,1;37.391283333333298,-83.263024999999999,1;43.116852222222199,-88.284346388888906,1;42.1619530555556,-72.716203611111098,1;39.171063611111101,-76.661256111111101,1;40.569150833333303,-116.922262222222,1;37.689203055555602,-112.3038875,1;48.722792777777798,-94.607296388888898,0;41.1597313888889,-89.587873055555505,1;41.9410105555556,-72.688578055555595,1;41.160705555555602,-73.124492222222202,1;60.784830555555601,-161.82429666666701,1;41.786395833333302,-78.619358611111096,1;41.894159166666697,-103.482021944444,1;30.612719722222199,-88.055498055555603,1;35.2369408333333,-99.206164444444397,1;35.807067500000002,-101.38213666666699,1;61.569454166666702,-149.96714444444399,1;44.841798888888903,-68.873965277777799,1;32.385588333333303,-101.483682777778,1;38.920345300000001,-88.481804699999998,1;64.004381666666703,-145.71715388888899,1;37.376928888888898,-118.36649805555599,1;45.808534722222198,-108.62458416666701,1;46.761760833333298,-100.665405833333,1;43.421979444444403,-88.125185555555603,1;39.913041111111099,-105.138988333333,1;56.859409444444402,-135.55131222222201,1;44.840594444444399,-117.80785666666701,1;37.780309722222199,-81.123458888888905,1;44.303247222222197,-96.815104444444401,1;35.995784722222197,-114.863569722222,1;37.306448888888902,-81.194261388888904,1;33.596052222222198,-114.76118361111099,1;40.480813333333302,-88.931240555555604,1;44.633414444444398,-71.186133888888904,0;36.136972222222198,-86.684777777777796,1;43.552810000000001,-116.192131666667,1;42.357451388888897,-70.989546111111096,1;43.463151944444398,-108.299712222222,1;42.579444444444398,-110.109222222222,1;29.946047222222202,-94.016202222222205,1;38.2302191666667,-85.664745277777797,0;18.498002222222201,-67.108349166666699,1;39.630555555555603,-93.875277777777796,1;40.759674166666699,-115.76136777777801,1;40.463749999999997,-106.872305555556,1;46.348269166666697,-94.026015277777802,0;38.944521388888901,-104.633471944444,1;40.723401388888902,-90.925889444444394,1;25.9240719444444,-97.375268333333295,1;38.336265277777798,-77.352787500000005,1;71.273414722222199,-156.788085,1;36.1812955555556,-121.642112222222,1;40.740673333333298,-81.432136944444494,1;45.747811111111098,-122.591536666667,1;42.309805555555499,-85.252333333333297,0;30.485130833333301,-91.294062499999995,1;66.9050086111111,-151.53588861111101,1;44.397106388888901,-73.182629722222202,1;36.800583888888902,-116.74764666666699,1;45.552199999999999,-103.45637055555601,0;42.929003055555597,-78.646333333333303,1;38.272106388888901,-94.488230833333304,1;42.689322222222202,-88.301814444444403,0;40.726097500000002,-113.757417222222,1;36.834247777777797,-96.018317777777796,1;39.765833333333298,-103.928044444444,1;40.556118611111103,-87.069320000000005,1;31.892587777777798,-98.957463333333294,1;36.9287408333333,-86.443434166666705,1;32.821255000000001,-106.013153055556,0;40.798432777777798,-74.821832499999999,1;33.453456111111102,-112.824591666667,1;42.580243055555599,-113.86585388888901,1;33.5374861111111,-96.234094444444395,1;32.768128888888903,-114.602840277778,1;35.8688538888889,-81.240528888888903,1;45.7839013888889,-111.15545111111101,1;33.857248611111103,-81.053904444444399,1;42.994299722222202,-73.343999999999994,1;40.929625833333297,-72.798850833333304,1;38.044920555555599,-122.04520833333299,0;37.382418611111099,-87.263700277777801,0;37.347538888888899,-75.997652777777802,1;55.267376944444401,-162.77423888888899,1;37.787329999999997,-113.068230555556,1;34.369064999999999,-100.2890275,1;41.7795588888889,-124.240859444444,1;30.8261863888889,-86.679149444444406,1;37.389847222222201,-108.5617525,1;42.157490833333298,-76.136483333333302,1;37.227527777777802,-89.572388888888895,0;41.5100052777778,-87.571543611111096,1;40.520083888888898,-107.30489305555599,1;32.894319166666698,-80.037814166666706,1;39.7898272222222,-121.847200555556,0;41.887531944444397,-91.785706666666698,1;32.0333886111111,-109.758203055556,1;36.491396944444404,-104.871999722222,1;41.146257222222197,-79.457989444444394,1;39.253218888888902,-80.267861944444405,1;21.2651122222222,-157.70298138888899,1;36.621991666666702,-87.412648055555593,1;41.755709444444399,-107.581982222222,1;30.604996944444402,-96.420676388888893,1;35.1902886111111,-80.951753333333301,1;34.212504722222199,-119.094353611111,1;33.337478599999997,-104.62124559999999,1;40.034531944444403,-88.276058055555595,1;41.2800669444444,-73.581348888888897,1;47.170261111111103,-88.485386111111097,1;37.008609722222197,-88.8369091666667,1;32.256618611111101,-104.226055277778,1;37.626132499999997,-95.593453611111102,1;34.367015277777803,-105.678004722222,1;44.620451388888902,-108.964918333333,1;47.773681944444398,-116.82061,0;40.311659444444402,-74.159766666666698,1;43.219774722222198,-71.575461666666698,1;28.462011944444399,-99.118540833333299,1;38.810823333333303,-92.218273888888902,1;17.734444444444399,-64.700722222222197,1;46.031999999999996,-112.747527777778,1;32.185722222222203,-96.218102777777801,1;33.813838888888903,-78.724517777777805,1;30.3388611111111,-81.509950277777804,1;40.612472222222202,-73.894444444444403,0;42.0480713888889,-83.457628333333304,1;27.903765833333299,-97.444881388888902,1;32.615253888888901,-85.017629999999997,1;29.922333333333299,-99.214500000000001,1;38.641231388888897,-77.865521944444495,1;38.752722222222197,-90.360888888888894,0;48.5649266666667,-112.34324388888901,1;34.650459722222202,-80.274927222222203,1;42.291318611111102,-72.949394166666707,1;40.229208611111098,-81.476476666666699,1;29.599027222222201,-83.048719444444401,1;31.819095000000001,-107.574483055556,1;41.708419999999997,-90.483523611111096,1;32.890311666666697,-96.903964999999999,1;39.015981111111103,-84.703345833333302,1;36.372913888888903,-76.871544722222197,1;44.499569444444397,-123.293669166667,1;48.244694444444399,-122.724416666667,1;30.378550000000001,-97.529847222222202,1;41.516913333333299,-81.163213888888905,1;39.817312777777801,-74.431621111111099,1;41.210952499999998,-104.772911944444,1;26.153425277777799,-81.778101388888899,0;43.999714722222201,-106.435722222222,1;36.884320833333298,-119.815131944444,0;34.962456944444398,-116.578166388889,1;36.0428855555556,-94.197566388888902,0;36.568880555555602,-79.336660555555596,0;30.1897186111111,-94.645020555555604,1;39.439345277777797,-106.89468027777799,1;32.560721388888901,-82.833195833333306,1;42.401472222222203,-90.709083333333297,1;44.088853333333297,-112.209343333333,1;38.859453100000003,-77.036434999999997,1;34.648313611111099,-86.939478611111099,1;37.850574999999999,-100.005632777778,1;41.366388888888899,-91.149055555555506,0;43.090856388888902,-106.277024444444,1;39.8125,-104.66074999999999,1;37.0234691666667,-92.876922777777807,1;25.7999616666667,-80.349035555555602,1;36.091458055555599,-102.54464,1;46.859983888888898,-102.77350194444401,1;41.358065000000003,-82.161968611111106,1;42.490567499999997,-79.274096099999994,0;58.994224444444399,-158.55224222222199,1;46.802162500000001,-92.202856944444406,1;43.550870000000003,-89.763596388888899,1;45.248554722222202,-112.54713888888899,1;32.2755513888889,-107.605501388889,1;44.767113333333299,-116.206270555556,1;40.293786388888897,-87.557185000000004,1;43.8282780555556,-110.335474444444,1;42.178280555555602,-74.956940555555505,1;41.890361111111098,-88.350186944444403,1;40.791764999999998,-73.303673333333293,1;45.078175277777802,-101.715071388889,1;40.016418333333299,-84.396870833333296,1;39.6781469444444,-75.607092222222207,1;34.702556388888901,-112.480349166667,1;37.153253055555602,-107.749617777778,1;44.252777777777801,-121.303527777778,1;41.437578333333299,-93.648578333333305,1;39.302322777777803,-112.50556138888901,1;32.539862777777799,-93.741310833333301,1;34.384474166666699,-97.916811944444405,0;31.4726819444444,-109.602069444444,1;37.808739722222199,-108.931273888889,1;48.115217800000003,-98.912508299999999,0;39.894694444444397,-104.624333333333,1;45.087462500000001,-94.453849722222202,1;42.213138888888899,-83.366666666666703,1;36.018626944444399,-89.317598888888895,0;47.360545277777803,-120.137089722222,1;44.8976547222222,-91.478549166666696,1;37.833593055555603,-121.171413055556,0;38.158362500000003,-82.910054722222199,0;36.2575741666667,-76.175625555555598,1;43.255885555555601,-82.717929444444394,1;43.881172777777799,-104.30780611111101,1;33.455710000000003,-80.8584258333333,0;34.766004166666697,-114.474104166667,1;42.794277777777801,-72.291777777777796,1;35.484567777777798,-119.097296944444,1;32.771364722222202,-93.809929166666706,1;38.9144358333333,-80.099272499999998,1;40.067472777777802,-107.924880277778,1;29.6624522222222,-96.317163055555596,1;33.676029722222196,-117.731083611111,1;33.256156111111103,-92.743938055555603,1;47.024375833333302,-120.458456666667,1;47.821852222222198,-91.830147222222195,0;31.815911111111099,-106.28188222222199,1;34.4191877777778,-82.784692500000006,1;42.144401666666703,-86.122628888888897,1;39.2981252777778,-114.84830388888901,1;42.089648333333301,-77.999548888888896,0;32.400154444444397,-93.595148055555597,1;39.4950075,-76.978571944444397,1;38.291145,-96.138116388888903,1;60.614703611111103,-151.19524277777799,1;43.425694999999997,-70.6135263888889,1;39.053229999999999,-123.274202222222,1;38.420022222222201,-89.159016666666702,1;62.783380833333297,-164.48771305555599,1;64.590009722222206,-149.07287083333301,1;39.2316675,-75.515923611111106,1;42.599083333333297,-87.9316666666667,0;41.269638055555603,-87.791053333333295,1;36.842448333333301,-94.4357008333333,1;47.3779188888889,-119.424003888889,1;42.0174172222222,-80.292702500000004,1;45.722635277777798,-87.089606388888896,1;39.225492777777802,-78.989500000000007,1;41.214949722222201,-78.142756388888898,1;38.0402522222222,-108.25857444444399,1;40.580983888888902,-75.683967777777795,1;31.950242222222201,-85.130542777777805,1;44.120888888888899,-123.222833333333,1;41.274945277777803,-111.025878611111,1;32.366808055555602,-88.458368333333297,0;40.825203333333299,-80.211561111111095,1;31.951743333333301,-106.272399166667,1;35.073131388888903,-77.045058888888903,1;37.631811388888899,-85.675877499999999,1;24.585878333333302,-81.800476388888896,1;43.768772222222204,-87.848756111111101,1;64.800063055555597,-148.01197722222199,1;37.528509444444403,-77.828219166666699,1;37.673441388888897,-90.234035277777807,1;46.753381666666698,-96.851334444444404,1;34.985548611111099,-78.875063888888903,1;40.955332800000001,-83.756024999999994,1;41.3784497222222,-110.424076944444,1;48.214102500000003,-114.175890833333,1;44.825713333333297,-93.456757222222194,1;39.4122275,-77.375135833333303,1;38.182375,-84.908650833333297,1;40.2748947222222,-111.940531388889,1;44.630937222222201,-93.182078611111095,1;34.356693611111098,-118.881291111111,1;40.726694444444398,-75.454750000000004,1;41.449669166666702,-122.8064475,1;41.438611111111101,-79.856777777777793,1;36.714233333333297,-77.012295833333297,0;35.147197777777798,-111.67416277777799,1;26.074737500000001,-80.152472222222201,1;38.6494877777778,-84.310630277777804,1;34.2329336111111,-79.657114166666702,1;36.29965,-92.458383333333302,0;35.093084444444401,-119.865578611111,1;39.531272777777801,-119.656073888889,1;42.9667666666667,-83.746991666666702,1;42.611166666666698,-94.294833333333301,1;40.671266388888903,-124.23453055555601,1;39.690138888888903,-104.62097222222199,1;41.338555555555601,-76.774861111111093,1;37.1044208333333,-119.595445555556,1;43.645972222222198,-94.422555555555604,0;43.649530277777799,-96.781162777777794,1;35.388415277777803,-94.271528333333293,1;30.952105833333299,-102.975713888889,1;35.657549400000001,-105.1355964,1;38.694495277777797,-90.971251111111101,1;32.889449999999997,-97.179425277777796,1;40.9782422222222,-85.191193055555502,1;66.574267500000005,-145.276668055556,1;32.074604166666703,-95.530790555555598,1;33.9764030555556,-86.083556944444396,1;64.738155000000006,-156.77714583333301,1;40.937343333333303,-90.434463611111099,0;32.956258333333302,-112.674271666667,1;44.347771666666702,-105.543485277778,1;37.919067222222203,-100.725084166667,1;35.960345555555598,-112.146058055556,1;31.0979597222222,-88.486128888888899,1;42.545949444444403,-72.058189722222195,1;42.834396388888898,-77.732750833333299,1;30.551341666666701,-83.783132777777794,1;47.5649444444444,-117.626888888889,1;45.145694444444402,-93.373194444444493,1;47.954833888888899,-97.185370277777807,1;43.3416944444444,-73.611765555555607,0;35.131145277777797,-115.176440277778,1;32.417734166666698,-94.753128333333294,1;42.788955833333297,-75.826747222222195,0;48.215269722222203,-106.62546166666699,1;35.834010833333302,-87.451791944444494,0;41.7686025,-86.318399444444495,1;62.152395833333301,-145.45026527777799,1;39.3878611111111,-101.692305555556,1;33.523530833333297,-90.982937500000006,1;34.9523625,-120.52147416666701,1;40.503869444444398,-104.55301305555599,1;45.0124722222222,-84.704277777777804,1;34.8040286111111,-118.861360277778,1;31.581477777777799,-96.5490833333333,0;35.920903055555598,-95.96866,0;29.6921147222222,-82.272974722222202,1;41.325000000000003,-72.050555555555604,1;30.4068325,-89.076779166666697,1;47.163611666666696,-93.488549166666701,1;35.347029722222203,-90.478158888888899,1;34.961269999999999,-85.153368611111105,1;44.5551575,-88.194853055555598,1;34.251566111111103,-82.154148888888898,1;40.984027777777797,-98.314777777777806,1;42.786719722222202,-85.497066111111096,1;39.635031111111097,-79.050527777777802,0;41.5251872222222,-86.027972222222203,1;36.045694166666699,-79.976377499999998,1;47.449979999999996,-111.412164722222,1;33.778277222222201,-100.33619638888899,0;21.440277777777801,-71.134722222222194,1;35.475999166666703,-108.872611666667,1;38.0135561111111,-78.152946666666693,1;34.531308055555598,-120.091083611111,1;36.825106666666699,-82.078979166666699,1;34.195100555555598,-88.012534166666697,0;40.302239722222197,-77.069558888888906,1;34.866589444444401,-99.063382500000003,1;38.452153055555598,-107.039792222222,1;35.781013055555597,-84.978452222222202,1;37.4486722222222,-76.711374722222203,1;40.4540719444445,-100.92356833333299,1;33.776408333333301,-117.185311666667,1;34.797028611111102,-116.462918055556,1;31.618193333333299,-91.299639444444395,1;41.641055555555603,-72.547638888888898,1;38.817500000000003,-103.621388888889,1;39.697728611111103,-77.855710277777803,1;45.861795833333296,-112.16959749999999,1;47.301517222222202,-92.704077777777798,1;43.574853611111102,-85.716161944444494,1;39.258746666666703,-100.22585027777799,1;40.259903611111099,-80.568599722222203,1;34.770263333333297,-89.496496111111099,1;30.119658300000001,-85.677800000000005,0;46.606820833333302,-111.953475277778,1;39.113540833333303,-92.1282338888889,1;48.869179722222199,-97.117090277777805,1;36.437054444444399,-82.129572777777796,1;42.063056944444398,-75.316284444444406,1;21.308309166666699,-157.93042249999999,1;38.754141388888897,-82.026151111111105,1;38.724694444444403,-120.749333333333,1;32.638231944444399,-103.26931444444401,1;59.709429166666702,-151.456598888889,1;44.440083333333298,-98.311080833333307,0;34.478589444444403,-93.0905972222222,1;61.514549722222199,-166.13451472222201,1;37.328870000000002,-77.115943611111106,1;46.947040555555603,-124.149268888889,1;42.761944444444403,-87.814444444444405,0;26.291198333333298,-97.7932722222222,1;36.318309722222203,-93.213276944444402,1;34.943004166666697,-83.915681111111098,1;29.850194722222199,-90.002984166666707,1;40.604541111111097,-98.429616944444405,1;65.706083611111097,-156.370655555556,1;40.918999999999997,-72.316694444444494,1;29.655624166666701,-95.276650000000004,0;48.945285833333301,-122.579255555556,1;46.039493333333297,-67.834150277777795,0;41.409676944444399,-74.591605277777802,1;31.568701666666701,-105.376318611111,1;37.996920277777797,-97.934148055555596,1;36.871381388888899,-91.899995555555506,0;38.416815,-110.699732777778,1;41.2623191666667,-72.885183888888903,0;38.349676666666703,-81.769913333333307,1;48.5404702777778,-109.7699825,1;37.966349999999998,-84.472516388888906,1;37.219364444444402,-120.40026083333299,0;46.018999999999998,-91.446388888888904,0;38.847650555555603,-99.276768333333294,1;40.975088055555602,-76.125812777777796,0;39.516414444444401,-118.997688333333,1;29.956916388888899,-95.345719166666697,1;37.745256944444399,-97.583830555555593,1;43.518999999999998,-112.063916666667,1;29.9560575,-96.5621941666667,1;35.805266111111102,-98.003915277777807,1;33.4855083333333,-88.513598888888893,1;35.260523888888898,-113.934086666667,1;41.665454722222201,-73.822299722222198,1;39.9742416666667,-79.3583675,1;59.942819999999998,-164.03436527777799,1;42.676079166666703,-105.226229444444,1;38.103463888888903,-85.577434999999994,1;39.776436111111103,-90.238732499999998,0;41.074421388888901,-87.8497905555556,0;39.071148611111099,-122.027244166667,1;38.250192777777798,-114.394226388889,1;34.351665277777798,-77.874378888888899,1;43.593122777777801,-118.955045,1;44.648391666666697,-119.711631388889,1;45.816038611111097,-88.112127222222199,1;31.874763333333298,-103.24377722222199,1;48.565798333333298,-93.405677777777797,1;35.061601666666697,-110.795026944444,1;41.5189577777778,-91.613255833333298,1;32.748862500000001,-115.50857833333301,1;40.134976388888902,-92.591720833333298,1;33.707353333333302,-82.162064444444397,1;35.358589166666697,-97.609233611111094,1;43.487915000000001,-99.7613927777778,0;48.145857222222197,-103.583806111111,1;35.370940555555599,-77.558329722222197,1;45.976231666666699,-86.173398333333296,0;42.4950166666667,-76.459716666666694,0;19.721350555555599,-155.01095416666701,1;33.303166666666698,-111.651444444444,1;46.532252222222198,-90.1258411111111,1;43.6210375,-110.7316853,1;32.507485833333298,-90.167594444444404,1;35.874915000000001,-90.588505555555599,1;30.598018055555599,-99.817541111111098,1;32.159588888888898,-97.8776805555556,0;40.6328888888889,-73.771388888888893,1;41.760165833333303,-80.748083333333298,1;42.188609166666701,-79.121304722222206,1;35.5989875,-88.358877500000006,0;33.1404586111111,-116.58593472222201,1;46.932877499999996,-98.678767500000006,1;39.059565555555601,-108.792573888889,1;60.4809522222222,-146.59933527777801,1;41.546391111111099,-88.318427777777799,1;39.4412130555556,-81.374785000000003,1;40.316728888888903,-78.8341655555556,1;42.6151230555556,-89.041277500000007,1;42.111388888888897,-92.908888888888896,0;42.259230000000002,-84.458570277777795,0;32.344611111111099,-86.991269444444399,1;19.717238900000002,-156.0449203,1;38.197091944444402,-102.687532222222,1;27.9861814,-82.013891400000006,1;42.717424166666703,-84.697734444444393,0;41.337864166666698,-105.72093722222201,1;36.079702500000003,-115.159798055556,1;34.496189444444397,-98.413080277777794,1;33.9331438888889,-118.43200638888899,1;33.704950833333299,-101.914010277778,1;41.0486244444444,-100.747157777778,1;37.044398055555597,-100.97120388888899,1;26.828185000000001,-81.391438333333298,1;31.4186827777778,-89.337601944444501,1;30.141513611111101,-93.105569166666697,1;41.362951666666703,-113.840619444444,1;33.258861099999997,-87.536888899999994,1;38.8543916666667,-78.205555833333307,1;43.678853055555599,-72.216055555555599,1;29.175229444444401,-90.104019166666703,1;42.062489444444402,-84.765132500000007,1;31.162355000000002,-94.716956666666704,1;30.193811111111099,-91.992569444444399,1;42.017173333333297,-70.037269722222206,1;40.783722222222202,-73.868611111111093,1;33.049095000000001,-85.206193055555502,1;41.792833333333299,-112.00983333333301,1;34.682973333333301,-118.576938055556,1;41.475777222222199,-75.482628055555594,1;42.982672800000003,-115.7742519,0;35.811623333333301,-79.612596944444405,1;21.965263611111101,-159.33812277777801,1;38.074588333333303,-121.00385777777799,1;34.677672777777801,-92.180528333333299,1;43.109760555555603,-88.037283055555505,0;45.021311666666698,-114.084236666667,1;42.492849444444403,-120.507105,1;29.663225277777801,-92.373642500000003,1;40.124908888888903,-118.57765027777801,1;30.796341111111101,-98.787390000000002,1;40.596746388888903,-93.967595277777804,1;42.1531466666667,-121.727528333333,1;40.9237797222222,-96.742016388888899,1;43.294370555555602,-90.133129999999994,1;20.764501111111102,-156.96888749999999,1;31.124017500000001,-95.967956111111107,1;37.0331502777778,-84.110074166666706,1;27.4787336111111,-99.417680000000004,1;40.119972222222202,-76.291305555555596,1;43.876131388888901,-91.256000277777801,0;45.7135663888889,-121.100846944444,1;56.4677088888889,-133.083113611111,1;36.818035833333298,-77.902968055555604,0;45.7024772222222,-110.442462777778,1;36.5845094444444,-85.166623055555505,1;41.272803611111101,-75.689468333333295,1;37.863804722222199,-80.392025555555605,0;41.144798055555597,-114.97750527777799,1;42.74042,-71.0948430555556,1;47.067424166666697,-109.535343888889,1;38.769869444444403,-87.603827777777795,0;37.254644444444402,-79.236467777777804,1;41.313847500000001,-72.692178611111103,1;32.009345000000003,-102.190388611111,1;30.786221944444399,-85.124449444444394,1;37.590765277777798,-91.788569722222206,1;36.555114166666698,-89.911421944444399,1;18.2537580555556,-67.152485277777799,1;44.270652777777798,-86.2540388888889,1;43.5316369444445,-84.077313888888895,1;41.845522222222201,-106.00428388888901,1;31.304452777777801,-90.258203055555597,1;62.9510402777778,-155.61140277777801,1;39.285283333333297,-94.737063888888898,1;40.179960277777802,-100.5447825,1;39.654061388888898,-92.482157222222199,1;32.6911702777778,-83.647183055555601,1;43.094738888888898,-93.329871388888904,1;59.421804444444398,-146.35001500000001,1;32.378448611111097,-88.804270555555604,1;35.015117500000002,-89.983208611111095,1;40.8686063888889,-82.590962777777804,1;26.173876111111099,-98.240786666666693,1;32.222336666666699,-86.319717777777797,1;31.082270277777798,-83.804227499999996,1;39.556694722222197,-79.860394166666694,1;43.777021666666698,-98.0375647222222,1;29.546343055555599,-94.7475127777778,1;39.145441666666699,-96.668727222222202,1;42.868531666666698,-71.369544722222201,1;32.434069399999998,-90.099772200000004,1;40.237293611111099,-85.394036388888907,1;41.023404166666701,-76.665303611111099,1;43.169241388888899,-86.039384444444394,1;21.138096388888901,-157.16740638888899,1;35.603573888888903,-88.910421388888906,1;44.219911388888903,-93.912370555555597,1;28.105282222222201,-80.635339999999999,1;34.849457777777801,-95.782295277777806,1;42.1999002777778,-112.451235,1;38.3603555555556,-113.013232777778,1;47.4569030555556,-115.646045,1;46.382226666666703,-105.953540555556,1;45.586712222222197,-68.515470277777794,1;32.516893055555599,-92.036021111111097,1;36.343732500000002,-99.880121900000006,1;40.488151388888902,-80.193863888888899,0;36.769278888888898,-114.27746999999999,1;45.180148055555598,-87.647191944444401,1;37.627375277777801,-120.9578775,1;37.900524722222201,-79.106889166666704,1;33.5620547222222,-91.715683611111103,1;43.622822222222197,-84.737269444444394,1;64.696515000000005,-162.07118805555601,1;48.260334999999998,-101.28706777777801,1;44.320279722222203,-72.656612499999994,1;46.381551666666702,-116.869512222222,1;35.252252499999997,-120.759591944444,1;32.726180555555601,-97.997441666666703,1;46.528906111111098,-87.585469444444399,1;39.385572222222201,-77.848356111111102,1;30.298369722222201,-103.954757222222,1;34.706867222222201,-87.491497499999994,1;43.144827499999998,-89.339700555555595,1;46.907965555555599,-114.083652222222,1;44.896594444444403,-93.226433333333304,0;44.914388888888901,-74.7226944444444,1;38.506435833333299,-107.899291666667,1;39.478006666666701,-88.2860444444444,0;40.149166666666702,-110.12765083333301,1;44.1284947222222,-87.679918055555603,0;19.998055555555599,-155.669861111111,1;38.565299444444399,-118.03285333333299,1;31.460441944444401,-87.352762777777798,1;41.396197222222199,-70.612721944444402,1;37.754244166666702,-89.011685,1;47.210868611111103,-119.316808611111,1;39.918053333333297,-75.670797222222205,1;39.317572499999997,-122.2215375,0;37.894066111111101,-86.244527500000004,1;39.098642499999997,-121.573047222222,1;32.782200833333299,-117.225418333333,1;41.321061666666701,-90.638081388888907,1;40.493344722222197,-85.679254999999998,1;30.4721366666667,-87.335894444444406,1;37.725920000000002,-122.22358749999999,1;38.003261388888902,-117.770445833333,1;41.3757355555556,-98.353595277777799,1;42.221472222222197,-87.951805555555595,1;29.1774758333333,-82.226344999999995,1;33.240641388888903,-117.417711666667,1;41.590213611111103,-109.01531305555601,1;34.695872777777801,-83.297661111111097,1;36.373783611111101,-97.788110555555505,1;43.912380833333302,-91.467614444444493,1;57.775024166666697,-152.33978416666699,1;37.324183333333302,-79.978979166666704,1;42.479583333333302,-122.912972222222,1;41.9879258333333,-97.434578888888893,1;41.224096111111102,-112.098242777778,1;20.90645,-156.42096388888899,1;38.840647222222202,-94.736762222222197,1;40.527788611111099,-86.058017777777806,0;35.6930972222222,-95.865979444444406,1;33.239560555555599,-87.249998333333295,1;41.246907499999999,-85.497397222222205,0;46.971638888888897,-122.901833333333,1;31.414958055555601,-110.848891111111,1;41.450039166666699,-97.340818611111104,1;64.485097777777796,-165.25315583333301,1;29.303252499999999,-81.112696666666693,1;42.470503055555596,-98.686921666666706,1;34.3388880555556,-106.82045833333299,1;44.575367777777799,-124.060618333333,1;39.636026388888901,-75.303027499999999,1;39.143824444444398,-86.6130272222222,1;41.987673333333298,-87.904886111111097,1;36.891897222222198,-76.200326388888897,1;28.542722777777801,-81.335015277777799,1;62.947167222222198,-141.91274777777801,1;41.556401399999999,-71.999361399999998,1;43.990428333333298,-88.555946944444401,1;37.392499444444397,-122.281299444444,1;37.157511111111099,-95.203633611111101,1;34.223861100000001,-88.797333300000005,1;43.646916666666698,-95.581944444444403,1;43.415506666666701,-124.168470833333,1;30.780444166666701,-83.279728888888897,1;41.029126388888898,-92.325905277777807,1;35.072243055555603,-105.936042777778,1;38.705866666666701,-76.744745277777795,0;66.8856686111111,-162.539938888889,1;41.1672761111111,-95.736729444444506,1;37.743553611111103,-87.165938888888903,1;41.322041666666699,-86.649292777777802,1;47.919833333333301,-122.27783333333301,1;34.246764166666701,-91.926192222222198,1;26.680051666666699,-80.086500277777802,1;30.561162777777799,-89.730511111111099,1;33.875630555555603,-84.298812499999997,1;45.698419444444397,-118.93870361111099,1;33.918336944444398,-117.52999722222199,1;31.469299444444399,-103.574760555556,1;36.746506666666697,-97.160123611111104,1;36.931044444444403,-111.44744277777799,1;34.680455555555596,-94.609002222222202,1;35.6247119444444,-113.54446666666701,1;32.610337777777801,-116.97907916666701,1;26.7827330555556,-80.691446111111105,1;44.058265833333301,-101.664143888889,1;40.6800652777778,-89.792800555555601,1;27.907764166666698,-82.684309166666694,1;42.870383888888902,-112.652235,1;32.529202222222203,-105.305240833333,1;44.394510555555598,-100.16287722222199,1;46.898153611111098,-95.070882777777797,1;34.101972777777803,-114.682066388889,1;44.684949166666698,-73.5226772222222,0;41.965641666666698,-89.5242202777778,1;45.630622777777802,-84.6640716666667,1;34.631404444444399,-118.063820833333,1;42.465475555555599,-86.105862777777801,1;40.082082777777799,-75.009530833333301,0;35.2350722222222,-101.699022222222,1;45.329199722222199,-67.704201666666705,0;40.8212005555555,-88.733509166666707,1;34.078375555555603,-117.787073611111,1;46.774185555555597,-68.0945416666667,1;35.672469444444403,-120.627111944444,1;33.542378611111097,-95.448290277777801,1;40.916254722222199,-77.992719166666703,1;46.2629961111111,-119.11570500000001,1;17.992455,-66.519174444444403,1;42.700251666666702,-83.532692777777797,0;37.087705,-80.712900555555507,1;43.084462500000001,-70.831986666666694,1;33.870016111111099,-116.42976166666701,1;28.764405833333299,-96.3061627777778,1;40.222266666666698,-75.560266388888905,1;38.294251666666703,-104.429441666667,1;39.603187222222203,-110.75351861111101,1;41.955458888888899,-71.844098611111093,1;46.674300833333298,-117.223504722222,1;41.724344166666697,-71.429638611111102,1;40.214936388888901,-111.72131944444401,0;34.086192777777804,-101.790186944444,1;35.532944722222197,-97.647180833333294,1;40.200352777777802,-96.206281111111096,1;41.769771388888898,-73.600551388888903,1;36.715458611111103,-120.77868361111101,1;33.433020555555601,-111.970198888889,1;38.287848611111102,-76.400226111111095,0;37.928319999999999,-87.762382777777802,1;38.079756666666697,-122.8678275,1;31.655226944444401,-84.2931058333333,1;33.952034722222201,-117.449203888889,1;43.976032222222202,-103.0123375,1;40.553378888888901,-76.599377222222202,1;39.850833333333298,-95.423055555555607,0;43.235254722222201,-123.358017777778,1;40.098905555555604,-122.236355555556,1;40.581701388888902,-88.164267777777795,1;40.202388611111097,-74.495013333333304,1;40.504568333333303,-122.29172722222199,1;35.872521111111098,-78.783342222222203,1;40.5464591666667,-78.7470225,1;42.590548611111103,-117.86815194444399,1;42.225583333333297,-89.199277777777795,1;45.633761111111099,-89.457771388888901,1;37.502349166666697,-77.320276944444402,1;39.755021111111098,-84.8388475,1;39.528322199999998,-107.7196194,1;39.120388611111103,-94.596593055555601,0;43.065736944444403,-108.455523888889,1;42.466330555555601,-75.2392280555556,1;40.002641666666698,-106.4424875,1;43.964123333333298,-107.95084305555601,1;34.162568333333297,-85.119420833333294,1;37.975316111111098,-80.806521111111095,0;37.343433333333302,-80.070454444444493,1;43.120741111111101,-77.673601666666698,1;40.287795000000003,-84.043142777777803,1;36.1403781,-120.66491859999999,0;48.854704722222202,-95.694983055555596,1;30.0875194444444,-90.588619444444404,1;34.797117499999999,-86.633883611111102,1;31.284423611111102,-85.431239444444401,1;30.014597500000001,-100.299860833333,1;36.748392799999998,-108.09889920000001,1;43.782851388888901,-92.596927222222206,1;26.529875000000001,-81.775767500000001,1;43.526605555555598,-72.950669444444401,0;44.4672366666667,-95.128330277777806,1;36.246424166666699,-94.121388888888902,1;45.820444444444398,-92.3745277777778,0;34.509523611111099,-119.771001388889,1;38.443658611111097,-121.55162277777799,1;35.540540277777801,-106.064948055556,1;38.485188055555597,-88.085806388888898,1;29.644031666666699,-98.461314444444497,1;37.855334166666701,-122.522752222222,1;32.160554166666699,-81.1125052777778,1;46.358924999999999,-87.397216666666694,1;41.067513611111103,-74.538325,1;29.6867197222222,-94.0379786111111,1;40.583019166666702,-74.741744999999995,1;36.675026944444397,-79.014512499999995,1;38.345006388888898,-75.510587777777801,1;70.199199166666702,-148.41615944444399,1;41.407055555555601,-118.034722222222,1;35.215457499999999,-79.587951944444399,1;47.435388888888902,-122.309611111111,1;40.7908344444444,-76.884028333333305,1;41.167436666666703,-71.576083333333301,1;41.695293333333296,-77.419867499999995,1;31.748115833333301,-105.08681,1;37.619482222222203,-122.37389111111101,1;38.179361944444402,-122.373141388889,1;37.3559613888889,-93.334052222222198,1;39.836541388888897,-83.844956666666704,1;39.632545833333303,-85.824313055555606,1;44.8422655555555,-107.061073611111,1;38.0406186111111,-92.602404166666702,1;39.095502500000002,-74.800332777777797,1;37.374718333333298,-121.944651666667,1;30.72598,-88.359293888888899,1;34.424036666666701,-109.14352,1;31.374951388888899,-100.454874166667,1;18.4462830555556,-65.9895069444444,1;41.4344663888889,-82.654818055555594,1;33.783298055555598,-118.054755,1;44.384560277777801,-74.2045055555555,0;38.925138888888902,-97.621361111111099,1;33.198641111111101,-95.542592499999998,1;41.512759444444399,-77.970109722222205,1;34.010260555555597,-118.456718055556,1;36.663829166666702,-121.603185,1;41.0966666666667,-102.983,1;21.900392499999999,-159.52887305555601,1;35.7900991666667,-83.052369166666693,1;35.033648611111097,-81.927049166666706,1;39.839731899999997,-89.677730800000006,1;33.987267500000002,-98.593500277777807,1;43.162163611111097,-95.200996944444398,1;61.098479722222201,-155.63450694444401,1;33.4638611111111,-90.277333333333303,1;27.3977652777778,-82.554263888888897,1;29.2583791666667,-98.443475833333295,1;31.0505180555556,-81.4459647222222,1;46.412048055555601,-84.314897777777801,1;32.269244999999998,-109.2630875,1;58.177660833333299,-135.25886194444399,1;44.543246388888903,-89.530562222222201,0;39.960577499999999,-94.925220277777797,1;38.860688888888902,-90.482368055555597,1;38.508188611111102,-122.810601388889,1;18.3558183333333,-65.024559999999994,1;30.206759444444401,-98.705755277777797,1;40.995819722222201,-74.869019166666703,1;35.4065063888889,-82.268614166666694,1;42.344520277777796,-96.323638611111093,1;32.637685277777798,-108.161067222222,1;42.408868611111103,-83.594188055555506,1;31.973194444444399,-92.677088888888903,1;38.056593333333304,-75.463921944444493,1;36.224269999999997,-97.08126,1;39.180322777777803,-120.26961222222199,1;33.375055833333299,-118.419909722222,1;35.483961388888901,-86.465271666666695,1;35.345161388888897,-99.635347777777795,0;43.160527777777801,-76.204565277777803,1;30.556227222222201,-84.3739611111111,1;65.177143888888907,-152.177555277778,1;36.608768888888903,-105.90632027777799,1;30.504637777777798,-82.552903333333305,1;36.1213119444444,-111.269587777778,1;29.6643222222222,-90.829093055555504,1;37.258657499999998,-103.600055833333,1;35.182139166666701,-103.598518055556,1;40.850250277777803,-111.98191250000001,1;33.2825027777778,-107.280542222222,1;33.575146666666697,-86.042642499999999,0;41.713031944444403,-79.417270555555604,0;40.8487222222222,-74.062250000000006,1;61.167866099999998,-149.9601414,1;32.8858597222222,-111.90871777777799,1;32.484583333333298,-85.669313888888894,1;39.933228055555603,-77.950944444444403,1;28.505269722222199,-98.151117499999998,1;62.2986583333333,-150.105590833333,1;39.806408611111102,-98.260036666666707,1;34.112236666666703,-115.769906944444,1;41.783822499999999,-93.108977499999995,1;30.2885183333333,-96.058231111111098,1;40.735115833333303,-78.331294444444396,1;39.13711,-95.549116111111104,1;48.299899166666698,-124.62704333333301,1;38.739158888888902,-89.918627499999999,1;38.030656666666701,-117.03351833333301,1;31.209335833333299,-97.424966944444407,0;32.235743055555602,-99.816782777777803,1;33.628093611111098,-116.16019,1;42.558771399999998,-103.3121464,1;35.9130638888889,-119.02082305555599,1;39.488954999999997,-87.249017222222193,1;32.869160277777802,-97.040503333333305,1;36.196291388888902,-95.788096944444405,1;32.095204722222199,-110.91485638888901,1;-14.332138888888901,-170.71950000000001,1;44.667918611111098,-85.549958611111094,1;48.069328888888897,-96.186454722222194,1;40.458036944444402,-82.126846388888893,1;42.479856666666699,-114.489453888889,1;39.698317500000002,-103.21493861111099,1;33.513881111111097,-94.073242222222206,1;34.4951155555556,-102.839671388889,1;35.976754166666701,-77.703751388888904,1;32.355867777777803,-95.403466111111101,1;45.353228333333298,-122.978156944444,1;43.026514166666701,-75.164521944444402,1;32.880402777777803,-95.366753888888894,1;39.847918888888898,-91.278849722222205,1;34.575044444444401,-90.674400000000006,1;43.280086388888897,-91.537364166666706,1;33.535886111111097,-97.821277777777794,1;63.692311111111103,-170.47002555555599,1;42.094268611111097,-77.024855555555504,1;63.891944444444398,-160.684333333333,1;13.454555555555601,-144.733305555556,1;20.2005411111111,-155.84326666666701,1;33.944186111111101,-96.391836111111104,1;33.474829999999997,-80.448642777777806,1;39.537671111111102,-74.967143888888899,1;28.900318333333299,-96.978934722222206,1;40.379036388888899,-109.493302222222,1;39.814722222222201,-86.367577499999996,1;38.154071944444397,-91.706771944444498,1;36.367327222222201,-119.482158888889,1;25.751900555555601,-80.154443055555603,1;39.093683333333303,-89.162462500000004,1;32.2134427777778,-83.4972563888889,1;38.361965277777799,-88.807282499999999,0;34.223460000000003,-118.491666388889,1;30.212994722222199,-81.890895277777801,1;27.678419999999999,-80.489608888888895,1;34.115059166666697,-119.049492777778,1;29.2693344444444,-94.867725277777794,1;33.670187222222197,-86.899799999999999,1;41.451468888888897,-83.638656388888904,1;35.904833611111101,-83.894709166666701,1;66.599961944444402,-159.99158555555599,1;39.526795,-82.977750555555602,1;59.510827777777799,-139.64813111111101,1;46.570266111111103,-120.44461777777801,1;42.918374722222197,-97.384977222222204,1;41.3310213888889,-80.674656388888906,1;38.644133055555599,-82.978339444444401,1;25.704166666666701,-79.294444444444494,1;34.965753333333303,-109.154509444444,1;39.940874999999998,-81.892605277777804,1";
var arrData = strData.split(";",-1);
for (var i=0; i<arrData.length; i++){
var strFields = arrData[i].split(",",-1);
var LAT = parseFloat(strFields[0]);
var LON = parseFloat(strFields[1]);
var MON = parseInt(strFields[2],10);
viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(LON, LAT, 0.0),
ellipsoid: {
radii: new Cesium.CallbackProperty(getSize, false),
material: new Cesium.ColorMaterialProperty(new Cesium.CallbackProperty(getColor(MON), false)),
show: new Cesium.CallbackProperty(getVisibility(MON), false),
subdivisions: new Cesium.CallbackProperty(getSubdivisions, false),
stackPartitions: new Cesium.CallbackProperty(getPartitions, false),
slicePartitions: new Cesium.CallbackProperty(getPartitions, false)
},
MON: MON
});
}
Sandcastle.addToolbarMenu([
{
text : 'Current',
onselect : function() {
VORMODE = 1;
}
},
{
text : 'MON',
onselect : function() {
VORMODE = 2;
}
},
{
text : 'Discontinued',
onselect : function() {
VORMODE = 3;
}
},
{
text : 'MON & Discontinued',
onselect : function() {
VORMODE = 4;
}
},
{
text : 'Clear',
onselect : function() {
VORMODE = 5;
}
}
]);