Select to view content in your preferred language

how do i set the elevationsources for a surface

1104
2
Jump to solution
03-21-2017 07:46 AM
MarkCammarere
Occasional Contributor

I'm developing with the ArcGIS Runtime (v100.0) for .NET. The description of the ElevationsSources property for a Surface states that it can be used to get or set the collection of elevation sources in a surface. However, when I try to use the property, it is apparently read only. So, how do I go about setting the elevation sources for a surface? Any insight will be much appreciated. Thanks!

0 Kudos
1 Solution

Accepted Solutions
MarkCammarere
Occasional Contributor

Thanks Greg!

Regards,

Mark

View solution in original post

0 Kudos
2 Replies
GregDeStigter
Esri Contributor

The Surface.ElevationSources property is backed by a collection that is maintained by the API. This collection gets created when the Surface is created and you may safely assume that it will always be there. So to add an ElevationSource you add it to the existing collection.

var surface = new Surface() { Name = "Elevation Surface" };
var elevationSource = new ArcGISTiledElevationSource(elevationUri) { Name = "Test"};
surface.ElevationSources.Add(elevationSource);
0 Kudos
MarkCammarere
Occasional Contributor

Thanks Greg!

Regards,

Mark

0 Kudos