Selection extension

Description

This sample demonstrates how to modify the map page by adding a menu item. When this menu item is selected, this extension pushes a context menu onto the map page, so that the map page takes on a different UI. This UI allows you to select features and perform specific actions on them. You can cancel by pressing the left soft key to get back to the default map context menu.

Products: ArcGIS Mobile

Platforms: Windows Mobile 5/6

Requires: Visual Studio 2008 with SP1, .NET Compact Framework 2.0 SP2

How to use

  1. Open the project within Visual Studio 2008. Learn how to set up your development machine.
  2. Before you compile the project, open the SelectionExtension.cs file and replace the Road Signs string with a layer name from your mobile project. This is the layer that the Selection extension will select features from.
  3. Compile the project and deploy the assembly to your mobile device or emulator. Read more information about deployment.
  4. Build and deploy the Mobile Project assembly file (comes with the sample project) to the <ArcGIS Mobile installation path>\bin\Extensions folder on your desktop where you will author your mobile project with the Mobile Project Center application.
  5. In Mobile Project Center, add the extension to your project on the Capabilities tab.
  6. Deploy your mobile project to your Windows Mobile device or emulator. Get more details on deployment.
  7. Start the out-of-the-box Mobile Application.
  8. Tap to open the mobile project.
  9. On the Select Task page, tap the View Map task.
  10. On the View Map page, tap the right soft menu. A new menu item, Selection Mode, is at the top.
  11. Tap Selection Mode. The map page displays a different set of UI elements, as defined by the customized MapPageContext. By default, the active map action is SelectionMapAction, allowing you to select features.
  12. Select features, and from the right soft menu, view operations you can perform on them.
  13. Try viewing and editing attributes for selected features or adding them to the work list.

Where to get the sample

The sample is available for download.


9/20/2011