Maptoolstripbuttons – Pitney Bowes MapXtreme User Manual

Page 129

Advertising
background image

Chapter 7: Desktop Applications, Controls, Dialogs, and Tools

Key Controls to Use in Desktop Applications

MapXtreme v7.1

129

Developer Guide

A Form showing a MapControl, a Layer Control, and a MapToolBar

The MapControl also has several properties relating to the loaded map that can be preset so that the
map shown at run time is further customized for the specific application. Properties that can be
modified include zoom level, coordinate system, map center, and settings for three mouse buttons
during run time. The mouse buttons can be set to Zoom, Pan, Draw geometries, Select, or any of
several other map tools. See

Overview of the MapInfo.Tools Namespace

.

You can also set a design time tool to further manipulate the map while working in Visual Studio.
Design time functionality includes Zoom In, Zoom Out, Select, Pan, Center, and the default arrow.
Clear Map from the context menu removes all layers from the MapControl’s map and closes the
corresponding tables (if they are not in use in another MapControl).

MapToolStripButtons

MapXtreme provides ready-to-use map tools in its Windows Form templates and in the Visual Studio
designer toolbox. Tools are added to the form by adding a ToolStripButton to a .NET ToolStrip.

The properties for each tool is set on the button. The MapToolBar, which had been responsible for
managing the current tool is no longer required. The MapToolBar has been retained for backward
compatibility and future use if you choose. It is still provided in the Visual Studio toolbox.

The 22 ToolStripButtons include the same mapping activities that have always been available in the
MapToolBar, including navigation, selections, adding features, labeling, opening tables and
displaying a layer control.

Advertising