Skip to main content

Map Control

  • 8 minutes to read

The DevExpress Map Control for WPF (MapControl) allows you to incorporate geographical and Cartesian maps in your applications. You can obtain map data from different sources, be it web services or local files. A wide variety of built-in navigation features help you develop interactive maps.

Map arrows are used to create a wind map.

The image above is created based on the following demo: Map Arrows.

Demos

We have implemented the most popular map scenarios in our demo applications so you can try out our Map Control right now:

Run Demo

Get Started

Follow these tutorials to create your first map applications:

Layers and Overlays

The Map Control uses different types of layers to visualize data on a map. All layers are stored in the Map Control’s Layers collection. You can create and add any number of layers to the map. Assign a data provider to a layer to load data. Each layer type is compatible with specific providers. Supported layers are listed below:

ImageLayer
Image layers are used to visualize image tiles, vector tiles, geographical images from web map services, and heatmaps.
VectorLayer
Vector item layers store map vector items such as pushpins, callouts, polygons, lines, and so on. For more information, see the following section: Vector Items.
InformationLayer
Information layers are used to show map vector items that the Map Control creates based on data obtained from Geographic Information System services (GIS services). Supported GIS Services are listed in the following document: GIS Data.

See the following help topic for more information about map layers: Layers.

Bing Maps Services

The Map Control can retrieve and visualize information from imagery and GIS (routing, geocode, search, and elevation) Bing Maps REST services.

Important

On May 21, 2024, Microsoft announced that Bing Maps for Enterprise and its API will be discontinued. Azure Maps will be a single unified enterprise mapping platform available from Microsoft.

We are working on API compatible with Azure Maps and expect to ship it with our next major release (v24.2).

If you have an existing license to Bing Maps for Enterprise, you can continue using our existing API. You need to transition to new API until June 30, 2025 (free and basic license) or until June 30, 2028 (enterprise license).

The last date you can get a new license to Bing Maps for Enterprise is June 30, 2025. If you do not have an existing license after that date, you would not be able to use our map controls with Bing Maps or Azure Maps (until we release the new API). During that time, you can use other map providers supported by our controls, such as OpenStreetMap.

To obtain information from one of the services, you need to create an appropriate data provider and assign it to the corresponding layer. The following list contains available providers:

BingMapDataProvider
Allows you to obtain raster image tiles.
BingElevationDataProvider
Use it to obtain elevation information by geo coordinates.
BingGeocodeDataProvider
Allows you to get geographical coordinates for a location by its address.
BingRouteDataProvider
Use it to build a route by waypoints with different optimization parameters.
BingSearchDataProvider
Allows you to search for locations by the specified address or keyword.
BingRouteIsochroneDataProvider
Use it to calculate an isochrone that shows an area reachable from a specific location.
BingTrafficIncidentDataProvider
Use it to receive information about traffic incidents and display incident icons on the map.

A key is required to access data from Bing Maps. See the following topic for information: How to: Get a Bing Maps Key.

OpenStreetMap Services

You can load image tiles from the OpenStreetMap imagery service, and obtain GIS data from search and geocode services. To receive information from one of the services, you need to create an appropriate data provider and assign it to the corresponding layer. The following list contains available providers:

OpenStreetMapDataProvider
Allows you to obtain raster image tiles.
OsmGeocodeDataProvider
Allows you to get geographical coordinates for a location by its address.
OsmSearchDataProvider
Allows you to search for locations by the specified address or keyword.

A map with OpenStreetMap tiles loaded

The image above is created based on the following demo: OpenStreetMap Provider.

Web Map Services

Web Map Services (WMS) allow you to receive geographical data images from a map server. For more information, refer to the following help topic: Web Map Service Provider.

A geo map image loaded from a web map service

The image above is created based on the following demo: Web Map Service.

Vector Tiles

As an alternative to raster tiles, you can load vector tiles from different sources. When the Map Control is bound to a vector provider, it only downloads shape definitions (geometries) and applies styles on the client side.

MapboxDataProvider
Loads vector tile data from Mapbox Service.
MbTilesDataProvider
Loads vector tiles from an MbTiles database.
UriBasedVectorTileDataProvider
Loads map data from a set of PBF or MVT files.

Refer to the following topic for more information: Vector Tile Providers

A map with vector tiles

Vector Items

Map vector items are pushpins, callouts, lines, polygons, pies, and other shapes you can display over a map. These items can be created and loaded to the map in different ways:

You can aggregate groups of items into clusters. Also, the Map Control can paint all items on the map based on a condition. To distinguish items, the Map Control can display different types of legends.

Map pies

The image above is created based on the following demo: Pie Charts.

Runtime Vector Item Editor

The Map Control ships with the Vector Item Editor – a powerful tool that allows users to create new and customize existing vector items. You can also use the Map Editor API to create your own map edit UI. Refer to the following topic for more information: Vector Item Editor.

Map items are being edited

The image above is created based on the following demo: Map Editor.

Coordinate Systems and Geographical Projections

You can display both geographic and cartesian maps. Geographical maps support different types of projections. You can also display cartesian data over the geographic map.

Map items are being edited

The image above is created based on the following demo: Map Projections.

Heatmaps

The Map Control can visualize geographical point data on a heatmap layer and supports heatmap customization options such as color gradient, opacity, and data point radius. Refer to the following topic for details: HeatmapProvider.

A heatmap is shown over a geographical map

The image above is created based on the following demo: Heat Map.

If you look for heatmap charts, refer to the following help topic: Heatmap Control.

Measurements

The Map Control allows you to use the Measurement UI and API to measure distances and areas on the map. For more information, see: Measurements

The Map Control also ships with an API that allows you to measure geometric values based on geographical coordinates. You can use this information to develop custom map measurement instruments. Refer to the following help topic for more information: GeoUtils

An area is measured on a map

The image above is created based on the following demo: Map Editor.

Georeferenced Images

Georeferenced images are images embedded into polygons. These images can be zoomed in and out with the entire map.

A polygon with an image embedded

The image above is created based on the following demo: Geo Shape Image.

Miscellaneous Features

Scrolling
Users can scroll the map to navigate it. The Map Control also supports circular scrolling and allows you to limit the scroll area.
Zooming
Users can click buttons on the navigation panel or rotate the mouse wheel to zoom the map.
Rotation
The map can be rotated using the mouse or the built-in API.
Selection and Highlighting
Users can select and highlight items on a map. You can use the built-in API to respond to user selection actions.
Search Panel
If the search functionality is enabled, users can input search queries into the search panel.
Mini Map
Duplicates the current map at a lower zoom level and allows users to navigate the map.
Print and Export
The map can be printed and exported. The following export formats are supported: SVG, KML, shapefile, raster image, PDF, MHT, RTF, XLS, and XLSX.
Tooltips
You can show more details on the selected map item in a tooltip. Tooltips support HTML formatting.

Examples

The following section contains examples of the most popular mapping scenarios: Examples.

See Also