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