Book Image

Learning ArcGIS Runtime SDK for .NET

By : Ron Vincent
Book Image

Learning ArcGIS Runtime SDK for .NET

By: Ron Vincent

Overview of this book

ArcGIS is a geographic information system (GIS) that enables you to work with maps and geographic information. It can be used to create and utilize maps, compile geographic data, analyze mapped information, share and discover geographic information and manage geographic information in a database. This book starts by showing you where ArcGIS Runtime fits within Esri’s overall platform strategy. You'll create an initial map using the SDK, then use it to get an understanding of the MVVM model. You'll find out about the different kinds of layers and start adding layers, and you'll learn to transform maps into a 3D scene. The next chapters will help you comprehend and extract information contained in the maps using co-ordinates and layer objects. Towards the end, you will learn to set the symbology, decide whether to use 2D or 3D, see how to implement 2D or 3D, and learn to search and find objects. You'll also get to grips with many other standard features of the Application Programming Interface (API), including create applications and finally testing, licensing, and deploying them. Once completed, you will be able to meet most of the common requirements of any mapping application for desktop or mobile platforms.
Table of Contents (19 chapters)
Learning ArcGIS Runtime SDK for .NET
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
3
Maps and Layers
12
Configuring, Licensing, and Deploying
Index

Adding the 3D content


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:

  1. In the same app, add the following code to the MainViewModel class after the USA 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);
  2. 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:

  1. Add using statements to Esri.ArcGISRuntime.Symbology.SceneSymbology and Windows.Media.Colors in the MainViewModel.cs file. Add the following code to a method in your ViewModel class, and then call the method from the anonymous messenger code:

    private void DrawSphere()
    {
        // create a new point (MapPoint); pass x,...