ClassRadMap
Represents the RadMap class.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.DataVisualization.dll
Syntax:
[SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
[TelerikToolboxCategory("Data Visualization")]
public class RadMap : ItemsControl
Inheritance: objectRadMap
Derived Classes:
Constructors
RadMap()
Initializes a new instance of the RadMap class.
Declaration
public RadMap()
Fields
CenterProperty
Identifies the Center Center dependency property.
Declaration
public static readonly DependencyProperty CenterProperty
Field Value
DependencyProperty
CommandBarVisibilityProperty
Identifies the CommandBarVisibility dependency property.
Declaration
public static readonly DependencyProperty CommandBarVisibilityProperty
Field Value
DependencyProperty
DistanceUnitProperty
Identifies the DistanceUnit DistanceUnit dependency property.
Declaration
public static readonly DependencyProperty DistanceUnitProperty
Field Value
DependencyProperty
GeoBoundsNWProperty
Identifies the GeoBoundsNW GeoBoundsNW dependency property.
Declaration
public static readonly DependencyProperty GeoBoundsNWProperty
Field Value
DependencyProperty
GeoBoundsProperty
Identifies the GeoBounds GeoBounds dependency property.
Declaration
public static readonly DependencyProperty GeoBoundsProperty
Field Value
DependencyProperty
GeoBoundsSEProperty
Identifies the GeoBoundsSE GeoBoundsSE dependency property.
Declaration
public static readonly DependencyProperty GeoBoundsSEProperty
Field Value
DependencyProperty
IsKeyboardNavigationEnabledProperty
Identifies the IsKeyboardNavigationEnabled dependency property.
Declaration
public static readonly DependencyProperty IsKeyboardNavigationEnabledProperty
Field Value
DependencyProperty
IsMiniMapExpandedProperty
Identifies the IsMiniMapExpanded dependency property.
Declaration
public static readonly DependencyProperty IsMiniMapExpandedProperty
Field Value
DependencyProperty
MapMouseClickEvent
Identifies the MapMouseClick routed event.
Declaration
[SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly RoutedEvent MapMouseClickEvent
Field Value
RoutedEvent
MapMouseDoubleClickEvent
Identifies the MapMouseDoubleClick routed event.
Declaration
[SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly RoutedEvent MapMouseDoubleClickEvent
Field Value
RoutedEvent
MaxZoomLevelProperty
Identifies the MaxZoomLevel dependency property.
Declaration
public static readonly DependencyProperty MaxZoomLevelProperty
Field Value
DependencyProperty
MinZoomLevelProperty
Identifies the MinZoomLevel dependency property.
Declaration
public static readonly DependencyProperty MinZoomLevelProperty
Field Value
DependencyProperty
MiniMapExpanderVisibilityProperty
Identifies the MiniMapExpanderVisibility dependency property.
Declaration
public static readonly DependencyProperty MiniMapExpanderVisibilityProperty
Field Value
DependencyProperty
MiniMapHeightProperty
Identifies the MiniMapHeight dependency property.
Declaration
public static readonly DependencyProperty MiniMapHeightProperty
Field Value
DependencyProperty
MiniMapWidthProperty
Identifies the MiniMapWidth dependency property.
Declaration
public static readonly DependencyProperty MiniMapWidthProperty
Field Value
DependencyProperty
MouseClickModeProperty
Identifies the MouseClickMode dependency property.
Declaration
public static readonly DependencyProperty MouseClickModeProperty
Field Value
DependencyProperty
MouseDoubleClickModeProperty
Identifies the MouseDoubleClickMode dependency property.
Declaration
public static readonly DependencyProperty MouseDoubleClickModeProperty
Field Value
DependencyProperty
MouseDragModeProperty
Identifies the MouseDragMode dependency property.
Declaration
public static readonly DependencyProperty MouseDragModeProperty
Field Value
DependencyProperty
MouseLocationIndicatorVisibilityProperty
Identifies the MouseLocationIndicatorVisibility dependency property.
Declaration
public static readonly DependencyProperty MouseLocationIndicatorVisibilityProperty
Field Value
DependencyProperty
MouseSelectionModeProperty
Identifies the MouseSelectionMode dependency property.
Declaration
public static readonly DependencyProperty MouseSelectionModeProperty
Field Value
DependencyProperty
MouseShiftDragModeProperty
Identifies the MouseShiftDragMode dependency property.
Declaration
public static readonly DependencyProperty MouseShiftDragModeProperty
Field Value
DependencyProperty
MouseWheelModeProperty
Identifies the MouseWheelMode dependency property.
Declaration
public static readonly DependencyProperty MouseWheelModeProperty
Field Value
DependencyProperty
MouseWheelSensitivityProperty
Identifies the MouseWheelSensitivity dependency property.
Declaration
public static readonly DependencyProperty MouseWheelSensitivityProperty
Field Value
DependencyProperty
NavigationVisibilityProperty
Identifies the NavigationVisibility dependency property.
Declaration
public static readonly DependencyProperty NavigationVisibilityProperty
Field Value
DependencyProperty
PanningFinishedEvent
Identifies the PanningFinished routed event.
Declaration
[SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly RoutedEvent PanningFinishedEvent
Field Value
RoutedEvent
ProviderProperty
Identifies the Provider Provider dependency property.
Declaration
public static readonly DependencyProperty ProviderProperty
Field Value
DependencyProperty
ProvidersProperty
Identifies the Providers dependency property.
Declaration
public static readonly DependencyProperty ProvidersProperty
Field Value
DependencyProperty
ScaleVisibilityProperty
Identifies the ScaleVisibility dependency property.
Declaration
public static readonly DependencyProperty ScaleVisibilityProperty
Field Value
DependencyProperty
SpringAnimationsModeProperty
Identifies the SpringAnimationsMode dependency property.
Declaration
public static readonly DependencyProperty SpringAnimationsModeProperty
Field Value
DependencyProperty
UseDefaultLayoutProperty
Identifies the UseDefaultLayout dependency property.
Declaration
public static readonly DependencyProperty UseDefaultLayoutProperty
Field Value
DependencyProperty
UseSpringAnimationsProperty
Identifies the UseSpringAnimations dependency property.
Declaration
public static readonly DependencyProperty UseSpringAnimationsProperty
Field Value
DependencyProperty
WrapAroundProperty
Identifies the WrapAround dependency property.
Declaration
public static readonly DependencyProperty WrapAroundProperty
Field Value
DependencyProperty
ZoomBarDropDownHeightProperty
Identifies the ZoomBarDropDownHeight dependency property.
Declaration
public static readonly DependencyProperty ZoomBarDropDownHeightProperty
Field Value
DependencyProperty
ZoomBarPresetsVisibilityProperty
Identifies the ZoomBarPresetsVisibility dependency property.
Declaration
public static readonly DependencyProperty ZoomBarPresetsVisibilityProperty
Field Value
DependencyProperty
ZoomBarVisibilityProperty
Identifies the ZoomBarVisibility dependency property.
Declaration
public static readonly DependencyProperty ZoomBarVisibilityProperty
Field Value
DependencyProperty
ZoomLevelProperty
Identifies the ZoomLevel ZoomLevel dependency property.
Declaration
public static readonly DependencyProperty ZoomLevelProperty
Field Value
DependencyProperty
ZoomProperty
Identifies the Zoom dependency property.
Declaration
public static readonly DependencyProperty ZoomProperty
Field Value
DependencyProperty
ZoomStepProperty
Identifies the ZoomStep dependency property.
Declaration
public static readonly DependencyProperty ZoomStepProperty
Field Value
DependencyProperty
ZoomingFinishedEvent
Identifies the ZoomingFinished routed event.
Declaration
[SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly RoutedEvent ZoomingFinishedEvent
Field Value
RoutedEvent
Properties
Center
Gets or sets center of the map. In WrapAround mode Center's Longitude exceeds boundaries (-180; 180). To coerce it you can use the method GetCoercedLocation(Location).
CommandBarVisibility
Gets or sets visibility of the embedded MapCommandBar UI control.
Declaration
public Visibility CommandBarVisibility { get; set; }
Property Value
Visibility
DistanceUnit
Gets or sets distance unit.
Declaration
public DistanceUnit DistanceUnit { get; set; }
Property Value
GeoBounds
Gets or sets map geographical bounds.
Declaration
public LocationRect GeoBounds { get; set; }
Property Value
Remarks
You can't use this property to set bounds at the same time with GeoBoundsNW and GeoBoundsSE properties.
GeoBoundsNW
Gets or sets north-west corner of the map geographical bounds.
Declaration
public Location GeoBoundsNW { get; set; }
Property Value
Remarks
You can't use this property to set bounds at the same time with GeoBounds property.
GeoBoundsSE
Gets or sets south-east corner of the map geographical bounds.
Declaration
public Location GeoBoundsSE { get; set; }
Property Value
Remarks
You can't use this property to set bounds at the same time with GeoBounds property.
GeographicalBounds
Gets bounds of the geographical region covered by map control.
Declaration
public Rect GeographicalBounds { get; }
Property Value
Rect
IsInitialized
Gets value which indicates whether map control have been initialized.
IsKeyboardNavigationEnabled
Gets or sets value which indicates whether keyboard can be used to navigate over the map.
Declaration
public bool IsKeyboardNavigationEnabled { get; set; }
Property Value
IsMiniMapExpanded
Gets or sets value which indicates whether the embedded MiniMap UI control is expanded.
LocationRect
Gets LocationRect of the geographical region covered by map control.
MapZoomBar
Gets the default zoom control.
Declaration
public MapZoomBar MapZoomBar { get; }
Property Value
The map zoom panel.
MaxZoomLevel
Gets or sets maximum ZoomLevel.
MinZoomLevel
Gets or sets minimum ZoomLevel.
MiniMapExpanderVisibility
Gets or sets visibility of the embedded MiniMapExpander UI control.
Declaration
public Visibility MiniMapExpanderVisibility { get; set; }
Property Value
Visibility
MiniMapHeight
Gets or sets height of the embedded MiniMap UI control.
MiniMapWidth
Gets or sets width of the embedded MiniMap UI control.
MouseClickMode
Gets or sets Mouse Click Mode property.
Declaration
public MouseBehavior MouseClickMode { get; set; }
Property Value
MouseDoubleClickMode
Gets or sets Mouse Double Click Mode property.
Declaration
public MouseBehavior MouseDoubleClickMode { get; set; }
Property Value
MouseDragMode
Gets or sets Mouse Drag Mode property.
Declaration
public MouseDragBehavior MouseDragMode { get; set; }
Property Value
MouseLocationIndicatorVisibility
Gets or sets visibility of the embedded MouseLocationIndicator UI control.
Declaration
public Visibility MouseLocationIndicatorVisibility { get; set; }
Property Value
Visibility
MouseSelectionMode
Gets or sets Mouse Selection Mode property.
Declaration
public MouseSelectionMode MouseSelectionMode { get; set; }
Property Value
MouseShiftDragMode
Gets or sets value which specify mouse dragging behaviour when SHIFT key is pressed.
Declaration
public MouseDragBehavior MouseShiftDragMode { get; set; }
Property Value
MouseWheelMode
Gets or sets the mode of mouse wheel.
Declaration
public MouseWheelBehavior MouseWheelMode { get; set; }
Property Value
MouseWheelSensitivity
Gets or sets the sensitivity of mouse wheel.
Declaration
public double MouseWheelSensitivity { get; set; }
Property Value
NavigationVisibility
Gets or sets visibility of the embedded MapNavigation UI control (the arrows navigation).
Declaration
public Visibility NavigationVisibility { get; set; }
Property Value
Visibility
PinchManipulationSensitivity
Gets or sets sensitivity of the pinch manipulation on the touch screens.
Declaration
public double PinchManipulationSensitivity { get; set; }
Property Value
Remarks
The value must be in the [0..1] range.
Provider
Get or sets map provider.
Declaration
public MapProviderBase Provider { get; set; }
Property Value
Providers
Gets collection of the map image providers.
Declaration
public MapProviderCollection Providers { get; }
Property Value
ScaleVisibility
Gets or sets visibility of the embedded MapScale UI control.
Declaration
public Visibility ScaleVisibility { get; set; }
Property Value
Visibility
SpatialReference
Gets or sets current Spatial Reference of the Map control.
Declaration
public ISpatialReference SpatialReference { get; set; }
Property Value
SpringAnimationsMode
Gets or sets mode of map animation.
Declaration
public SpringAnimationsMode SpringAnimationsMode { get; set; }
Property Value
UseDefaultLayout
Gets or sets value which indicates whether map control should use default layout for navigation and map mode controls.
UseSpringAnimations
Gets or sets value which indicates whether spring animations are enabled.
WrapAround
Gets or sets a value indicating whether Map Wraparound Mode is Enabled. When in WrapAround mode - the map always covers the viewport horizontally, panning can be considered unlimited.
Zoom
Gets or sets the current zoom. Should be value between 1.0 and 20.0. It automatically sets the ZoomLevel to the biggest integer which is below the current double value.
ZoomBarDropDownHeight
Gets or sets height of the embedded MapZoomBar drop down.
Declaration
public double ZoomBarDropDownHeight { get; set; }
Property Value
ZoomBarPresetsVisibility
Gets or sets the visibility of the MapZoomBar preset buttons that zoom to predefined levels on the map (World, State, Region, City, Hood).
Declaration
public Visibility ZoomBarPresetsVisibility { get; set; }
Property Value
Visibility
ZoomBarVisibility
Gets or sets visibility of the embedded MapZoomBar UI control.
Declaration
public Visibility ZoomBarVisibility { get; set; }
Property Value
Visibility
ZoomLevel
Gets or sets zoom level.
Methods
ArrangeOverride(Size)
Called to arrange and size the content.
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
finalSize
Size
The computed size that is used to arrange the content.
Returns
Size
The calculated size.
ClearContainerForItemOverride(DependencyObject, object)
Undoes the effects of the PrepareContainerForItemOverride method.
Declaration
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
The container element.
item
The item.
Dispose()
Dispose all resources are used by RadMap control.
Declaration
public void Dispose()
ExportToImage(Stream, bool, BitmapEncoder)
Exports the current viewport of the map into a steam.
Declaration
public void ExportToImage(Stream stream, bool includeMapObjects = false, BitmapEncoder encoder = null)
Parameters
stream
The stream to which the map should be exported.
includeMapObjects
Indicates whether to include or not the objects from the information / visualization layers.
encoder
BitmapEncoder
The encoder used for the export.
ExportToImage(string, bool, BitmapEncoder)
Exports the current viewport of the map into a file with the given fileName parameter.
Declaration
public void ExportToImage(string fileName, bool includeMapObjects = false, BitmapEncoder encoder = null)
Parameters
fileName
The name of the file to which the map should be exported.
includeMapObjects
Indicates whether to include or not the objects from the information / visualization layers.
encoder
BitmapEncoder
The encoder used for the export.
GetCoercedLocation(Location)
Gets a Location in longitude range(-180;180) by shifting the given location's longitude.
GetCoercedLocationRect(LocationRect)
Gets a LocationRect whose West is in longitude range(-180;180) by shifting the given LocationRect West longitude.
Declaration
public LocationRect GetCoercedLocationRect(LocationRect baseRect)
Parameters
baseRect
Returns
GetGeoSize(Location, Size)
Calculates degree size according to base point and zoom.
Declaration
public Size GetGeoSize(Location basePoint, Size pixelSize)
Parameters
basePoint
Base point.
pixelSize
Size
The size in pixels.
Returns
Size
Size in degree.
GetLatitudeLongitudeSize(Location, double, double)
Calculates degree size according to base point and zoom.
Declaration
public Size GetLatitudeLongitudeSize(Location basePoint, double width, double height)
Parameters
basePoint
Base point.
width
The width in units according to DistanceUnit property.
height
The height in units according to DistanceUnit property.
Returns
Size
Size in degree.
GetPixelSize(Location, double, double)
Calculates pixel size according to base point and zoom.
Declaration
public Size GetPixelSize(Location basePoint, double width, double height)
Parameters
basePoint
Base point.
width
The width in units according to DistanceUnit property.
height
The height in units according to DistanceUnit property.
Returns
Size
Size in pixels.
GetPixelSizeAtZoomLevel(LocationRect, int)
Gets pixel size of the specified geographic region for the given zoom level.
Declaration
public Size GetPixelSizeAtZoomLevel(LocationRect geoRegion, int zoomLevel)
Parameters
geoRegion
Geographical region to get pixel size for.
zoomLevel
Zoom level.
Returns
Size
Pixel size of the region.
GetPixelsDistance(double)
Calculates horizontal pixel distance according to latitude and zoom.
GetShiftedLocation(Location, Location?)
Gets a Location shifted with offset equal to the offset by which the current center is shifted outside longitude range (-180;180).
IsVisible(Location)
Detect whether given location is visible in the map control.
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
The type-specific AutomationPeer implementation.
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.
OnMouseDoubleClick(MouseButtonEventArgs)
Handles the routed event.
Declaration
protected override void OnMouseDoubleClick(MouseButtonEventArgs e)
Parameters
e
MouseButtonEventArgs
The event data.
OnMouseWheel(MouseWheelEventArgs)
The MouseWheel event handler.
Declaration
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters
e
MouseWheelEventArgs
Event arguments.
PrepareContainerForItemOverride(DependencyObject, object)
Prepares the specified element to display the specified item.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
Element used to display the specified item.
item
Specified item.
RefreshCommandBar()
Refresh default command bar regardless whether map provider has been changed or not.
Declaration
public void RefreshCommandBar()
SetView(LocationRect, bool)
Sets ZoomLevel and Center so the given LocationRect object is completely visible.
Declaration
public void SetView(LocationRect view, bool useFractionZoom = false)
Parameters
view
The location rect that should be centered in the map viewport.
useFractionZoom
Sets a value indicating whether the zooming of the view should use the fractional part of calculated zoom level.
SetView(LocationRect, double)
Sets ZoomLevel and Center so the given LocationRect object, including minimum padding around it is completely visible in viewport. After this operation, zoom property is expected to have non-integer value with fractional digits.
Declaration
public void SetView(LocationRect view, double minimumPadding)
Parameters
view
The location rect that should be centered in the map viewport.
minimumPadding
Sets a value indicating the the minimum padding around the visible view, in pixels.
Events
CenterChanged
Event occurs when the Center property of the map control is changed.
CenterChanging
Event occurs when the Center property of the map control starts to change.
Declaration
public event EventHandler<PropertyChangingEventArgs> CenterChanging
Event Value
InitializeCompleted
Event occurs when initialization of the map control is completed.
Declaration
public event EventHandler InitializeCompleted
Event Value
MapMouseClick
Occurs when the user clicks on the map.
Declaration
[SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly")]
public event MouseRoutedEventHandler MapMouseClick
Event Value
MapMouseDoubleClick
Occurs when the user does double click on the map.
Declaration
[SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly")]
public event MouseRoutedEventHandler MapMouseDoubleClick
Event Value
PanningFinished
Event occurs when panning of the map finished (spring animation which started when map center has been changed is finished).
Declaration
public event RoutedEventHandler PanningFinished
Event Value
RoutedEventHandler
SelectionRectangleChanged
Event occurs when new geographical region is selected by mouse (the MouseDragBehavior is "Select" and MouseSelectionMode is "RaiseEvent").
Declaration
public event EventHandler<SelectionRectangleChangedEventArgs> SelectionRectangleChanged
Event Value
ZoomChanged
Event occurs when the Zoom property of the map control is changed.
ZoomChanging
Event occurs when the ZoomLevel property of the map control starts to change.
Declaration
public event EventHandler<PropertyChangingEventArgs> ZoomChanging
Event Value
ZoomingFinished
Event occurs when zooming of the map finished (spring animation which started when map zoom level has been changed is finished).
Declaration
public event RoutedEventHandler ZoomingFinished
Event Value
RoutedEventHandler