Book Image

ArcGIS By Example

By : Hussein Nasser
Book Image

ArcGIS By Example

By: Hussein Nasser

Overview of this book

Table of Contents (17 chapters)
ArcGIS By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Finding restaurants in a subtype


We have populated the subtypes of the restaurants in the Category drop-down list. In this section, we will learn how to query the feature class and filter, so we only display restaurants of particular category. For instance, if the user selects Cafe from the Category list, only cafes will be populated in the venues list.

Follow these steps to add the query:

  1. If necessary, open Visual Studio Express in administrator mode; we need to do this since our project is actually writing to the registry this time, so it needs administrator permissions. To do that, right-click on Visual Studio and click on Run as administrator.

  2. Go to File, then click on Open Project, browse to the Bestaurants project from the C:\ArcGISByExample\bestaurants\Code, and click on Open.

  3. Right-click on frmRestaurantsViewer.vb and click on View Designer to view the form designer.

  4. We want to write logic to populate the venues when the user selects a new category that is on cmbCategory_SelectedIndexChanged...