Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Collapse]Map Control
   [Expand]Getting Started
    Layers
   [Expand]Coordinate Systems
   [Expand]Map Image Data
   [Expand]GIS Data
   [Expand]Vector Data
   [Expand]Visual Elements
   [Expand]Examples
   [Collapse]End-User Features
     Scrolling
     Zooming
     Selection
     Search Panel
     Map Editor
     Mini Map
     Printing and Exporting
   [Expand]Product Information
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Map Editor

The Map Editor is a built-in tool that allows your end-users to create and modify map items. End users can also rotate map items and resize them using the sizing and rotation handles, and relocate items on the map surface. The Map Editor's active mode determines which actions a user can perform while editing the map. You can use the corresponding editor panel's buttons to switch between the Default, Transform, Edit and Create modes.

Expanded Map Editor's Panel

You can set the MapEditor.ShowEditorPanel property to true at design time using the Properties window to display the Map Editor's panel.

Use the code below to show the Editor's panel at runtime:

The following table lists the API members that allows you to manage the Map Editor's basic settings:

Member Description
MapControl.MapEditor Returns the Map Editor to configure its options.
MapEditor The Map Editor that allows end users to edit map vector items.
MapEditor.ShowEditorPanel Specifies whether the map editor's panel is displayed.
VectorItemsLayer.AllowEditItems Gets or sets the value specifying whether the map vector layer's items can be edited.

The Map Editor's panel consists of elements that allow you to perform Undo/Redo actions and switch between the editor's modes:

  • "Undo" - Cancels the last action.
  • "Redo" - Repeats the last cancelled action.
  • "Default" - Enables the Default mode.
  • "Transform" - Activates the Transform mode.
  • "Edit" - Turns on the Edit mode.
  • "Add Pushpin" - Enables "Create Pushpin" mode to create MapPushpin items.
  • "Add Path" - Enables "Create Path" mode to create MapPath items.
  • "Add Polyline" - Activates "Create Polyline" mode to create MapPolyline items.
  • "Add Dot" - Enables "Create Dot" mode to create MapDot items.
  • "Add Ellipse" - Enables "Create Ellipse" mode to create MapEllipse items.
  • "Add Rectangle" - Turns on "Create Rectangle" mode to create MapRectangle items.
  • "Add Line" - Enables "Create Line" mode to create MapLine items.

Expanded Map Editor's Modes

The Map editor's modes define the actions a user can perform when editing the map. The Map Editor supports the following modes:

  • The Default Mode

  • You can only navigate on the map when the Default mode is enabled. You can use the button to turn on this mode.
  • The Transform Mode

    Select the symbol to enable the Transform mode. This mode allows you can rotate and resize the selected map items using the sizing and rotation handles that appear when selecting items. You can also move map items by dragging them to the desired location.

    Use the MapEditor.SetTransformMode method to enable the Transform mode from code. Refer to the Implementing a Custom Map Editor section for more details.

  • The Edit Mode

    Use the button to turn on the Edit mode. In this mode, you can modify the map item's outline. The item outline is configured by several points. You can move them to vary the item shape, and add new points to more precisely configure the shape. Double click a map item edge's point to remove it.

    Note that you can only edit the following map vector items' edges:

    Use the MapEditor.SetEditMode method to turn on the Edit mode when implementing the custom map's editor. Refer to the Implementing a Custom Map Editor section for more details.

  • The Create Mode

    The Create mode allows you to add new items to the map. Select one of the following symbols to create map items:

    You can add dots and pushpins by clicking at the required location. To create a complex map item, sequentially add points to form a map item. The following animation shows how to create a map path:

    Use the MapEditor.SetCreateMode method to enable the Create mode when you are developing a custom map's editor. Refer to the Implementing a Custom Map Editor section for more details.

Expanded Implementing a Custom Map Editor

This section describes application programming interface (API) that allows you to develop own map editor.

Member Description
MapEditor.ActiveItems Gets or sets the currently active map items.
MapEditor.ClearSavedActions Clears all the saved actions.
MapEditor.RemoveItems Removes the specified items.
MapEditor.SetTransformMode Enables the Map Editor's Transformation mode that allows applying the specified transformation to the map items.
MapItemTransform Lists transformations that can be applied to a map item.
MapEditor.RotateItems Rotates the items at the specified angle.
MapEditor.ScaleItems Scales the map items.
MapEditor.TranslateItems Translates items at the specified offset.
MapEditor.SetEditMode Sets the mode that allows end users to edit map items.
MapEditor.InsertItemPoint Inserts a new point to a map item's contour.
MapEditor.RemoveItemPoint Removes a map item's contour point.
MapEditor.SetCreateMode Enables the Map Editor's Create mode that allows creating items of the specified type.
CreatableMapItemKind Lists the map item types that the Map Editor can create while it is in the Create mode.
MapEditor.Undo Undoes the last edit action.
MapEditor.Redo Repeats the last undone action.

The following code shows how to enable the editor's modes using the Map Editor's API:

Expanded See Also

Is this topic helpful?​​​​​​​