BingRestMapProvider
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
Initializes a new instance of the BingRestMapProvider class.
public BingRestMapProvider()
Initializes a new instance of the BingRestMapProvider class.
public BingRestMapProvider(MapMode mode, BingTopLayer topLayer, string applicationId, bool useSession)
Map mode.
topLayerBingTopLayerBing top layer option.
applicationIdstringBing Maps Key.
useSessionboolValue which indicates whether Bing session should be used.
Initializes a new instance of the BingRestMapProvider class.
Initializes a new instance of the BingRestMapProvider class.
Fields
IsLabelVisibleProperty
DependencyProperty
Identifies the IsLabelVisible dependency property.
public static readonly DependencyProperty IsLabelVisibleProperty
ModeProperty
DependencyProperty
Identifies the Mode dependency property.
public static readonly DependencyProperty ModeProperty
TopLayerProperty
DependencyProperty
Identifies the TopLayer dependency property.
public static readonly DependencyProperty TopLayerProperty
UseSessionProperty
DependencyProperty
Identifies the UseSession dependency property.
public static readonly DependencyProperty UseSessionProperty
Properties
Gets or sets Bing application ID.
public string ApplicationId { get; set; }
Gets or sets value which indicates whether labels should be visible on the map.
public bool IsLabelVisible { get; set; }
Returns the SpatialReference for the map provider.
public override ISpatialReference SpatialReference { get; }
Overrides:
Gets or sets the top layer option of the Bing rest imagery service. Runtime change is not supported.
public BingTopLayer TopLayer { get; set; }
Gets or sets value which indicates whether Bing session should be used. Make sense during provider initialization only.
public bool UseSession { get; set; }
Methods
Apply map source modes.
protected override string ApplySourceModes(string uniqueId)
Base source unique ID.
Returns:Unique ID of the map source with applied modes.
Overrides:
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.
Builds a string URI based on the BingRestElevationRequest.
protected virtual Uri BuildElevationRequestUri(BingRestElevationRequest request)
Uri
Builds a string URI based on the BingRestRouteRequest.
protected virtual Uri BuildRoutingRequestUri(BingRestRouteRequest request)
Uri
Creates a string URI based on the BingRestSearchLocationRequest.
protected virtual Uri BuildSearchLocationRequestUri(BingRestSearchLocationRequest request)
Uri
Builds a JSON body based on the BingRestTruckRouteRequest
protected virtual string BuildTruckRouteRequestBody(BingRestTruckRouteRequest request)
The request to build the JSON for.
Returns:Builds a JSON body based on the BingRestVehicleSpec
protected virtual string BuildTruckRouteVehicleSpecsBody(BingRestVehicleSpec spec)
The vehicle spec.
Returns:Builds a string URI based on the BingRestTruckRouteRequest.
protected virtual Uri BuildTruckRoutingRequestUri(BingRestTruckRouteRequest request)
Uri
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.
public void CalculateElevationAsync(BingRestElevationRequest request)
Elevation request.
Implements:
Calculates the route specified by the BingRestRouteRequest.
public void CalculateRouteAsync(BingRestRouteRequest request)
Implements:
Calculates the truck route specified by the BingRestRouteRequest.
public void CalculateTruckRouteAsync(BingRestTruckRouteRequest request)
Implements:
Implements the ICloneable interface.
Called by the Dispose() and Finalize() methods to release the unmanaged resources used by the current instance of the BingRestMapProvider class.
protected override void Dispose(bool disposing)
True to release unmanaged and managed resources; false to release only unmanaged resources.
Overrides:
Called when calculation of elevation is completed.
protected virtual void OnCalculateElevationCompleted(BingRestElevationCompletedEventArgs e)
Called when calculation of elevation is completed.
protected virtual void OnCalculateElevationCompleted(object sender, DownloadStringCompletedEventArgs e)
Called when calculation of elevation returns error.
protected virtual void OnCalculateElevationError(BingRestCalculateElevationErrorEventArgs e)
Called when the calculation of route is completed.
protected virtual void OnCalculateRouteCompleted(BingRestRoutingCompletedEventArgs e)
Called when calculation of route is completed.
protected virtual void OnCalculateRouteCompleted(object sender, DownloadStringCompletedEventArgs e)
Called when the calculation of route produces an error.
protected virtual void OnCalculateRouteError(BingRestCalculateRouteErrorEventArgs e)
Called when the calculation of a truck route is completed.
protected virtual void OnCalculateTruckRouteCompleted(BingRestRoutingCompletedEventArgs e)
Called when calculation of route is completed.
protected virtual void OnCalculateTruckRouteCompleted(object sender, UploadStringCompletedEventArgs e)
Called when the calculation of a truck route results in an error.
protected virtual void OnCalculateTruckRouteError(BingRestCalculateRouteErrorEventArgs e)
Called before map provider switch to another map source.
protected override bool OnPreviewSourceChange(IMapSource source)
Map source which will be used.
Returns:Overrides:
Called after map provider switch to another map source.
protected override void OnPreviewSourceChanged(IMapSource source)
Map source is used.
Overrides:
Called when the search is completed.
protected virtual void OnSearchLocationCompleted(BingRestSearchLocationCompletedEventArgs e)
Called when search error occurs.
protected virtual void OnSearchLocationError(BingRestSearchLocationErrorEventArgs e)
Called when the services returns response from the received BingSearchLocationRequest.
protected virtual void OnSearchRequestCompleted(object sender, DownloadStringCompletedEventArgs e)
Registers new set source command.
public void RegisterSetSourceCommand(MapMode imagerySet, string text, DataTemplate dataTemplate = null, Uri imageUri = null)
MapMode type.
textstringCommand text.
dataTemplateDataTemplateData template for command representation.
imageUriUriURI of the image is used in the map source button data template.
Performs async search location request.
public void SearchLocationAsync(BingRestSearchLocationRequest request)
Search request.
Implements:
Set state of the commands depends on the new map source.
protected override void SetCommandState(string uniqueId)
Map source unique ID.
Overrides:
Set specific map source to clone of map provider.
public override void SetMapSourceToClone(MapProviderBase clone, string uniqueId)
Clone of map provider.
uniqueIdstringId of map source.
Overrides:
Called when map source is changed for tile presenter and map source initialization completed.
protected override void TilePresenterMapSourceChanged(object sender, SourceChangedEventArgs e)
Sender.
eSourceChangedEventArgsEvent parameters.
Overrides:
Events
Occurs when an elevation calculation request is completed and the result is ready.
public event EventHandler<BingRestElevationCompletedEventArgs> CalculateElevationCompleted
Implements:
Occurs when the request results in an error.
public event EventHandler<BingRestCalculateElevationErrorEventArgs> CalculateElevationError
Implements:
Occurs when a route calculation request is completed and the result is ready.
public event EventHandler<BingRestRoutingCompletedEventArgs> CalculateRouteCompleted
Implements:
Occurs when the request results in an error.
public event EventHandler<BingRestCalculateRouteErrorEventArgs> CalculateRouteError
Implements:
Occurs when a truck route calculation request is completed and the result is ready.
public event EventHandler<BingRestRoutingCompletedEventArgs> CalculateTruckRouteCompleted
Implements:
Occurs when the request results in an error.
public event EventHandler<BingRestCalculateRouteErrorEventArgs> CalculateTruckRouteError
Implements:
Event occurs when BingRestMapProvider completed search request.
public event EventHandler<BingRestSearchLocationCompletedEventArgs> SearchLocationCompleted
Implements:
Occurs when the request results in an error.
public event EventHandler<BingRestSearchLocationErrorEventArgs> SearchLocationError
Implements: