AzureMapProvider
Provides map tiles and search functionality using Microsoft Azure Maps services with configurable tile sets, caching, and localization support.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.RadMap.dll
Syntax:
public class AzureMapProvider : IMapTileProvider, IMapProvider, ICloneable, IAzureMapSearchProvider, IMapBaseSearchProvider
Inheritance: objectAzureMapProvider
Implements:
Constructors
Initializes a new instance of the AzureMapProvider class with default settings and configures the Azure tile downloader.
public AzureMapProvider()
Fields
protected Dictionary<string, List<TileInfo>> cacheLoadReference
protected Dictionary<string, TileInfo> tileMatrix
Properties
Gets or sets the Azure Maps subscription key used for API authentication and service access.
public string AzureAPIKey { get; set; }
The azure map key.
Gets or sets the Azure Maps REST API version string used for service requests and feature compatibility.
public string AzureAPIVersion { get; set; }
The azure map API version.
Gets or sets the cache provider instance used for storing and retrieving map tiles from local storage.
public IMapCacheProvider CacheProvider { get; set; }
Implements:
Gets or sets a value indicating whether tile caching is enabled for storing downloaded tiles locally to improve performance.
public bool EnableCaching { get; set; }
Implements:
Gets the unique identifier for this Azure Maps provider instance.
public string Id { get; }
Implements:
Gets or sets a value indicating whether this AzureMapProvider has completed initialization and is ready for use.
public bool Initialized { get; protected set; }
true if initialized; otherwise, false.
Gets or sets a value indicating whether this AzureMapProvider is currently performing initialization operations.
public bool Initializing { get; protected set; }
true if initializing; otherwise, false.
Gets or sets the culture information used for localizing Azure Maps tiles, search results, and service responses.
public CultureInfo LanguageCulture { get; set; }
The language culture for map tiles and search results.
Gets or sets the maximum zoom level supported by this Azure Maps provider for tile requests and map display.
public int MaxZoomLevel { get; set; }
Implements:
Gets or sets the minimum zoom level supported by this Azure Maps provider for tile requests and map display.
public int MinZoomLevel { get; set; }
Implements:
Gets the settings that control tile rendering behavior.
public MapTileProviderSettings Settings { get; }
Implements:
Gets or sets the tile downloader instance responsible for asynchronously downloading map tiles from Azure Maps service.
public IMapTileDownloader TileDownloader { get; set; }
Implements:
Gets or sets the Azure Maps tile set type that determines the visual style and content of map tiles.
public AzureTileSet TileSetID { get; set; }
Methods
Constructs the Azure Maps search request URI based on the search request parameters and selected search mode.
protected virtual Uri BuildAzureSearchRequestUri(AzureSearchRequest request)
The Azure search request containing query parameters and search options.
Returns:The complete URI for the Azure Maps search API request.
Creates a deep copy of this AzureMapProvider instance with all configuration settings and state information.
public object Clone()
A new AzureMapProvider object that is a copy of this instance.
Implements:
Generates a unique cache key string for storing and retrieving tile images based on coordinates, zoom level, and tile set identifier.
Generates map visual elements for the specified viewport by converting cached tile images into renderable map tile elements.
public IEnumerable<MapVisualElement> GetContent(IMapViewport viewport)
The map viewport defining the visible area and zoom level.
Returns:IEnumerable<MapVisualElement>
An enumerable collection of MapVisualElement objects representing map tiles.
Implements:
Retrieves a list of supported map views based on available Azure tile sets with selection state information.
public virtual List<MapViewInfo> GetSupportedViews()
List<MapViewInfo>
A list of MapViewInfo objects representing available Azure Maps tile sets.
Implements:
Constructs the URI for retrieving a specific map tile from Azure Maps service using tile matrix coordinates and zoom level.
Synchronously retrieves a tile image from Azure Maps service or cache using the specified tile matrix coordinates and zoom level.
Initializes the Azure Maps provider by verifying service connectivity and preparing the tile matrix for use.
public void Initialize()
Implements:
Raises the InitializationComplete event to notify subscribers that provider initialization has finished.
protected virtual void OnInitializationComplete(EventArgs e)
The event arguments.
Raises the InitializationError event to notify subscribers that provider initialization has failed.
protected virtual void OnInitializationError(InitializationErrorEventArgs e)
The event arguments containing the initialization error details.
Raises the ProviderUpdated event to notify subscribers that provider content has changed.
Raises the SearchCompleted event to notify subscribers that a search operation has finished successfully.
protected virtual void OnSearchCompleted(AzureSearchCompletedEventArgs e)
The event arguments containing the search results.
Raises the SearchError event to notify subscribers that a search operation has encountered an error.
protected virtual void OnSearchError(SearchErrorEventArgs e)
The event arguments containing the search error details.
Handles tile download completion events, manages cache storage, and updates wraparound tiles with downloaded content.
protected virtual void OnTileDownloadComplete(object sender, TileInfoEventArgs e)
The sender.
eTileInfoEventArgsThe TileInfoEventArgs instance containing the event data.
Performs an asynchronous search operation using Azure Maps search services with the specified search request parameters.
public void SearchAsync(AzureSearchRequest request)
The Azure search request containing query text and search options.
Implements:
Processes the JSON search result response from Azure Maps service and deserializes it using multiple encoding strategies.
protected virtual void SearchRequest(string searchResult)
The JSON search result string returned from Azure Maps search service.
Sets the active map view by configuring the tile set identifier based on the specified view information.
public void SetView(MapViewInfo view)
The map view information containing the desired tile set name.
Implements:
Responds to viewport changes by calculating visible tiles, managing tile downloads, and updating the tile matrix for rendering.
public void ViewportChanged(IMapViewport viewport, ViewportChangeAction action)
The current map viewport containing zoom level and visible area information.
actionViewportChangeActionThe type of viewport change that occurred.
Implements:
Events
Occurs when the Azure Maps provider has completed its initialization process and is ready for use.
public event EventHandler InitializationComplete
Implements:
Occurs when provider initialization encounters an error during setup.
public event InitializationErrorEventHandler InitializationError
Implements:
Occurs when the provider content has been updated with new tile data or configuration changes.
public event EventHandler ProviderUpdated
Implements:
Occurs when an Azure Maps search operation has completed successfully with search results.
public event EventHandler<AzureSearchCompletedEventArgs> SearchCompleted
Implements:
Occurs when a search operation encounters an error during execution.
public event EventHandler<SearchErrorEventArgs> SearchError
Implements: