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