LocalMapProvider
Provides map tiles from local file system storage using customizable directory structure and file naming patterns for offline mapping.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.RadMap.dll
Syntax:
public class LocalMapProvider : IMapProvider, ICloneable, IMapTileProvider
Inheritance: objectLocalMapProvider
Implements:
Constructors
Initializes a new instance of the LocalMapProvider class with default settings and generates a unique identifier.
public LocalMapProvider()
Initializes a new instance of the LocalMapProvider class with specified directory path and file naming format.
Properties
Gets or sets the cache provider instance, which is always null for local providers as caching is not applicable.
public IMapCacheProvider CacheProvider { get; set; }
Implements:
Gets or sets the root directory path where tile image files are stored in the local file system.
public virtual string DirectoryPath { get; set; }
Gets or sets a value indicating whether caching is enabled, which is always false for local providers as files are already stored locally.
public bool EnableCaching { get; set; }
Implements:
Gets or sets the file naming format string used to construct tile file paths from coordinates and zoom level parameters.
public virtual string FileFormat { get; set; }
Gets the unique identifier for this local map provider instance.
public virtual string Id { get; }
Implements:
Gets or sets a value indicating whether this LocalMapProvider has completed initialization and is ready for tile loading.
public bool Initialized { get; protected set; }
true if initialized; otherwise, false.
Gets or sets the maximum zoom level supported by this local map provider for tile display and navigation.
public virtual int MaxZoomLevel { get; set; }
Implements:
Gets or sets the minimum zoom level supported by this local map provider for tile display and navigation.
public virtual int MinZoomLevel { get; set; }
Implements:
Gets or sets a fallback image displayed when a requested tile file cannot be found or loaded from the local file system.
public Image NoImageAvailable { get; set; }
The no image available.
Gets the settings that control tile rendering behavior.
public MapTileProviderSettings Settings { get; }
Implements:
Gets or sets the tile downloader instance, which is always null for local providers as tiles are loaded from local files.
public IMapTileDownloader TileDownloader { get; set; }
Implements:
Methods
Creates a shallow copy of this LocalMapProvider instance with all configuration settings and state information.
public virtual object Clone()
A new LocalMapProvider object that is a copy of this instance.
Implements:
Generates map visual elements for the specified viewport by providing tile images loaded from the local file system.
public virtual 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 local map tiles.
Implements:
Retrieves the list of supported map views, which returns null for local map providers as they do not support multiple views.
public virtual List<MapViewInfo> GetSupportedViews()
List<MapViewInfo>
Always returns null since local providers do not support multiple views.
Implements:
Retrieves a tile image from the local file system using the specified tile coordinates and zoom level.
Initializes the local map provider by setting the initialized state and triggering the initialization complete event.
public virtual 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.
Sets the active map view, which has no effect for local map providers as they do not support multiple views.
public virtual void SetView(MapViewInfo view)
The map view information (ignored for local providers).
Implements:
Responds to viewport changes by calculating visible tiles, loading tile images from local files, and preparing visual elements for rendering.
public virtual 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 local map 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: