skip navigation
  • Product Bundles

    DevCraft

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

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

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

    Mobile

    UI for .NET MAUI

    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 Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free 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
    • 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 LocalMapProvider

Provides map tiles from local file system storage using customizable directory structure and file naming patterns for offline mapping.

Inheritance
System.Object
LocalMapProvider
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.RadMap.dll

Syntax

public class LocalMapProvider : IMapProvider, ICloneable, IMapTileProvider

Constructors

LocalMapProvider()

Initializes a new instance of the LocalMapProvider class with default settings and generates a unique identifier.

Declaration
public LocalMapProvider()

LocalMapProvider(String, String)

Initializes a new instance of the LocalMapProvider class with specified directory path and file naming format.

Declaration
public LocalMapProvider(string directoryPath, string fileFormat)
Parameters
System.String directoryPath

The directory path.

System.String fileFormat

The file format.

Properties

CacheProvider

Gets or sets the cache provider instance, which is always null for local providers as caching is not applicable.

Declaration
public IMapCacheProvider CacheProvider { get; set; }
Property Value
IMapCacheProvider

Implements
IMapTileProvider.CacheProvider

DirectoryPath

Gets or sets the root directory path where tile image files are stored in the local file system.

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

EnableCaching

Gets or sets a value indicating whether caching is enabled, which is always false for local providers as files are already stored locally.

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

Implements
IMapTileProvider.EnableCaching

FileFormat

Gets or sets the file naming format string used to construct tile file paths from coordinates and zoom level parameters.

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

Id

Gets the unique identifier for this local map provider instance.

Declaration
public virtual string Id { get; }
Property Value
System.String

Implements
IMapProvider.Id

Initialized

Gets or sets a value indicating whether this LocalMapProvider has completed initialization and is ready for tile loading.

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

true if initialized; otherwise, false.

MaxZoomLevel

Gets or sets the maximum zoom level supported by this local map provider for tile display and navigation.

Declaration
public virtual int MaxZoomLevel { get; set; }
Property Value
System.Int32

Implements
IMapProvider.MaxZoomLevel

MinZoomLevel

Gets or sets the minimum zoom level supported by this local map provider for tile display and navigation.

Declaration
public virtual int MinZoomLevel { get; set; }
Property Value
System.Int32

Implements
IMapProvider.MinZoomLevel

NoImageAvailable

Gets or sets a fallback image displayed when a requested tile file cannot be found or loaded from the local file system.

Declaration
public Image NoImageAvailable { get; set; }
Property Value
System.Drawing.Image

The no image available.

TileDownloader

Gets or sets the tile downloader instance, which is always null for local providers as tiles are loaded from local files.

Declaration
public IMapTileDownloader TileDownloader { get; set; }
Property Value
IMapTileDownloader

Implements
IMapTileProvider.TileDownloader

TileSize

Gets or sets the standard tile size in pixels used by this local map provider for all tile operations and rendering.

Declaration
public Size TileSize { get; set; }
Property Value
System.Drawing.Size

Implements
IMapTileProvider.TileSize

Methods

Clone()

Creates a shallow copy of this LocalMapProvider instance with all configuration settings and state information.

Declaration
public virtual object Clone()
Returns
System.Object

A new LocalMapProvider object that is a copy of this instance.

Implements
System.ICloneable.Clone()

GetContent(IMapViewport)

Generates map visual elements for the specified viewport by providing tile images loaded from the local file system.

Declaration
public virtual IEnumerable<MapVisualElement> GetContent(IMapViewport viewport)
Parameters
IMapViewport viewport

The map viewport defining the visible area and zoom level.

Returns
System.Collections.Generic.IEnumerable<MapVisualElement>

An enumerable collection of MapVisualElement objects representing local map tiles.

Implements
IMapProvider.GetContent(IMapViewport)

GetSupportedViews()

Retrieves the list of supported map views, which returns null for local map providers as they do not support multiple views.

Declaration
public virtual List<MapViewInfo> GetSupportedViews()
Returns
System.Collections.Generic.List<MapViewInfo>

Always returns null since local providers do not support multiple views.

Implements
IMapProvider.GetSupportedViews()

GetTileImage(Int32, Int32, Int32)

Retrieves a tile image from the local file system using the specified tile coordinates and zoom level.

Declaration
public Image GetTileImage(int x, int y, int zoom)
Parameters
System.Int32 x

The tile X coordinate.

System.Int32 y

The tile Y coordinate.

System.Int32 zoom

The zoom level for the tile.

Returns
System.Drawing.Image

The tile image loaded from local file, or the fallback image if the file does not exist.

Implements
IMapTileProvider.GetTileImage(Int32, Int32, Int32)

Initialize()

Initializes the local map provider by setting the initialized state and triggering the initialization complete event.

Declaration
public virtual void Initialize()
Implements
IMapProvider.Initialize()

LoadTile(Int32, Int32, Int32)

Loads a tile image from the local file system using the specified coordinates and zoom level, returning a fallback image if not found.

Declaration
public virtual Image LoadTile(int x, int y, int zoom)
Parameters
System.Int32 x

The x.

System.Int32 y

The y.

System.Int32 zoom

The zoom.

Returns
System.Drawing.Image

Image.

OnInitializationComplete(EventArgs)

Raises the InitializationComplete event to notify subscribers that provider initialization has finished.

Declaration
protected virtual void OnInitializationComplete(EventArgs e)
Parameters
System.EventArgs e

The event arguments.

OnInitializationError(InitializationErrorEventArgs)

Raises the InitializationError event to notify subscribers that provider initialization has failed.

Declaration
protected virtual void OnInitializationError(InitializationErrorEventArgs e)
Parameters
InitializationErrorEventArgs e

The event arguments containing the initialization error details.

OnProviderUpdated(EventArgs)

Raises the ProviderUpdated event to notify subscribers that provider content has changed.

Declaration
protected virtual void OnProviderUpdated(EventArgs e)
Parameters
System.EventArgs e

The event arguments.

SetView(MapViewInfo)

Sets the active map view, which has no effect for local map providers as they do not support multiple views.

Declaration
public virtual void SetView(MapViewInfo view)
Parameters
MapViewInfo view

The map view information (ignored for local providers).

Implements
IMapProvider.SetView(MapViewInfo)

ViewportChanged(IMapViewport, ViewportChangeAction)

Responds to viewport changes by calculating visible tiles, loading tile images from local files, and preparing visual elements for rendering.

Declaration
public virtual void ViewportChanged(IMapViewport viewport, ViewportChangeAction action)
Parameters
IMapViewport viewport

The current map viewport containing zoom level and visible area information.

ViewportChangeAction action

The type of viewport change that occurred.

Implements
IMapProvider.ViewportChanged(IMapViewport, ViewportChangeAction)

Events

InitializationComplete

Occurs when the local map provider has completed its initialization process and is ready for use.

Declaration
public event EventHandler InitializationComplete
Event Type
System.EventHandler

Implements
IMapProvider.InitializationComplete

InitializationError

Occurs when provider initialization encounters an error during setup.

Declaration
public event InitializationErrorEventHandler InitializationError
Event Type
InitializationErrorEventHandler

Implements
IMapProvider.InitializationError

ProviderUpdated

Occurs when the provider content has been updated with new tile data or configuration changes.

Declaration
public event EventHandler ProviderUpdated
Event Type
System.EventHandler

Implements
IMapProvider.ProviderUpdated

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • 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.