MapControl (Windows Forms) Class
Represents a Windows Forms UI control that displays a View.
NuGet/Assembly: Carmenta.Engine.5.17.0.nupkg (in the CEForms assembly)
Syntax
public class MapControl : System.Windows.Forms.UserControl,
IMapControl
Remarks
A Carmenta Engine MapControl is used to integrate a map view into the GUI of an application. Carmenta Engine provides several different MapControl classes, for different API:s and GUI platforms; for a complete list see MapControl classes in Carmenta Engine.
This control uses the Windows Forms framework, and inherits from System.Windows.Forms.UserControl, see Microsoft Developer Network article for more information.
The default behavior of the MapControl (Windows Forms) is to re-throw exceptions that occur when it calls into the Carmenta Engine kernel. You can provide a handler for the IMapControl.Error event if you want to suppress this behavior, for example if you want to send the errors to an application log or display a custom error dialog.
Limitations
The 64-bit version of the MapControl (Windows Forms) cannot be loaded and used in the Visual Studio designer, in Visual Studio 2019 and earlier, because Visual Studio runs as a 32-bit process. As an alternative, you can instantiate and initialize a MapControl (Windows Forms) at runtime instead, for example when the form that should contain the MapControl (Windows Forms) is being initialized. The Basic Map Application Tutorial shows how this can be done in a Windows Forms application.
Inheritance Hierarchy
System.Windows.Forms.UserControl
MapControl (Windows Forms)
Platforms
Windows
MapControl (Windows Forms) Members
The MapControl (Windows Forms) type has the following members.
Constructors
Name | Description |
---|---|
MapControl | Initializes a new instance of the MapControl (Windows Forms) class. |
Properties
Name | Description |
---|---|
IMapControl.GuiDelayMinimum | The minimum amount of time in milliseconds that needs to pass between an update ending and another one starting. Inherited from IMapControl |
IMapControl.GuiDelayPercentage | The percentage of the previous update time used to delay the next update. Inherited from IMapControl |
IMapControl.IsConnected | Gets a value that tells whether the MapControl (Windows Forms) implementation is connected to a View. Inherited from IMapControl |
Gets a value that tells whether the current platform supports touch input. | |
IMapControl.Tool | Gets or sets the ITool that is used by the MapControl (Windows Forms) implementation. Inherited from IMapControl |
IMapControl.ToolTimerInterval | The interval used by the MapControl (Windows Forms) implementation to update tools. Inherited from IMapControl |
IMapControl.TouchTool | Gets or sets the ITouchTool that is used by the MapControl (Windows Forms) implementation. Inherited from IMapControl |
IMapControl.UpdateInterval | The update interval used by the MapControl implementation. Inherited from IMapControl |
IMapControl.UpdateMode | Gets or sets the update mode used by the MapControl (Windows Forms) implementation. Inherited from IMapControl |
IMapControl.View | Gets or sets the View that is displayed by the MapControl implementation. Inherited from IMapControl |
IMapControl.ViewOwnership | Gets or sets a value that determines whether the MapControl instance or application owns the View. Inherited from IMapControl |
Methods
Name | Description |
---|---|
SetCustomCursor | Replaces one of the predefined mouse cursors with a custom cursor. |
IMapControl.UpdateView | Overloaded. Updates the map presentation. Inherited from IMapControl |