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.

Definition

Namespace:Telerik.Windows.Controls.Map

Assembly:Telerik.Windows.Controls.DataVisualization.dll

Syntax:

cs-api-definition
public class MapProviderBase : Freezable, IDisposable

Inheritance: objectMapProviderBase

Derived Classes: EmptyProviderImageProviderTiledProvider

Implements: IDisposable

Constructors

MapProviderBase()

Initializes a new instance of the MapProviderBase class.

Declaration

cs-api-definition
protected MapProviderBase()

Fields

GeoBoundsNWProperty

Identifies the GeoBoundsNW GeoBoundsNW dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GeoBoundsNWProperty

Field Value

DependencyProperty

GeoBoundsProperty

Identifies the GeoBounds GeoBounds dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GeoBoundsProperty

Field Value

DependencyProperty

GeoBoundsSEProperty

Identifies the GeoBoundsSE GeoBoundsSE dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GeoBoundsSEProperty

Field Value

DependencyProperty

OpacityProperty

Identifies the Opacity Opacity dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty OpacityProperty

Field Value

DependencyProperty

Properties

CommandBindingCollection

Gets collection of the command bindings.

Declaration

cs-api-definition
public CommandBindingCollection CommandBindingCollection { get; }

Property Value

CommandBindingCollection

Commands

Gets collection of the commands supported by provider.

Declaration

cs-api-definition
public ObservableCollection<CommandDescription> Commands { get; }

Property Value

ObservableCollection<CommandDescription>

GeoBounds

Gets or sets region covered by map image.

Declaration

cs-api-definition
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

cs-api-definition
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

cs-api-definition
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

cs-api-definition
protected Dictionary<string, IMapSource> MapSources { get; }

Property Value

Dictionary<string, IMapSource>

Opacity

Gets or sets the opacity factor.

Declaration

cs-api-definition
public double Opacity { get; set; }

Property Value

double

SpatialReference

Gets spatial reference of the current map source.

Declaration

cs-api-definition
public virtual ISpatialReference SpatialReference { get; }

Property Value

ISpatialReference

SupportedSources

Gets ids of the supported sources.

Declaration

cs-api-definition
public string[] SupportedSources { get; }

Property Value

string[]

Methods

ApplySourceModes(string)

Apply map source modes.

Declaration

cs-api-definition
protected virtual string ApplySourceModes(string uniqueId)

Parameters

uniqueId

string

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.

CreateInstanceCore()

When implemented in a derived class, creates a new instance of the Freezable derived class.

Declaration

cs-api-definition
protected override Freezable CreateInstanceCore()

Returns

Freezable

The new instance.

Dispose()

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

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

Dispose(bool)

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

Declaration

cs-api-definition
protected virtual void Dispose(bool disposing)

Parameters

disposing

bool

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

cs-api-definition
public virtual Location GetValidatedGeoPoint(Location geoPoint)

Parameters

geoPoint

Location

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

cs-api-definition
protected virtual void InheritCurrentSource(MapProviderBase clone)

Parameters

clone

MapProviderBase

Clone of tiled provider.

InheritParameters(MapProviderBase)

Sets necessary properties to cloned provider.

Declaration

cs-api-definition
protected virtual void InheritParameters(MapProviderBase clone)

Parameters

clone

MapProviderBase

Clone of tiled provider.

OnPreviewSourceChange(IMapSource)

Called before map provider switch to another map source.

Declaration

cs-api-definition
protected virtual bool OnPreviewSourceChange(IMapSource source)

Parameters

source

IMapSource

Map source which will be used.

Returns

bool

OnPreviewSourceChanged(IMapSource)

Called after map provider switch to another map source.

Declaration

cs-api-definition
protected virtual void OnPreviewSourceChanged(IMapSource source)

Parameters

source

IMapSource

Map source is used.

RegisterSetSourceCommand(Type, string, DataTemplate, Uri, CanExecuteRoutedEventHandler, ExecutedRoutedEventHandler)

Register new set source command.

Declaration

cs-api-definition
protected void RegisterSetSourceCommand(Type sourceType, string text, DataTemplate dataTemplate, Uri imageUri, CanExecuteRoutedEventHandler canExecute, ExecutedRoutedEventHandler execute)

Parameters

sourceType

Type

Map source type.

text

string

Command text.

dataTemplate

DataTemplate

Data template for command representation.

imageUri

Uri

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

canExecute

CanExecuteRoutedEventHandler

Can execute handler.

execute

ExecutedRoutedEventHandler

Execute handler.

SetCommandState(string)

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

Declaration

cs-api-definition
protected virtual void SetCommandState(string uniqueId)

Parameters

uniqueId

string

Map source unique ID.

SetMapSource(string)

Force map provider to use specific map source.

Declaration

cs-api-definition
public void SetMapSource(string uniqueId)

Parameters

uniqueId

string

Unique ID of the map source.

SetMapSourceToClone(MapProviderBase, string)

Set specific map source to clone of map provider.

Declaration

cs-api-definition
public virtual void SetMapSourceToClone(MapProviderBase clone, string uniqueId)

Parameters

clone

MapProviderBase

Clone of map provider.

uniqueId

string

Id of map source.

SourceInitializationFaulted(object, InitializationFaultEventArgs)

Called when map source initialization faulted.

Declaration

cs-api-definition
protected void SourceInitializationFaulted(object sender, InitializationFaultEventArgs e)

Parameters

sender

object

Sender.

e

InitializationFaultEventArgs

Event parameters.

TilePresenterMapSourceChanged(object, SourceChangedEventArgs)

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

Declaration

cs-api-definition
protected virtual void TilePresenterMapSourceChanged(object sender, SourceChangedEventArgs e)

Parameters

sender

object

Sender.

e

SourceChangedEventArgs

Event parameters.

TryGetMapSource(string, out IMapSource)

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

Declaration

cs-api-definition
public bool TryGetMapSource(string uniqueId, out IMapSource source)

Parameters

uniqueId

string

The id of the map source.

source

IMapSource

The result map source.

Returns

bool

Events

InitializationFaulted

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

Declaration

cs-api-definition
public event EventHandler<InitializationFaultEventArgs> InitializationFaulted

Event Value

EventHandler<InitializationFaultEventArgs>

MapSourceChanged

Event occurs when map source is actually changed.

Declaration

cs-api-definition
public event EventHandler<MapSourceChangedEventArgs> MapSourceChanged

Event Value

EventHandler<MapSourceChangedEventArgs>

SpatialReferenceChanged

Event occurs when spatial reference is ready to use.

Declaration

cs-api-definition
public event EventHandler SpatialReferenceChanged

Event Value

EventHandler