• 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 ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    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 UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class GenericTileProvider

A class used to obtain map tiles from any tile server compliant with Web Map Tile Service protocol.

Inheritance
System.Object
TileProvider
GenericTileProvider
Inherited Members
TileProvider.TileImageFormat
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.Reporting
Assembly: Telerik.Reporting.dll

Syntax

public class GenericTileProvider : TileProvider, ITileProvider
Remarks

By default, the GenericTileProvider is initialized using the MapQuest tile server properties.

Examples

The following example demonstrates how to initialize a GenericTileProvider instance:

public void HowToInitializeGenericTileProvider()
{
    //Creating the GenericTileProvider instance
    Telerik.Reporting.GenericTileProvider genericTileProvider1 = new Telerik.Reporting.GenericTileProvider();

    //Setting the attribution text that will be shown at the bottom right corner of the map control.
    genericTileProvider1.Attribution = "Tiles courtesy of MapQuest";

    //Setting the URL to the image file that will be used to download the tile provider logo, if required by the provider's usage policy
    genericTileProvider1.LogoUrl = "http://developer.mapquest.com/content/osm/mq_logo.png";

    //Specifying the URL template that will be used to get the tiles from the tile server.
    genericTileProvider1.UrlTemplate = "http://{subdomain}.mqcdn.com/tiles/1.0.0/map/{zoom}/{x}/{y}.jpg";

    //Adding the subdomains used to distribute the tile requests evenly. They will replace the {subdomain} tag in the UrlTemplate.
    genericTileProvider1.UrlSubdomains.Add("otile1");
    genericTileProvider1.UrlSubdomains.Add("otile2");
    genericTileProvider1.UrlSubdomains.Add("otile3");
    genericTileProvider1.UrlSubdomains.Add("otile4");

    //Assigning the tile provider to the map instance
    this.map.TileProvider = genericTileProvider1;
}
Public Sub HowToInitializeGenericTileProvider()
    'Creating the GenericTileProvider instance
    Dim genericTileProvider1 As New Telerik.Reporting.GenericTileProvider()

    'Setting the attribution text that will be shown at the bottom right corner of the map control.
    genericTileProvider1.Attribution = "Tiles courtesy of MapQuest"

    'Setting the URL to the image file that will be used to download the tile provider logo, if required by the provider's usage policy
    genericTileProvider1.LogoUrl = "http://developer.mapquest.com/content/osm/mq_logo.png"

    'Specifying the URL template that will be used to get the tiles from the tile server.
    genericTileProvider1.UrlTemplate = "http://{subdomain}.mqcdn.com/tiles/1.0.0/map/{zoom}/{x}/{y}.jpg"

    'Adding the subdomains used to distribute the tile requests evenly. They will replace the {subdomain} tag in the UrlTemplate.
    genericTileProvider1.UrlSubdomains.Add("otile1")
    genericTileProvider1.UrlSubdomains.Add("otile2")
    genericTileProvider1.UrlSubdomains.Add("otile3")
    genericTileProvider1.UrlSubdomains.Add("otile4")

    'Assigning the tile provider to the map instance
    Me.map.TileProvider = genericTileProvider1

Constructors

GenericTileProvider()

Declaration
public GenericTileProvider()

Properties

Attribution

Gets or sets the Attribution property must be set manually according to the tile provider usage policy. This text will be displayed in the lower right corner of the map area.

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

LogoUrl

Gets or sets the LogoUrl property denotes the URL used to download the tile provider logo, if required by the provider's usage policy. In case the URL points to a valid image, it will be displayed in the lower left corner of the map area.

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

UrlSubdomains

Gets a collection of subdomains that will replace the {subdomain} tag in the UrlTemplate. When more than one subdomain is specified, the tile requests will be distributed evenly among the subdomains.

Declaration
public Collection<string> UrlSubdomains { get; }
Property Value
System.Collections.ObjectModel.Collection<System.String>

Remarks

For example, for MapQuest Tile server the subdomains are: otile1, otile2, otile3, otile4

UrlTemplate

Gets or sets a templated URL that will be used to fetch the tiles from the tile provider. Valid template patterns are {subdomain}, {x}, {y}, {zoom}.

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

Remarks

The UrlTemplate have the following format: http://{subdomain}.mqcdn.com/tiles/1.0.0/map/{zoom}/{x}/{y}.jpg

The {subdomain} tag marks the place where a subdomain from the UrlSubdomains collection would be placed. This tag is not mandatory, since the selected tile provider may not offer more than one subdomain.

The {zoom} tag will be replaced by the calculated zoom level (level of details) of the current tile set.

The {x} and {y} tags are used as a placeholders for the tile position.

UserAgent

Gets or sets the UserAgent header value that will be used when sending requests to the tile provider servers.

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

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Online Demos
Support Resources
  • Documentation
  • Knowledge Base
  • Videos
  • Reporting Samples Repository
  • Reporting Release History
Community
  • Forums
  • Blogs
  • Reporting 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.