Overview of the ArcGIS Runtime SDK for Windows Mobile controls

The controls are introduced here with a brief overview, to illustrate the key components of the SDK, and show the concepts used in developing a mobile solution. There is more detailed help and sample code for the controls to aid with your development in this system organized by tasks or functionality.

Map

A map is a container for all spatial information that you display, query, and edit on your mobile device. The way you display maps in your mobile application is to use the Map control. The Map control is a Microsoft Visual Studio .NET component that you can drag from the toolbox onto a form when designing your application. The map has a number of properties, methods, and events that control how you display maps on the device. The Map control displays geographic data from a local MapCache that obtains its data from a published mobile map service or extracted by using a GP tool. Layer properties such as visibility, symbology, and scale thresholds default to their values in the published map; although, some of these can be changed at runtime. To use the control, drag it on to a form within your project. A MapCache component is also needed if it does not already exist. A number of other Mobile SDK controls can enhance the user experience with the map, such as the Scale Bar and GPS Display controls.

The MapAction property on the Map control allows you to specify the current map action or tool, such as Pan, Zoom In, Zoom Out, Selection, and so on. To detach a map action from the map, set the MapAction property to null.

The map object contains several properties related to the map extent. You can get the current map extent, the full extent of the map that you created and published, the rotated extent, and the extent of the current view using the Extent, FullExtent, RotatedExtent, and ViewExtent properties. You can use the Invalidate method or the Refresh method to refresh the display on the Map control. Refresh redraws the current extent while Invalidate redraws the client area where the change occurred (and therefore is recommended).

A map contains a collection of map layers. You can use the MapLayers property to receive and alter properties such as scale, extent, visibility, transparency, and labeling information for a given layer. Map layers only renderi the layer's content on the Map control and does not impact the map schema, storage, or cached layer representation. In addition to the map layers, you can sketch or redline graphics on top of the map using GDI directly, or by using the Display object and the MapPaintEventArgs.

The Map control, in addition to its properties and methods, has a number of events you can use to perform different functions. For example, you can use the Paint event to draw graphics on top of the map or the LayersDrawingStarted and LayersDrawingCompleted events to monitor the starting and stopping of drawing on the map display.

MobileCache

A MobileCache represents the map data's storage on local devices from a mobile service or extracted from a GP tool. For normal applications, a MobileCache is needed to work with the Map control for data visualization or editing in your application. The local storage of data in the MobileCache is what allows mobile applications to work in a disconnected environment. It is possible to have headless applications where you have a mobile cache but no map.

MobileServiceConnection

A MobileServiceConnection is a fundamental component in all mobile applications that require data communication with the server. It represents the data communication mechanism used to send and retrieve data from a published mobile map service to the local storage.

MapActions

MapActions are used to provide the interaction between the user and the Map control. Map actions are instantiated individually and made active by assigning it to the map's MapAction property.

GPSDisplay

The GPSDisplay component displays a GPS location on a map control from coordinates obtained via a GPS Serial Port or File Connection. See also Developing with GPS data and devices for more information on this component.

FileGpsConnection and SerialPortGpsConnection

These components manage a connection to a serial port with a GPS device or a file containing GPS sentences. The component properties set attributes such as the COM port, baud rate for the serial connection, and file name for the file connection. Once the GPS connection is opened, GPS attributes can be obtained via the GpsEventArgs class on the GpsChanged event.

ScaleBar

The ScaleBar control adds a basic scale bar to the map display. ScaleBar properties such as text, color, units, ScaleBar position, and so on are set using the corresponding properties.

Additionally, the ScaleBar can show the status of information coming from an ArcGIS Server connection. When the application is retrieving information from ArcGIS Server, a progress bar displays within the ScaleBar indicating to the user that the map is still receiving information.

The ScaleBar displays on the map at the position determined by the DisplayPosition property. The default units are set to US Customary (miles, yards, feet, and inches) but can be changed to Metric via the UnitSystem property. The scale threshold at which the units change is fixed.

To display the progress bar within the ScaleBar, set the ShowProgress property to true.

1/7/2015