Now that we have a virtual globe, it would be great to add some content so that we can make the globe useful. Let's add data from one of the more popular formats, called KML:
In the same app, add the following code to the
MainViewModel
class after theUSA
layer:Uri kml = new Uri("http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/1.0_week_age_link.kml"); KmlLayer kmlLayer = new KmlLayer(kml); kmlLayer.ID = "Earthquakes"; kmlLayer.InitializeAsync(); this.sceneView.Scene.Layers.Add(kmlLayer);
Run the app, and you should see recent earthquakes around the world along with a legend.
Now that we've added a KML layer, let's add a simple graphic to the map too:
Add
using
statements toEsri.ArcGISRuntime.Symbology.SceneSymbology
andWindows.Media.Colors
in theMainViewModel.cs
file. Add the following code to a method in yourViewModel
class, and then call the method from the anonymous messenger code:private void DrawSphere() { // create a new point (MapPoint); pass x,...