Class
RadMap

Represents a Map control that enables rich geospatial data visualization through shapefile layers. The RadMap control supports interactive navigation with pan and zoom operations, programmatic zoom control, and customizable styling for geographic shapes.

Definition

Namespace:Telerik.Maui.Controls.Map

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class RadMap : RadLayout

Inheritance: objectRadLayoutRadMap

Inherited Members RadLayout.CreateLayoutManager()

Constructors

RadMap()

Initializes a new instance of the RadMap class.

Declaration

cs-api-definition
public RadMap()

Fields

BackgroundColorProperty

Identifies the BackgroundColor bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty BackgroundColorProperty

Field Value

BindableProperty

EnableHardwareAccelerationProperty

Identifies the EnableHardwareAcceleration bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty EnableHardwareAccelerationProperty

Field Value

BindableProperty

InteractionModeProperty

Identifies the InteractionMode bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty InteractionModeProperty

Field Value

BindableProperty

MaxZoomLevelProperty

Identifies the MaxZoomLevel bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty MaxZoomLevelProperty

Field Value

BindableProperty

MinZoomLevelProperty

Identifies the MinZoomLevel bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty MinZoomLevelProperty

Field Value

BindableProperty

ZoomInCommandProperty

Identifies the ZoomInCommand bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty ZoomInCommandProperty

Field Value

BindableProperty

ZoomLevelProperty

Identifies the ZoomLevel bindable property. This is a read-only property that reflects the current zoom level.

Declaration

cs-api-definition
public static readonly BindableProperty ZoomLevelProperty

Field Value

BindableProperty

ZoomOutCommandProperty

Identifies the ZoomOutCommand bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty ZoomOutCommandProperty

Field Value

BindableProperty

Properties

BackgroundColor

Declaration

cs-api-definition
public Color BackgroundColor { get; set; }

Property Value

Color

EnableHardwareAcceleration

Gets or sets a value indicating whether hardware acceleration (GPU rendering) is enabled for the map. When true, the GPU is used for rendering which can improve performance for complex maps. When false, CPU rendering is used which may be more stable on some devices.

Declaration

cs-api-definition
public bool EnableHardwareAcceleration { get; set; }

Property Value

bool

A boolean value indicating whether hardware acceleration is enabled. Default depends on platform capabilities.

InteractionMode

Gets or sets the interaction mode that determines which user gestures are enabled for the map. Controls whether users can pan, zoom, both, or neither.

Declaration

cs-api-definition
public MapInteractionMode InteractionMode { get; set; }

Property Value

MapInteractionMode

A MapInteractionMode value. Default is PanAndZoom.

Layers

Gets the collection of MapLayer instances that define the data sources and visual layers for the map. Add MapShapefileLayer instances to this collection to display geographic data.

Declaration

cs-api-definition
public ObservableItemCollection<MapLayer> Layers { get; }

Property Value

ObservableItemCollection<MapLayer>

MaxZoomLevel

Gets or sets the maximum zoom level that users can reach when zooming in. This property constrains the ZoomLevel to prevent zooming in beyond a certain point.

Declaration

cs-api-definition
public double MaxZoomLevel { get; set; }

Property Value

double

The maximum zoom level. Default value is 20.0. Must be greater than or equal to MinZoomLevel.

MinZoomLevel

Gets or sets the minimum zoom level that users can reach when zooming out. This property constrains the ZoomLevel to prevent zooming out beyond a certain point.

Declaration

cs-api-definition
public double MinZoomLevel { get; set; }

Property Value

double

The minimum zoom level. Default value is 1.0. Must be less than or equal to MaxZoomLevel.

ZoomInCommand

Gets or sets a command that performs a zoom in operation on the map. This command increases the zoom level, showing more detail of a smaller geographic area.

Declaration

cs-api-definition
public ICommand ZoomInCommand { get; set; }

Property Value

ICommand

An ICommand that can be bound to UI elements like buttons. A default implementation is provided.

ZoomLevel

Gets the current zoom level of the map as a read-only value. The zoom level determines how much detail is visible, with higher values showing more detail and smaller geographic areas. Use ZoomToLevel(double) to programmatically change the zoom level.

Declaration

cs-api-definition
public double ZoomLevel { get; }

Property Value

double

A double value representing the current zoom level, constrained by MinZoomLevel and MaxZoomLevel.

ZoomOutCommand

Gets or sets a command that performs a zoom out operation on the map. This command decreases the zoom level, showing less detail of a larger geographic area.

Declaration

cs-api-definition
public ICommand ZoomOutCommand { get; set; }

Property Value

ICommand

An ICommand that can be bound to UI elements like buttons. A default implementation is provided.

Methods

OnBindingContextChanged()

Declaration

cs-api-definition
protected override void OnBindingContextChanged()

SetView(LocationRect)

Sets the map view to display the specified geographic bounding rectangle. The map will adjust its zoom level and center position to best fit the provided area within the current viewport. This is useful for navigating to specific regions or displaying the optimal view for a set of geographic data.

Declaration

cs-api-definition
public void SetView(LocationRect boundingRect)

Parameters

boundingRect

LocationRect

A LocationRect defining the northwest and southeast corners of the area to display.

ZoomToLevel(double)

Programmatically sets the zoom level of the map to the specified value. The zoom level will be constrained by the MinZoomLevel and MaxZoomLevel properties. This method only works when InteractionMode allows zooming.

Declaration

cs-api-definition
public void ZoomToLevel(double zoomLevel)

Parameters

zoomLevel

double

The target zoom level to set. Higher values show more detail of smaller areas.