ClassBingRestMapProvider
Represents the Bing REST Map Provider class.
Definition
Namespace:Telerik.Windows.Controls.Map
Assembly:Telerik.Windows.Controls.DataVisualization.dll
Syntax:
[Obsolete("This class is obsolete and will be deleted in Q2 2026.")]
public class BingRestMapProvider : TiledProvider, IDisposable, IBingRestSearchLocationProvider, IBingRestRouteProvider, IBingRestTruckRouteProvider, IBingRestElevationProvider, ICloneable
Inheritance: objectMapProviderBaseTiledProviderBingRestMapProvider
Implements:
Inherited Members
Constructors
BingRestMapProvider()
Initializes a new instance of the BingRestMapProvider class.
Declaration
public BingRestMapProvider()
BingRestMapProvider(MapMode, BingTopLayer, string, bool)
Initializes a new instance of the BingRestMapProvider class.
Declaration
public BingRestMapProvider(MapMode mode, BingTopLayer topLayer, string applicationId, bool useSession)
Parameters
mode
Map mode.
topLayer
Bing top layer option.
applicationId
Bing Maps Key.
useSession
Value which indicates whether Bing session should be used.
BingRestMapProvider(MapMode, bool, string)
Initializes a new instance of the BingRestMapProvider class.
BingRestMapProvider(MapMode, bool, string, bool)
Initializes a new instance of the BingRestMapProvider class.
Declaration
public BingRestMapProvider(MapMode mode, bool labelVisible, string applicationId, bool useSession)
Parameters
mode
Map mode.
labelVisible
Is labels visible.
applicationId
Bing Maps Key.
useSession
Value which indicates whether Bing session should be used.
BingRestMapProvider(string)
Initializes a new instance of the BingRestMapProvider class.
Declaration
public BingRestMapProvider(string applicationId)
Parameters
applicationId
Bing Maps Key.
Fields
IsLabelVisibleProperty
Identifies the IsLabelVisible dependency property.
Declaration
public static readonly DependencyProperty IsLabelVisibleProperty
Field Value
DependencyProperty
ModeProperty
Identifies the Mode dependency property.
Declaration
public static readonly DependencyProperty ModeProperty
Field Value
DependencyProperty
TopLayerProperty
Identifies the TopLayer dependency property.
Declaration
public static readonly DependencyProperty TopLayerProperty
Field Value
DependencyProperty
UseSessionProperty
Identifies the UseSession dependency property.
Declaration
public static readonly DependencyProperty UseSessionProperty
Field Value
DependencyProperty
Properties
ApplicationId
Gets or sets Bing application ID.
IsLabelVisible
Gets or sets value which indicates whether labels should be visible on the map.
Mode
Gets or sets map mode.
SpatialReference
Returns the SpatialReference for the map provider.
Declaration
public override ISpatialReference SpatialReference { get; }
Property Value
Overrides
TopLayer
Gets or sets the top layer option of the Bing rest imagery service. Runtime change is not supported.
Declaration
public BingTopLayer TopLayer { get; set; }
Property Value
UseSession
Gets or sets value which indicates whether Bing session should be used. Make sense during provider initialization only.
Methods
ApplySourceModes(string)
Apply map source modes.
Declaration
protected override string ApplySourceModes(string uniqueId)
Parameters
uniqueId
Base source unique ID.
Returns
Unique ID of the map source with applied modes.
Overrides
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.
BuildElevationRequestUri(BingRestElevationRequest)
Builds a string URI based on the BingRestElevationRequest.
Declaration
protected virtual Uri BuildElevationRequestUri(BingRestElevationRequest request)
Parameters
request
Returns
Uri
BuildRoutingRequestUri(BingRestRouteRequest)
Builds a string URI based on the BingRestRouteRequest.
Declaration
protected virtual Uri BuildRoutingRequestUri(BingRestRouteRequest request)
Parameters
request
Returns
Uri
BuildSearchLocationRequestUri(BingRestSearchLocationRequest)
Creates a string URI based on the BingRestSearchLocationRequest.
Declaration
protected virtual Uri BuildSearchLocationRequestUri(BingRestSearchLocationRequest request)
Parameters
request
Returns
Uri
BuildTruckRouteRequestBody(BingRestTruckRouteRequest)
Builds a JSON body based on the BingRestTruckRouteRequest
Declaration
protected virtual string BuildTruckRouteRequestBody(BingRestTruckRouteRequest request)
Parameters
request
The request to build the JSON for.
Returns
BuildTruckRouteVehicleSpecsBody(BingRestVehicleSpec)
Builds a JSON body based on the BingRestVehicleSpec
Declaration
protected virtual string BuildTruckRouteVehicleSpecsBody(BingRestVehicleSpec spec)
Parameters
spec
The vehicle spec.
Returns
BuildTruckRoutingRequestUri(BingRestTruckRouteRequest)
Builds a string URI based on the BingRestTruckRouteRequest.
Declaration
protected virtual Uri BuildTruckRoutingRequestUri(BingRestTruckRouteRequest request)
Parameters
request
Returns
Uri
CalculateElevationAsync(BingRestElevationRequest)
Performs async elevation request. Calculates elevation for given list of latitude and longitude pairs. Alternatively can calculate the elevation of equally spaced points along a polyline.
Declaration
public void CalculateElevationAsync(BingRestElevationRequest request)
Parameters
request
Elevation request.
Implements
CalculateRouteAsync(BingRestRouteRequest)
Calculates the route specified by the BingRestRouteRequest.
Declaration
public void CalculateRouteAsync(BingRestRouteRequest request)
Parameters
request
Implements
CalculateTruckRouteAsync(BingRestTruckRouteRequest)
Calculates the truck route specified by the BingRestRouteRequest.
Declaration
public void CalculateTruckRouteAsync(BingRestTruckRouteRequest request)
Parameters
request
Implements
Clone()
Implements the ICloneable interface.
Dispose(bool)
Called by the Dispose() and Finalize() methods to release the unmanaged resources used by the current instance of the BingRestMapProvider class.
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
True to release unmanaged and managed resources; false to release only unmanaged resources.
Overrides
GetPointsString(List<Location>)
Builds locations string used in the service request.
OnCalculateElevationCompleted(BingRestElevationCompletedEventArgs)
Called when calculation of elevation is completed.
Declaration
protected virtual void OnCalculateElevationCompleted(BingRestElevationCompletedEventArgs e)
Parameters
e
OnCalculateElevationCompleted(object, DownloadStringCompletedEventArgs)
Called when calculation of elevation is completed.
Declaration
protected virtual void OnCalculateElevationCompleted(object sender, DownloadStringCompletedEventArgs e)
Parameters
sender
e
OnCalculateElevationError(BingRestCalculateElevationErrorEventArgs)
Called when calculation of elevation returns error.
Declaration
protected virtual void OnCalculateElevationError(BingRestCalculateElevationErrorEventArgs e)
Parameters
e
OnCalculateRouteCompleted(BingRestRoutingCompletedEventArgs)
Called when the calculation of route is completed.
Declaration
protected virtual void OnCalculateRouteCompleted(BingRestRoutingCompletedEventArgs e)
Parameters
e
OnCalculateRouteCompleted(object, DownloadStringCompletedEventArgs)
Called when calculation of route is completed.
Declaration
protected virtual void OnCalculateRouteCompleted(object sender, DownloadStringCompletedEventArgs e)
Parameters
sender
e
OnCalculateRouteError(BingRestCalculateRouteErrorEventArgs)
Called when the calculation of route produces an error.
Declaration
protected virtual void OnCalculateRouteError(BingRestCalculateRouteErrorEventArgs e)
Parameters
e
OnCalculateTruckRouteCompleted(BingRestRoutingCompletedEventArgs)
Called when the calculation of a truck route is completed.
Declaration
protected virtual void OnCalculateTruckRouteCompleted(BingRestRoutingCompletedEventArgs e)
Parameters
e
OnCalculateTruckRouteCompleted(object, UploadStringCompletedEventArgs)
Called when calculation of route is completed.
Declaration
protected virtual void OnCalculateTruckRouteCompleted(object sender, UploadStringCompletedEventArgs e)
Parameters
sender
e
OnCalculateTruckRouteError(BingRestCalculateRouteErrorEventArgs)
Called when the calculation of a truck route results in an error.
Declaration
protected virtual void OnCalculateTruckRouteError(BingRestCalculateRouteErrorEventArgs e)
Parameters
e
OnPreviewSourceChange(IMapSource)
Called before map provider switch to another map source.
Declaration
protected override bool OnPreviewSourceChange(IMapSource source)
Parameters
source
Map source which will be used.
Returns
Overrides
OnPreviewSourceChanged(IMapSource)
Called after map provider switch to another map source.
Declaration
protected override void OnPreviewSourceChanged(IMapSource source)
Parameters
source
Map source is used.
Overrides
OnSearchLocationCompleted(BingRestSearchLocationCompletedEventArgs)
Called when the search is completed.
Declaration
protected virtual void OnSearchLocationCompleted(BingRestSearchLocationCompletedEventArgs e)
Parameters
e
OnSearchLocationError(BingRestSearchLocationErrorEventArgs)
Called when search error occurs.
Declaration
protected virtual void OnSearchLocationError(BingRestSearchLocationErrorEventArgs e)
Parameters
e
OnSearchRequestCompleted(object, DownloadStringCompletedEventArgs)
Called when the services returns response from the received BingSearchLocationRequest.
Declaration
protected virtual void OnSearchRequestCompleted(object sender, DownloadStringCompletedEventArgs e)
Parameters
sender
e
RegisterSetSourceCommand(MapMode, string, DataTemplate, Uri)
Registers new set source command.
Declaration
public void RegisterSetSourceCommand(MapMode imagerySet, string text, DataTemplate dataTemplate = null, Uri imageUri = null)
Parameters
imagerySet
MapMode type.
text
Command text.
dataTemplate
DataTemplate
Data template for command representation.
imageUri
Uri
URI of the image is used in the map source button data template.
SearchLocationAsync(BingRestSearchLocationRequest)
Performs async search location request.
Declaration
public void SearchLocationAsync(BingRestSearchLocationRequest request)
Parameters
request
Search request.
Implements
SetCommandState(string)
Set state of the commands depends on the new map source.
Declaration
protected override void SetCommandState(string uniqueId)
Parameters
uniqueId
Map source unique ID.
Overrides
SetMapSourceToClone(MapProviderBase, string)
Set specific map source to clone of map provider.
Declaration
public override void SetMapSourceToClone(MapProviderBase clone, string uniqueId)
Parameters
clone
Clone of map provider.
uniqueId
Id of map source.
Overrides
TilePresenterMapSourceChanged(object, SourceChangedEventArgs)
Called when map source is changed for tile presenter and map source initialization completed.
Declaration
protected override void TilePresenterMapSourceChanged(object sender, SourceChangedEventArgs e)
Parameters
sender
Sender.
e
Event parameters.
Overrides
Events
CalculateElevationCompleted
Occurs when an elevation calculation request is completed and the result is ready.
Declaration
public event EventHandler<BingRestElevationCompletedEventArgs> CalculateElevationCompleted
Event Value
Implements
CalculateElevationError
Occurs when the request results in an error.
Declaration
public event EventHandler<BingRestCalculateElevationErrorEventArgs> CalculateElevationError
Event Value
Implements
CalculateRouteCompleted
Occurs when a route calculation request is completed and the result is ready.
Declaration
public event EventHandler<BingRestRoutingCompletedEventArgs> CalculateRouteCompleted
Event Value
Implements
CalculateRouteError
Occurs when the request results in an error.
Declaration
public event EventHandler<BingRestCalculateRouteErrorEventArgs> CalculateRouteError
Event Value
Implements
CalculateTruckRouteCompleted
Occurs when a truck route calculation request is completed and the result is ready.
Declaration
public event EventHandler<BingRestRoutingCompletedEventArgs> CalculateTruckRouteCompleted
Event Value
Implements
CalculateTruckRouteError
Occurs when the request results in an error.
Declaration
public event EventHandler<BingRestCalculateRouteErrorEventArgs> CalculateTruckRouteError
Event Value
Implements
SearchLocationCompleted
Event occurs when BingRestMapProvider completed search request.
Declaration
public event EventHandler<BingRestSearchLocationCompletedEventArgs> SearchLocationCompleted
Event Value
Implements
SearchLocationError
Occurs when the request results in an error.
Declaration
public event EventHandler<BingRestSearchLocationErrorEventArgs> SearchLocationError
Event Value
Implements