skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI UI for Xamarin

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility and Security
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class BingRestMapProvider

Represents the Bing REST Map Provider class.

Inheritance
System.Object
MapProviderBase
TiledProvider
BingRestMapProvider
Inherited Members
TiledProvider.IsTileCachingEnabledProperty
TiledProvider.CacheStorageProperty
TiledProvider.RequestCacheLevelProperty
TiledProvider.RequestCredentialsProperty
TiledProvider.IsTileCachingEnabledChanged(Boolean, Boolean)
TiledProvider.CacheStorageChanged()
TiledProvider.RequestCacheLevelChanged()
TiledProvider.RequestCredentialsChanged()
TiledProvider.InheritParameters(MapProviderBase)
TiledProvider.InheritCacheStorage(TiledMapSource)
TiledProvider.OnIsTileCachingEnabledChanged(Boolean, Boolean)
TiledProvider.InheritRequestCacheLevel(TiledMapSource)
TiledProvider.InheritRequestCredentials(TiledMapSource)
TiledProvider.IsTileCachingEnabled
TiledProvider.CacheStorage
TiledProvider.RequestCacheLevel
TiledProvider.RequestCredentials
MapProviderBase.GeoBoundsProperty
MapProviderBase.GeoBoundsNWProperty
MapProviderBase.GeoBoundsSEProperty
MapProviderBase.OpacityProperty
MapProviderBase.Dispose()
MapProviderBase.GetValidatedGeoPoint(Location)
MapProviderBase.SetMapSource(String)
MapProviderBase.TryGetMapSource(String, IMapSource)
MapProviderBase.CreateInstanceCore()
MapProviderBase.InheritCurrentSource(MapProviderBase)
MapProviderBase.RegisterSetSourceCommand(Type, String, DataTemplate, Uri, CanExecuteRoutedEventHandler, ExecutedRoutedEventHandler)
MapProviderBase.SourceInitializationFaulted(Object, InitializationFaultEventArgs)
MapProviderBase.CommandBindingCollection
MapProviderBase.Commands
MapProviderBase.GeoBounds
MapProviderBase.GeoBoundsNW
MapProviderBase.GeoBoundsSE
MapProviderBase.Opacity
MapProviderBase.SupportedSources
MapProviderBase.MapSources
MapProviderBase.InitializationFaulted
MapProviderBase.MapSourceChanged
MapProviderBase.SpatialReferenceChanged
Namespace: Telerik.Windows.Controls.Map
Assembly: Telerik.Windows.Controls.DataVisualization.dll

Syntax

public class BingRestMapProvider : TiledProvider, IDisposable, IBingRestSearchLocationProvider, IBingRestRouteProvider, IBingRestTruckRouteProvider, IBingRestElevationProvider, ICloneable

Constructors

BingRestMapProvider()

Initializes a new instance of the BingRestMapProvider class.

Declaration
public BingRestMapProvider()

BingRestMapProvider(String)

Initializes a new instance of the BingRestMapProvider class.

Declaration
public BingRestMapProvider(string applicationId)
Parameters
System.String applicationId

Bing Maps Key.

BingRestMapProvider(MapMode, Boolean, String)

Initializes a new instance of the BingRestMapProvider class.

Declaration
public BingRestMapProvider(MapMode mode, bool labelVisible, string applicationId)
Parameters
MapMode mode

Map mode.

System.Boolean labelVisible

Is labels visible.

System.String applicationId

Bing Maps Key.

BingRestMapProvider(MapMode, Boolean, String, Boolean)

Initializes a new instance of the BingRestMapProvider class.

Declaration
public BingRestMapProvider(MapMode mode, bool labelVisible, string applicationId, bool useSession)
Parameters
MapMode mode

Map mode.

System.Boolean labelVisible

Is labels visible.

System.String applicationId

Bing Maps Key.

System.Boolean useSession

Value which indicates whether Bing session should be used.

BingRestMapProvider(MapMode, BingTopLayer, String, Boolean)

Initializes a new instance of the BingRestMapProvider class.

Declaration
public BingRestMapProvider(MapMode mode, BingTopLayer topLayer, string applicationId, bool useSession)
Parameters
MapMode mode

Map mode.

BingTopLayer topLayer

Bing top layer option.

System.String applicationId

Bing Maps Key.

System.Boolean useSession

Value which indicates whether Bing session should be used.

Fields

IsLabelVisibleProperty

Identifies the IsLabelVisible dependency property.

Declaration
public static readonly DependencyProperty IsLabelVisibleProperty
Field Value
System.Windows.DependencyProperty

ModeProperty

Identifies the Mode dependency property.

Declaration
public static readonly DependencyProperty ModeProperty
Field Value
System.Windows.DependencyProperty

TopLayerProperty

Identifies the TopLayer dependency property.

Declaration
public static readonly DependencyProperty TopLayerProperty
Field Value
System.Windows.DependencyProperty

UseSessionProperty

Identifies the UseSession dependency property.

Declaration
public static readonly DependencyProperty UseSessionProperty
Field Value
System.Windows.DependencyProperty

Properties

ApplicationId

Gets or sets Bing application ID.

Declaration
public string ApplicationId { get; set; }
Property Value
System.String

IsLabelVisible

Gets or sets value which indicates whether labels should be visible on the map.

Declaration
public bool IsLabelVisible { get; set; }
Property Value
System.Boolean

Mode

Gets or sets map mode.

Declaration
public MapMode Mode { get; set; }
Property Value
MapMode

SpatialReference

Returns the SpatialReference for the map provider.

Declaration
public override ISpatialReference SpatialReference { get; }
Property Value
ISpatialReference

Overrides
MapProviderBase.SpatialReference

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
BingTopLayer

UseSession

Gets or sets value which indicates whether Bing session should be used. Make sense during provider initialization only.

Declaration
public bool UseSession { get; set; }
Property Value
System.Boolean

Methods

ApplySourceModes(String)

Apply map source modes.

Declaration
protected override string ApplySourceModes(string uniqueId)
Parameters
System.String uniqueId

Base source unique ID.

Returns
System.String

Unique ID of the map source with applied modes.

Overrides
MapProviderBase.ApplySourceModes(String)
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
BingRestElevationRequest request

Returns
System.Uri

BuildRoutingRequestUri(BingRestRouteRequest)

Builds a string URI based on the BingRestRouteRequest.

Declaration
protected virtual Uri BuildRoutingRequestUri(BingRestRouteRequest request)
Parameters
BingRestRouteRequest request

Returns
System.Uri

BuildSearchLocationRequestUri(BingRestSearchLocationRequest)

Creates a string URI based on the BingRestSearchLocationRequest.

Declaration
protected virtual Uri BuildSearchLocationRequestUri(BingRestSearchLocationRequest request)
Parameters
BingRestSearchLocationRequest request

Returns
System.Uri

BuildTruckRouteRequestBody(BingRestTruckRouteRequest)

Builds a JSON body based on the BingRestTruckRouteRequest

Declaration
protected virtual string BuildTruckRouteRequestBody(BingRestTruckRouteRequest request)
Parameters
BingRestTruckRouteRequest request

The request to build the JSON for.

Returns
System.String

BuildTruckRouteVehicleSpecsBody(BingRestVehicleSpec)

Builds a JSON body based on the BingRestVehicleSpec

Declaration
protected virtual string BuildTruckRouteVehicleSpecsBody(BingRestVehicleSpec spec)
Parameters
BingRestVehicleSpec spec

The vehicle spec.

Returns
System.String

BuildTruckRoutingRequestUri(BingRestTruckRouteRequest)

Builds a string URI based on the BingRestTruckRouteRequest.

Declaration
protected virtual Uri BuildTruckRoutingRequestUri(BingRestTruckRouteRequest request)
Parameters
BingRestTruckRouteRequest request

Returns
System.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
BingRestElevationRequest request

Elevation request.

Implements
IBingRestElevationProvider.CalculateElevationAsync(BingRestElevationRequest)

CalculateRouteAsync(BingRestRouteRequest)

Calculates the route specified by the BingRestRouteRequest.

Declaration
public void CalculateRouteAsync(BingRestRouteRequest request)
Parameters
BingRestRouteRequest request

Implements
IBingRestRouteProvider.CalculateRouteAsync(BingRestRouteRequest)

CalculateTruckRouteAsync(BingRestTruckRouteRequest)

Calculates the truck route specified by the BingRestRouteRequest.

Declaration
public void CalculateTruckRouteAsync(BingRestTruckRouteRequest request)
Parameters
BingRestTruckRouteRequest request

Implements
IBingRestTruckRouteProvider.CalculateTruckRouteAsync(BingRestTruckRouteRequest)

Clone()

Implements the ICloneable interface.

Declaration
public object Clone()
Returns
System.Object

Cloned object.

Dispose(Boolean)

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
System.Boolean disposing

True to release unmanaged and managed resources; false to release only unmanaged resources.

Overrides
MapProviderBase.Dispose(Boolean)

GetPointsString(List<Location>)

Builds locations string used in the service request.

Declaration
protected virtual string GetPointsString(List<Location> points)
Parameters
System.Collections.Generic.List<Location> points

Returns
System.String

OnCalculateElevationCompleted(Object, DownloadStringCompletedEventArgs)

Called when calculation of elevation is completed.

Declaration
protected virtual void OnCalculateElevationCompleted(object sender, DownloadStringCompletedEventArgs e)
Parameters
System.Object sender

System.Net.DownloadStringCompletedEventArgs e

OnCalculateElevationCompleted(BingRestElevationCompletedEventArgs)

Called when calculation of elevation is completed.

Declaration
protected virtual void OnCalculateElevationCompleted(BingRestElevationCompletedEventArgs e)
Parameters
BingRestElevationCompletedEventArgs e

OnCalculateElevationError(BingRestCalculateElevationErrorEventArgs)

Called when calculation of elevation returns error.

Declaration
protected virtual void OnCalculateElevationError(BingRestCalculateElevationErrorEventArgs e)
Parameters
BingRestCalculateElevationErrorEventArgs e

OnCalculateRouteCompleted(Object, DownloadStringCompletedEventArgs)

Called when calculation of route is completed.

Declaration
protected virtual void OnCalculateRouteCompleted(object sender, DownloadStringCompletedEventArgs e)
Parameters
System.Object sender

System.Net.DownloadStringCompletedEventArgs e

OnCalculateRouteCompleted(BingRestRoutingCompletedEventArgs)

Called when the calculation of route is completed.

Declaration
protected virtual void OnCalculateRouteCompleted(BingRestRoutingCompletedEventArgs e)
Parameters
BingRestRoutingCompletedEventArgs e

OnCalculateRouteError(BingRestCalculateRouteErrorEventArgs)

Called when the calculation of route produces an error.

Declaration
protected virtual void OnCalculateRouteError(BingRestCalculateRouteErrorEventArgs e)
Parameters
BingRestCalculateRouteErrorEventArgs e

OnCalculateTruckRouteCompleted(Object, UploadStringCompletedEventArgs)

Called when calculation of route is completed.

Declaration
protected virtual void OnCalculateTruckRouteCompleted(object sender, UploadStringCompletedEventArgs e)
Parameters
System.Object sender

System.Net.UploadStringCompletedEventArgs e

OnCalculateTruckRouteCompleted(BingRestRoutingCompletedEventArgs)

Called when the calculation of a truck route is completed.

Declaration
protected virtual void OnCalculateTruckRouteCompleted(BingRestRoutingCompletedEventArgs e)
Parameters
BingRestRoutingCompletedEventArgs e

OnCalculateTruckRouteError(BingRestCalculateRouteErrorEventArgs)

Called when the calculation of a truck route results in an error.

Declaration
protected virtual void OnCalculateTruckRouteError(BingRestCalculateRouteErrorEventArgs e)
Parameters
BingRestCalculateRouteErrorEventArgs e

OnPreviewSourceChange(IMapSource)

Called before map provider switch to another map source.

Declaration
protected override bool OnPreviewSourceChange(IMapSource source)
Parameters
IMapSource source

Map source which will be used.

Returns
System.Boolean

Overrides
MapProviderBase.OnPreviewSourceChange(IMapSource)

OnPreviewSourceChanged(IMapSource)

Called after map provider switch to another map source.

Declaration
protected override void OnPreviewSourceChanged(IMapSource source)
Parameters
IMapSource source

Map source is used.

Overrides
MapProviderBase.OnPreviewSourceChanged(IMapSource)

OnSearchLocationCompleted(BingRestSearchLocationCompletedEventArgs)

Called when the search is completed.

Declaration
protected virtual void OnSearchLocationCompleted(BingRestSearchLocationCompletedEventArgs e)
Parameters
BingRestSearchLocationCompletedEventArgs e

OnSearchLocationError(BingRestSearchLocationErrorEventArgs)

Called when search error occurs.

Declaration
protected virtual void OnSearchLocationError(BingRestSearchLocationErrorEventArgs e)
Parameters
BingRestSearchLocationErrorEventArgs e

OnSearchRequestCompleted(Object, DownloadStringCompletedEventArgs)

Called when the services returns response from the received BingSearchLocationRequest.

Declaration
protected virtual void OnSearchRequestCompleted(object sender, DownloadStringCompletedEventArgs e)
Parameters
System.Object sender

System.Net.DownloadStringCompletedEventArgs 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
MapMode imagerySet

MapMode type.

System.String text

Command text.

System.Windows.DataTemplate dataTemplate

Data template for command representation.

System.Uri imageUri

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
BingRestSearchLocationRequest request

Search request.

Implements
IBingRestSearchLocationProvider.SearchLocationAsync(BingRestSearchLocationRequest)

SetCommandState(String)

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

Declaration
protected override void SetCommandState(string uniqueId)
Parameters
System.String uniqueId

Map source unique ID.

Overrides
MapProviderBase.SetCommandState(String)

SetMapSourceToClone(MapProviderBase, String)

Set specific map source to clone of map provider.

Declaration
public override void SetMapSourceToClone(MapProviderBase clone, string uniqueId)
Parameters
MapProviderBase clone

Clone of map provider.

System.String uniqueId

Id of map source.

Overrides
MapProviderBase.SetMapSourceToClone(MapProviderBase, String)

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
System.Object sender

Sender.

SourceChangedEventArgs e

Event parameters.

Overrides
MapProviderBase.TilePresenterMapSourceChanged(Object, SourceChangedEventArgs)

Events

CalculateElevationCompleted

Occurs when an elevation calculation request is completed and the result is ready.

Declaration
public event EventHandler<BingRestElevationCompletedEventArgs> CalculateElevationCompleted
Event Type
System.EventHandler<BingRestElevationCompletedEventArgs>

Implements
IBingRestElevationProvider.CalculateElevationCompleted

CalculateElevationError

Occurs when the request results in an error.

Declaration
public event EventHandler<BingRestCalculateElevationErrorEventArgs> CalculateElevationError
Event Type
System.EventHandler<BingRestCalculateElevationErrorEventArgs>

Implements
IBingRestElevationProvider.CalculateElevationError

CalculateRouteCompleted

Occurs when a route calculation request is completed and the result is ready.

Declaration
public event EventHandler<BingRestRoutingCompletedEventArgs> CalculateRouteCompleted
Event Type
System.EventHandler<BingRestRoutingCompletedEventArgs>

Implements
IBingRestRouteProvider.CalculateRouteCompleted

CalculateRouteError

Occurs when the request results in an error.

Declaration
public event EventHandler<BingRestCalculateRouteErrorEventArgs> CalculateRouteError
Event Type
System.EventHandler<BingRestCalculateRouteErrorEventArgs>

Implements
IBingRestRouteProvider.CalculateRouteError

CalculateTruckRouteCompleted

Occurs when a truck route calculation request is completed and the result is ready.

Declaration
public event EventHandler<BingRestRoutingCompletedEventArgs> CalculateTruckRouteCompleted
Event Type
System.EventHandler<BingRestRoutingCompletedEventArgs>

Implements
IBingRestTruckRouteProvider.CalculateTruckRouteCompleted

CalculateTruckRouteError

Occurs when the request results in an error.

Declaration
public event EventHandler<BingRestCalculateRouteErrorEventArgs> CalculateTruckRouteError
Event Type
System.EventHandler<BingRestCalculateRouteErrorEventArgs>

Implements
IBingRestTruckRouteProvider.CalculateTruckRouteError

SearchLocationCompleted

Event occurs when BingRestMapProvider completed search request.

Declaration
public event EventHandler<BingRestSearchLocationCompletedEventArgs> SearchLocationCompleted
Event Type
System.EventHandler<BingRestSearchLocationCompletedEventArgs>

Implements
IBingRestSearchLocationProvider.SearchLocationCompleted

SearchLocationError

Occurs when the request results in an error.

Declaration
public event EventHandler<BingRestSearchLocationErrorEventArgs> SearchLocationError
Event Type
System.EventHandler<BingRestSearchLocationErrorEventArgs>

Implements
IBingRestSearchLocationProvider.SearchLocationError

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.