New to Telerik UI for WPFStart a free 30-day trial

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:

C#
public class MapProviderBase : Freezable, IDisposable

Inheritance: objectMapProviderBase

Derived Classes: EmptyProviderImageProviderTiledProvider

Implements: IDisposable

Constructors

Initializes a new instance of the MapProviderBase class.

C#
protected MapProviderBase()

Fields

GeoBoundsNWProperty

DependencyProperty

Identifies the GeoBoundsNW GeoBoundsNW dependency property.

C#
public static readonly DependencyProperty GeoBoundsNWProperty

GeoBoundsProperty

DependencyProperty

Identifies the GeoBounds GeoBounds dependency property.

C#
public static readonly DependencyProperty GeoBoundsProperty

GeoBoundsSEProperty

DependencyProperty

Identifies the GeoBoundsSE GeoBoundsSE dependency property.

C#
public static readonly DependencyProperty GeoBoundsSEProperty

OpacityProperty

DependencyProperty

Identifies the Opacity Opacity dependency property.

C#
public static readonly DependencyProperty OpacityProperty

Properties

CommandBindingCollection

CommandBindingCollection

Gets collection of the command bindings.

C#
public CommandBindingCollection CommandBindingCollection { get; }

Gets collection of the commands supported by provider.

C#
public ObservableCollection<CommandDescription> Commands { get; }

Gets or sets region covered by map image.

C#
public LocationRect GeoBounds { get; set; }
Remarks:

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.

C#
public Location GeoBoundsNW { get; set; }
Remarks:

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.

C#
public Location GeoBoundsSE { get; set; }
Remarks:

You can't use this property to set bounds at the same time with GeoBounds property.

Gets dictionary of the available map sources.

C#
protected Dictionary<string, IMapSource> MapSources { get; }

Gets or sets the opacity factor.

C#
public double Opacity { get; set; }

Gets spatial reference of the current map source.

C#
public virtual ISpatialReference SpatialReference { get; }

Gets ids of the supported sources.

C#
public string[] SupportedSources { get; }

Methods

Apply map source modes.

C#
protected virtual string ApplySourceModes(string uniqueId)
Parameters:uniqueIdstring

Base source unique ID.

Returns:

string

Unique ID of the map source with applied modes.

Remarks:

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.

C#
protected override Freezable CreateInstanceCore()
Returns:

Freezable

The new instance.

Releases the resources used by the current instance of the MapProviderBase class.

C#
public void Dispose()

Implements: IDisposable.Dispose()

Called by the Dispose() and Finalize() methods to release the unmanaged resources used by the current instance of the MapProviderBase class.

C#
protected virtual void Dispose(bool disposing)
Parameters:disposingbool

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).

C#
public virtual Location GetValidatedGeoPoint(Location geoPoint)
Parameters:geoPointLocation

The proposed geographical point (longitude, latitude).

Returns:

Location

The closest valid geographical point (longitude, latitude).

Sets current map source to cloned provider.

C#
protected virtual void InheritCurrentSource(MapProviderBase clone)
Parameters:cloneMapProviderBase

Clone of tiled provider.

Sets necessary properties to cloned provider.

C#
protected virtual void InheritParameters(MapProviderBase clone)
Parameters:cloneMapProviderBase

Clone of tiled provider.

Called before map provider switch to another map source.

C#
protected virtual bool OnPreviewSourceChange(IMapSource source)
Parameters:sourceIMapSource

Map source which will be used.

Returns:

bool

Called after map provider switch to another map source.

C#
protected virtual void OnPreviewSourceChanged(IMapSource source)
Parameters:sourceIMapSource

Map source is used.

Register new set source command.

C#
protected void RegisterSetSourceCommand(Type sourceType, string text, DataTemplate dataTemplate, Uri imageUri, CanExecuteRoutedEventHandler canExecute, ExecutedRoutedEventHandler execute)
Parameters:sourceTypeType

Map source type.

textstring

Command text.

dataTemplateDataTemplate

Data template for command representation.

imageUriUri

URI of the image is used in the map source button data template.

canExecuteCanExecuteRoutedEventHandler

Can execute handler.

executeExecutedRoutedEventHandler

Execute handler.

Set state of the commands depends on the new map source.

C#
protected virtual void SetCommandState(string uniqueId)
Parameters:uniqueIdstring

Map source unique ID.

Force map provider to use specific map source.

C#
public void SetMapSource(string uniqueId)
Parameters:uniqueIdstring

Unique ID of the map source.

Set specific map source to clone of map provider.

C#
public virtual void SetMapSourceToClone(MapProviderBase clone, string uniqueId)
Parameters:cloneMapProviderBase

Clone of map provider.

uniqueIdstring

Id of map source.

Called when map source initialization faulted.

C#
protected void SourceInitializationFaulted(object sender, InitializationFaultEventArgs e)
Parameters:senderobject

Sender.

eInitializationFaultEventArgs

Event parameters.

Called when map source is changed for tile presenter and map source initialization completed.

C#
protected virtual void TilePresenterMapSourceChanged(object sender, SourceChangedEventArgs e)
Parameters:senderobject

Sender.

eSourceChangedEventArgs

Event parameters.

Attempts to get a map source from the registered map sources by provided source Id.

C#
public bool TryGetMapSource(string uniqueId, out IMapSource source)
Parameters:uniqueIdstring

The id of the map source.

sourceIMapSource

The result map source.

Returns:

bool

Events

Occurs when initialization of the one of the map sources is faulted.

C#
public event EventHandler<InitializationFaultEventArgs> InitializationFaulted

Event occurs when map source is actually changed.

C#
public event EventHandler<MapSourceChangedEventArgs> MapSourceChanged

Event occurs when spatial reference is ready to use.

C#
public event EventHandler SpatialReferenceChanged