Class BingRestMapProvider
Represents the Bing REST Map Provider class.
Inherited Members
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
SpatialReference
Returns the SpatialReference for the map provider.
Declaration
public override ISpatialReference SpatialReference { get; }
Property Value
ISpatialReference
|
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
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
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
CalculateRouteAsync(BingRestRouteRequest)
Calculates the route specified by the BingRestRouteRequest.
Declaration
public void CalculateRouteAsync(BingRestRouteRequest request)
Parameters
BingRestRouteRequest
request
|
Implements
CalculateTruckRouteAsync(BingRestTruckRouteRequest)
Calculates the truck route specified by the BingRestRouteRequest.
Declaration
public void CalculateTruckRouteAsync(BingRestTruckRouteRequest request)
Parameters
BingRestTruckRouteRequest
request
|
Implements
Clone()
Implements the ICloneable interface.
Declaration
public object Clone()
Returns
System.Object
Cloned object. |
Implements
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
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
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
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
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
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
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
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
CalculateElevationError
Occurs when the request results in an error.
Declaration
public event EventHandler<BingRestCalculateElevationErrorEventArgs> CalculateElevationError
Event Type
System.EventHandler<BingRestCalculateElevationErrorEventArgs>
|
Implements
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
CalculateRouteError
Occurs when the request results in an error.
Declaration
public event EventHandler<BingRestCalculateRouteErrorEventArgs> CalculateRouteError
Event Type
System.EventHandler<BingRestCalculateRouteErrorEventArgs>
|
Implements
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
CalculateTruckRouteError
Occurs when the request results in an error.
Declaration
public event EventHandler<BingRestCalculateRouteErrorEventArgs> CalculateTruckRouteError
Event Type
System.EventHandler<BingRestCalculateRouteErrorEventArgs>
|
Implements
SearchLocationCompleted
Event occurs when BingRestMapProvider completed search request.
Declaration
public event EventHandler<BingRestSearchLocationCompletedEventArgs> SearchLocationCompleted
Event Type
System.EventHandler<BingRestSearchLocationCompletedEventArgs>
|
Implements
SearchLocationError
Occurs when the request results in an error.
Declaration
public event EventHandler<BingRestSearchLocationErrorEventArgs> SearchLocationError
Event Type
System.EventHandler<BingRestSearchLocationErrorEventArgs>
|