ClassRadMap
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:
public class RadMap : RadLayout
Inheritance: objectRadLayoutRadMap
Inherited Members
Constructors
Fields
BackgroundColorProperty
Identifies the BackgroundColor bindable property.
Declaration
public static readonly BindableProperty BackgroundColorProperty
Field Value
BindableProperty
EnableHardwareAccelerationProperty
Identifies the EnableHardwareAcceleration bindable property.
Declaration
public static readonly BindableProperty EnableHardwareAccelerationProperty
Field Value
BindableProperty
InteractionModeProperty
Identifies the InteractionMode bindable property.
Declaration
public static readonly BindableProperty InteractionModeProperty
Field Value
BindableProperty
MaxZoomLevelProperty
Identifies the MaxZoomLevel bindable property.
Declaration
public static readonly BindableProperty MaxZoomLevelProperty
Field Value
BindableProperty
MinZoomLevelProperty
Identifies the MinZoomLevel bindable property.
Declaration
public static readonly BindableProperty MinZoomLevelProperty
Field Value
BindableProperty
ZoomInCommandProperty
Identifies the ZoomInCommand bindable property.
Declaration
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
public static readonly BindableProperty ZoomLevelProperty
Field Value
BindableProperty
ZoomOutCommandProperty
Identifies the ZoomOutCommand bindable property.
Declaration
public static readonly BindableProperty ZoomOutCommandProperty
Field Value
BindableProperty
Properties
BackgroundColor
Declaration
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
public bool EnableHardwareAcceleration { get; set; }
Property Value
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
public MapInteractionMode InteractionMode { get; set; }
Property Value
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
public ObservableItemCollection<MapLayer> Layers { get; }
Property Value
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
public double MaxZoomLevel { get; set; }
Property Value
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
public double MinZoomLevel { get; set; }
Property Value
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.
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
public double ZoomLevel { get; }
Property Value
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.
Methods
OnBindingContextChanged()
Declaration
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
public void SetView(LocationRect boundingRect)
Parameters
boundingRect
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
public void ZoomToLevel(double zoomLevel)
Parameters
zoomLevel
The target zoom level to set. Higher values show more detail of smaller areas.