@@ -78,6 +78,8 @@ var addLayerViewModel = {
78
78
url : "" ,
79
79
name : "" ,
80
80
layerDataType : "" ,
81
+ layerProxy : false ,
82
+ layerClampToGround : true ,
81
83
gltfVersion : "" ,
82
84
thematicDataUrl : "" ,
83
85
thematicDataSource : "" ,
@@ -287,6 +289,8 @@ function observeActiveLayer() {
287
289
addLayerViewModel . url = selectedLayer . url ;
288
290
addLayerViewModel . name = selectedLayer . name ;
289
291
addLayerViewModel . layerDataType = selectedLayer . layerDataType ;
292
+ addLayerViewModel . layerProxy = selectedLayer . layerProxy ;
293
+ addLayerViewModel . layerClampToGround = selectedLayer . layerClampToGround ;
290
294
addLayerViewModel . gltfVersion = selectedLayer . gltfVersion ;
291
295
addLayerViewModel . thematicDataUrl = selectedLayer . thematicDataUrl ;
292
296
addLayerViewModel . thematicDataSource = selectedLayer . thematicDataSource ;
@@ -391,6 +395,8 @@ function getLayersFromUrl() {
391
395
url : layerConfig . url ,
392
396
name : layerConfig . name ,
393
397
layerDataType : Cesium . defaultValue ( layerConfig . layerDataType , "COLLADA/KML/glTF" ) ,
398
+ layerProxy : Cesium . defined ( layerConfig . layerProxy ) ? layerConfig . layerProxy === "true" : false ,
399
+ layerClampToGround : Cesium . defined ( layerConfig . layerProxy ) ? layerConfig . layerClampToGround === "true" : true ,
394
400
gltfVersion : Cesium . defaultValue ( layerConfig . gltfVersion , "2.0" ) ,
395
401
thematicDataUrl : Cesium . defaultValue ( layerConfig . spreadsheetUrl , "" ) ,
396
402
thematicDataSource : Cesium . defaultValue ( layerConfig . thematicDataSource , "GoogleSheets" ) ,
@@ -476,6 +482,8 @@ function saveLayerSettings() {
476
482
applySaving ( 'url' , activeLayer ) ;
477
483
applySaving ( 'name' , activeLayer ) ;
478
484
applySaving ( 'layerDataType' , activeLayer ) ;
485
+ applySaving ( 'layerProxy' , activeLayer ) ;
486
+ applySaving ( 'layerClampToGround' , activeLayer ) ;
479
487
applySaving ( 'gltfVersion' , activeLayer ) ;
480
488
applySaving ( 'thematicDataUrl' , activeLayer ) ;
481
489
applySaving ( 'thematicDataSource' , activeLayer ) ;
@@ -824,6 +832,8 @@ function layersToQuery() {
824
832
url : layer . url ,
825
833
name : layer . name ,
826
834
layerDataType : layer . layerDataType ,
835
+ layerProxy : layer . layerProxy ,
836
+ layerClampToGround : layer . layerClampToGround ,
827
837
gltfVersion : layer . gltfVersion ,
828
838
active : layer . active ,
829
839
spreadsheetUrl : layer . thematicDataUrl ,
@@ -1014,6 +1024,8 @@ function addNewLayer() {
1014
1024
url : addLayerViewModel . url . trim ( ) ,
1015
1025
name : addLayerViewModel . name . trim ( ) ,
1016
1026
layerDataType : addLayerViewModel . layerDataType . trim ( ) ,
1027
+ layerProxy : ( addLayerViewModel . layerProxy . trim ( ) === "true" ) ,
1028
+ layerClampToGround : ( addLayerViewModel . layerClampToGround . trim ( ) === "true" ) ,
1017
1029
gltfVersion : addLayerViewModel . gltfVersion . trim ( ) ,
1018
1030
thematicDataUrl : addLayerViewModel . thematicDataUrl . trim ( ) ,
1019
1031
thematicDataSource : addLayerViewModel . thematicDataSource . trim ( ) ,
@@ -1321,8 +1333,10 @@ function layerDataTypeDropdownOnchange() {
1321
1333
var layerDataTypeDropdown = document . getElementById ( "layerDataTypeDropdown" ) ;
1322
1334
if ( layerDataTypeDropdown . options [ layerDataTypeDropdown . selectedIndex ] . value !== "COLLADA/KML/glTF" ) {
1323
1335
document . getElementById ( "gltfVersionDropdownRow" ) . style . display = "none" ;
1336
+ document . getElementById ( "layerProxyAndClampToGround" ) . style . display = "none" ;
1324
1337
} else {
1325
1338
document . getElementById ( "gltfVersionDropdownRow" ) . style . display = "" ;
1339
+ document . getElementById ( "layerProxyAndClampToGround" ) . style . display = "" ;
1326
1340
}
1327
1341
addLayerViewModel [ "layerDataType" ] = layerDataTypeDropdown . options [ layerDataTypeDropdown . selectedIndex ] . value ;
1328
1342
}
0 commit comments