Class MapProviderBase
Base class for all map providers. Every map provider can use 1 type of the tile sources. I.e. TiledProvider can use TiledMapSources only and ImageProvider can use ImageMapSource only.
Inheritance
Namespace: Telerik.Windows.Controls.Map
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
public class MapProviderBase : Freezable, IDisposable
Constructors
MapProviderBase()
Initializes a new instance of the MapProviderBase class.
Declaration
protected MapProviderBase()
Fields
GeoBoundsNWProperty
Identifies the GeoBoundsNW GeoBoundsNW dependency property.
Declaration
public static readonly DependencyProperty GeoBoundsNWProperty
Field Value
System.Windows.DependencyProperty
|
GeoBoundsProperty
Identifies the GeoBounds GeoBounds dependency property.
Declaration
public static readonly DependencyProperty GeoBoundsProperty
Field Value
System.Windows.DependencyProperty
|
GeoBoundsSEProperty
Identifies the GeoBoundsSE GeoBoundsSE dependency property.
Declaration
public static readonly DependencyProperty GeoBoundsSEProperty
Field Value
System.Windows.DependencyProperty
|
OpacityProperty
Identifies the Opacity Opacity dependency property.
Declaration
public static readonly DependencyProperty OpacityProperty
Field Value
System.Windows.DependencyProperty
|
Properties
CommandBindingCollection
Gets collection of the command bindings.
Declaration
public CommandBindingCollection CommandBindingCollection { get; }
Property Value
System.Windows.Input.CommandBindingCollection
|
Commands
Gets collection of the commands supported by provider.
Declaration
public ObservableCollection<CommandDescription> Commands { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<CommandDescription>
|
GeoBounds
Gets or sets region covered by map image.
Declaration
public LocationRect GeoBounds { get; set; }
Property Value
LocationRect
|
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 region covered by map image.
Declaration
public Location GeoBoundsNW { get; set; }
Property Value
Location
|
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 region covered by map image.
Declaration
public Location GeoBoundsSE { get; set; }
Property Value
Location
|
Remarks
You can't use this property to set bounds at the same time with GeoBounds property.
MapSources
Gets dictionary of the available map sources.
Declaration
protected Dictionary<string, IMapSource> MapSources { get; }
Property Value
System.Collections.Generic.Dictionary<System.String, IMapSource>
|
Opacity
Gets or sets the opacity factor.
Declaration
public double Opacity { get; set; }
Property Value
System.Double
|
SpatialReference
Gets spatial reference of the current map source.
Declaration
public virtual ISpatialReference SpatialReference { get; }
Property Value
ISpatialReference
|
SupportedSources
Gets ids of the supported sources.
Declaration
public string[] SupportedSources { get; }
Property Value
System.String[]
|
Methods
ApplySourceModes(String)
Apply map source modes.
Declaration
protected virtual string ApplySourceModes(string uniqueId)
Parameters
System.String
uniqueId
Base source unique ID. |
Returns
System.String
Unique ID of the map source with applied modes. |
Remarks
Some providers (Bing, for example) can have different modes for the same base source (arial with/without labels in Bing, for example). This method allows apply this kind of modes to the base source.
CreateInstanceCore()
When implemented in a derived class, creates a new instance of the Freezable derived class.
Declaration
protected override Freezable CreateInstanceCore()
Returns
System.Windows.Freezable
The new instance. |
Dispose()
Releases the resources used by the current instance of the MapProviderBase class.
Declaration
public void Dispose()
Implements
Dispose(Boolean)
Called by the Dispose() and Finalize() methods to release the unmanaged resources used by the current instance of the MapProviderBase class.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
System.Boolean
disposing
True to release unmanaged and managed resources; false to release only unmanaged resources. |
GetValidatedGeoPoint(Location)
Gets the closest valid geographical point for the one supplied (longitude, latitude).
Declaration
public virtual Location GetValidatedGeoPoint(Location geoPoint)
Parameters
Location
geoPoint
The proposed geographical point (longitude, latitude). |
Returns
Location
The closest valid geographical point (longitude, latitude). |
InheritCurrentSource(MapProviderBase)
Sets current map source to cloned provider.
Declaration
protected virtual void InheritCurrentSource(MapProviderBase clone)
Parameters
MapProviderBase
clone
Clone of tiled provider. |
InheritParameters(MapProviderBase)
Sets necessary properties to cloned provider.
Declaration
protected virtual void InheritParameters(MapProviderBase clone)
Parameters
MapProviderBase
clone
Clone of tiled provider. |
OnPreviewSourceChange(IMapSource)
Called before map provider switch to another map source.
Declaration
protected virtual bool OnPreviewSourceChange(IMapSource source)
Parameters
IMapSource
source
Map source which will be used. |
Returns
System.Boolean
|
OnPreviewSourceChanged(IMapSource)
Called after map provider switch to another map source.
Declaration
protected virtual void OnPreviewSourceChanged(IMapSource source)
Parameters
IMapSource
source
Map source is used. |
RegisterSetSourceCommand(Type, String, DataTemplate, Uri, CanExecuteRoutedEventHandler, ExecutedRoutedEventHandler)
Register new set source command.
Declaration
protected void RegisterSetSourceCommand(Type sourceType, string text, DataTemplate dataTemplate, Uri imageUri, CanExecuteRoutedEventHandler canExecute, ExecutedRoutedEventHandler execute)
Parameters
System.Type
sourceType
Map source type. |
System.String
text
Command text. |
System.Windows.DataTemplate
dataTemplate
Data template for command representation. |
System.Uri
imageUri
URI of the image is used in the map source button data template. |
System.Windows.Input.CanExecuteRoutedEventHandler
canExecute
Can execute handler. |
System.Windows.Input.ExecutedRoutedEventHandler
execute
Execute handler. |
SetCommandState(String)
Set state of the commands depends on the new map source.
Declaration
protected virtual void SetCommandState(string uniqueId)
Parameters
System.String
uniqueId
Map source unique ID. |
SetMapSource(String)
Force map provider to use specific map source.
Declaration
public void SetMapSource(string uniqueId)
Parameters
System.String
uniqueId
Unique ID of the map source. |
SetMapSourceToClone(MapProviderBase, String)
Set specific map source to clone of map provider.
Declaration
public virtual void SetMapSourceToClone(MapProviderBase clone, string uniqueId)
Parameters
MapProviderBase
clone
Clone of map provider. |
System.String
uniqueId
Id of map source. |
SourceInitializationFaulted(Object, InitializationFaultEventArgs)
Called when map source initialization faulted.
Declaration
protected void SourceInitializationFaulted(object sender, InitializationFaultEventArgs e)
Parameters
System.Object
sender
Sender. |
InitializationFaultEventArgs
e
Event parameters. |
TilePresenterMapSourceChanged(Object, SourceChangedEventArgs)
Called when map source is changed for tile presenter and map source initialization completed.
Declaration
protected virtual void TilePresenterMapSourceChanged(object sender, SourceChangedEventArgs e)
Parameters
System.Object
sender
Sender. |
SourceChangedEventArgs
e
Event parameters. |
TryGetMapSource(String, out IMapSource)
Attempts to get a map source from the registered map sources by provided source Id.
Declaration
public bool TryGetMapSource(string uniqueId, out IMapSource source)
Parameters
System.String
uniqueId
The id of the map source. |
IMapSource
source
The result map source. |
Returns
System.Boolean
|
Events
InitializationFaulted
Occurs when initialization of the one of the map sources is faulted.
Declaration
public event EventHandler<InitializationFaultEventArgs> InitializationFaulted
Event Type
System.EventHandler<InitializationFaultEventArgs>
|
MapSourceChanged
Event occurs when map source is actually changed.
Declaration
public event EventHandler<MapSourceChangedEventArgs> MapSourceChanged
Event Type
System.EventHandler<MapSourceChangedEventArgs>
|
SpatialReferenceChanged
Event occurs when spatial reference is ready to use.
Declaration
public event EventHandler SpatialReferenceChanged
Event Type
System.EventHandler
|