Given when creating a scene, we cannot remove the ‘Ground’ elevation surface, how can we create a new scene without an elevation source? While we can change the default behavior through the project settings, we cannot change project settings through code. (It seems you can change custom settings only)
Solved! Go to Solution.
yes, u are right. thanks for this requirement. we will add this to the public api
meanwhile, u can delete ground after the scene has been created using map.GetGroundElevationSurface() followed by map.RemoveElevationSurface(ground)
A followup,
map.RemoveElevationSurface will throw an InvalidOperationException if you try to remove the ground surface.
The following code should be used to remove the elevation sources from the ground surface.
var ges = map.GetGroundElevationSurface();
ges.BaseSources = null;
map.SetElevationSurface(ges);
yes, u are right. thanks for this requirement. we will add this to the public api
meanwhile, u can delete ground after the scene has been created using map.GetGroundElevationSurface() followed by map.RemoveElevationSurface(ground)
A followup,
map.RemoveElevationSurface will throw an InvalidOperationException if you try to remove the ground surface.
The following code should be used to remove the elevation sources from the ground surface.
var ges = map.GetGroundElevationSurface();
ges.BaseSources = null;
map.SetElevationSurface(ges);