[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Collapse]Map Control
   [Expand]Getting Started
    Layers
   [Expand]Coordinate Systems
   [Expand]Map Image Data
   [Expand]GIS Data
   [Expand]Vector Data
   [Expand]Visual Elements
   [Expand]End-User Interaction
   [Collapse]Examples
    [Expand]General
    [Collapse]Map Image Data
      How to: Load Image Tiles from Bing Maps
      How to: Connect to Bing Maps Using a Smart Tag
      How to: Connect to Bing Maps via Instant Layout Assistant
      How to: Load Image Tiles from OpenStreetMap
      How to: Load Image Tiles from Another Source
      How to: Customize a Web Request for a Map Web Service
      How to: Cache Image Tiles Locally
      How to: Obtain a Collection of Available Layers in the ResponseCapabilities Event Handler
      How to: Add a Georeferenced Image to a Map
    [Expand]GIS Data
    [Expand]Vector Data
    [Expand]Printing and Exporting
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[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]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Add a Georeferenced Image to a Map

This example demonstrates how to use a map polygon to display a raster georeferenced image on a map.

Expanded An Image Matches a Map Polygon's Shape

This section describes the case when a Map Control cuts a shape from an image without further geometric transformation.

  • Add a VectorLayer (see VectorLayer) to the MapControl.Layers collection.

  • Assign a MapItemStorage object to the VectorLayer.Data property.

  • Add a MapPolygon object to the storage.

  • Populate the MapPolygon.Points collection with geographical coordinates.

  • Use an ImageBrush (see System.Windows.Media.ImageBrush) object to specify the map polygon's Fill (see MapShapeBase.Fill) property.

  • The System.Windows.Media.ImageBrush.ImageSource property allows you to specify an image.

Expanded Display a Specified Image Area

You can use the System.Windows.Media.TileBrush.Viewbox property to limit the image area shown in the map polygon.

Expanded Apply Transformations to Fit an Image

This section describes the case when an image cannot be displayed in a polygon without geometric transformation.

  • Add a map polygon (see MapPolygon) as you did in the previous section.

  • Use the System.Windows.Media.Brush.RelativeTransform property to apply a group of transformations that adjust an image to the map polygon's shape. The example below uses the following transformations:

    • ScaleTransform (see System.Windows.Media.ScaleTransform)
    • SkewTransform (see System.Windows.Media.SkewTransform)
    • RotateTransform (see System.Windows.Media.RotateTransform)

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