O'Reilly logo

Learning ArcGIS Runtime SDK for .NET by Ron Vincent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Online searching

In this section, we'll go over searching content from online layers.

FindTask

In Chapter 1, Introduction to ArcGIS Runtime, we were introduced to a tool that searched through several layers using a FindTask constructor. We didn't really discuss how it worked, but we made some changes to it and just enjoyed when it searched through several layers. Let's go over that code in more detail. Here's the code again:

var findTask = new FindTask(new System.Uri(this.USAUri)); var findParameters = new FindParameters(); findParameters.LayerIDs.Add(0); // Cities findParameters.LayerIDs.Add(3); // Counties findParameters.LayerIDs.Add(2); // States findParameters.SearchFields.Add("name"); findParameters.SearchFields.Add("areaname"); findParameters.SearchFields.Add("state_name"); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required