Public Member Functions | Properties
Tiles Class Reference

Downloads and displays data from online TMS tile services, like OpenStreetMap. More...

List of all members.

Public Member Functions

bool AutodetectProxy ()
 Retrieves and applies proxy server settings (address and port) from IE settings.
bool CheckConnection (string url)
 Sends HTTP request to the specified address and reports back whether there is a response.
void ClearCache (tkCacheType cacheType)
 Clears cache of the specified type.
void ClearCache2 (tkCacheType cacheType, tkTileProvider Provider, int fromScale=0, int toScale=100)
 Clears cache of the specified to type for a given provider and scales.
void ClearPrefetchErrors ()
 Clears information about prefetching errors.
void ClearProxyAuthorization ()
 Clears user name and password set by Tiles.SetProxyAuthorization method.
void Deserialize (string newVal)
 Restores the state of Tiles class from string.
double get_CacheSize (tkCacheType cacheType)
 Gets the current size of cache.
double get_CacheSize2 (tkCacheType cacheType, tkTileProvider Provider=tkTileProvider.ProviderNone, int scale=-1)
 Gets the current size of cache used for specific provider and zoom level.
int get_DiskCacheCount (int Provider, int zoom, int xMin, int xMax, int yMin, int yMax)
 Gets number of tiles stored in disk cache for a given provider, zoom and region.
bool get_DoCaching (tkCacheType cacheType)
 Gets the value indicating whether tiles requested from server will be automatically cached.
string get_ErrorMsg (int ErrorCode)
 Gets the description of the specific error code.
double get_MaxCacheSize (tkCacheType cacheType)
 Gets the maximum allowable size of cache.
bool get_UseCache (tkCacheType cacheType)
 Gets a value indicating whether specific type of cache should be used to display tiles.
Extents GetTileBounds (int ProviderId, int zoom, int tileX, int tileY)
 Gets the bounds of specific tile in decimal degrees (for inner use/debug purposes).
Extents GetTilesIndices (Extents boundsDegrees, int zoom, int Provider)
 Gets indices of tiles within specified bounds in coordinates of the given zoom level.
int Prefetch (double minLat, double maxLat, double minLng, double maxLng, int zoom, int ProviderId, IStopExecution stop)
 Caches tiles of the specified provider within specified geographic bounds to SQLite database for further offline use.
int Prefetch2 (int minX, int maxX, int minY, int maxY, int zoom, int ProviderId, IStopExecution stop)
 Caches tiles of the specified provider to SQLite database for further offline use.
int PrefetchToFolder (Extents ext, int zoom, int ProviderId, string savePath, string fileExt, IStopExecution stop)
 Caches tiles to the specified file system folder for further offline use.
string Serialize ()
 Serializes the state of the Tiles class to be restored later with Tiles.Deserialize method.
void set_DoCaching (tkCacheType cacheType, bool pVal)
 Sets the value indicating whether tiles requested from server will be automatically cached.
void set_MaxCacheSize (tkCacheType cacheType, double pVal)
 Sets the maximum allowable size of cache.
void set_UseCache (tkCacheType cacheType, bool pVal)
 Sets a value indicating whether specific type of cache should be used to display tiles.
bool SetProxy (string address, int port)
 Set proxy server for tiles class.
bool SetProxyAuthorization (string username, string password, string domain)
 Sets credentials for proxy authorization.
bool StartLogRequests (string Filename, bool errorsOnly=false)
 Starts logging HTTP requests for tile server.
void StopLogRequests ()
 Stops logging of HTTP requests to a file.

Properties

int CurrentZoom [get]
 Gets zoom (scale) of tiles currently displayed on the map.
string DiskCacheFilename [get, set]
 Gets or sets the filename of SQLite database to cache tiles into.
ICallback GlobalCallback [get, set]
 Gets or sets a Callback object which handles progress and error messages.
bool GridLinesVisible [get, set]
 Gets or sets a value indicating whether a grid should be drawn to displayes borders of tiles (for debug purposes).
string Key [get, set]
 A text string associated with object. Any value can be stored by developer in this property.
int LastErrorCode [get]
 Gets the code of last error which took place inside this object.
bool LogErrorsOnly [get, set]
 Gets or sets a value indicating whether log will include all HTTP requests or only unsuccessful ones.
string LogFilename [get]
 Gets filename to write log into.
bool LogIsOpened [get]
 Gets a value indicating whether logging of HTTP requests will be performed.
int MaxScaleToCache [get, set]
 Gets or sets the maximum zoom (scale) to be cached if the automatic caching is chosen.
int MaxZoom [get]
 Gets maximum available zoom level for the current provider.
int MinScaleToCache [get, set]
 Gets or sets the minimum zoom (scale) to be cached if the automatic caching is chosen.
int MinZoom [get]
 Gets minimum available zoom level for the current provider.
int PrefetchErrorCount [get]
 Gets the number of unsuccessful HTTP requests during prefetching operation (Tiles.Prefetch and overloads).
int PrefetchTotalCount [get]
 Gets the total number of requests carried out during prefetching operation.
tkTilesProjectionStatus ProjectionStatus [get]
 Get information about whether map projection and tile projection match.
tkTileProvider Provider [get, set]
 Gets or sets active provider to serve the tiles.
int ProviderId [get, set]
 Gets or sets active provider to server the tiles. Ids of both default and custom providers can be specified.
string ProviderName [get]
 Gets the name of the active provider.
TileProviders Providers [get]
 Gets list of the available default and custom tile providers.
string Proxy [get]
 Gets proxy server settings for tiles class including IP and port, e.g. 192.168.0.1:80.
tkTileProjection ServerProjection [get]
 Gets projection used by specific tile service.
int SleepBeforeRequestTimeout [get, set]
 Gets or sets the amount of time in milliseconds a worker thread will sleep before the next HTTP request.
bool UseServer [get, set]
 Gets or sets a value indicating whether server requests will be made to get the tiles.
bool Visible [get, set]
 Gets or sets a value indicating whether the tiles will be displayed on the map.

Detailed Description

Downloads and displays data from online TMS tile services, like OpenStreetMap.

Attention:
MapWinGIS doesn't grant you any legal rights to use data from particular online services. Please look for license information on acceptable usages of the data on official sites of these services.

Online tile services provide 2D maps of Earth surface, which are split into small parts (usually 256 by 256 pixels) called tiles. Tiles are provided at a number of zoom levels with greater detail on each subsequent level. Typically there are about 15-20 zoom levels with just 4 tiles for the whole Earth surface on the first one, and 4^zoom on subsequent levels. Depending on service the maps can be:

To get more information on tiles services see specification: here.

A. Coordinate system and projection.

In order to display tiles from online datasource the coordinate system & projection of server must match or at least be compatible with those settings for the map control. Three scenarios are possible:

dot_inline_dotgraph_65.png


1) Projections match: tiles will be displayed in their native projection without distortions.

2) Projections don't match but transformation from server projection to map projection is possible: tiles will be displayed with distortions, which may be acceptable in some cases (spherical Mercator server projection, WGS84 map coordinate system) or hardly usable in others (spherical Mercator server projection, UTM projection of WGS84 as map projection).

3) No projections for map is set or map/server projections doesn't match and there is no transformation between them: tiles can't be displayed.

Here are screenshots which illustrate types of distortions introduced by projection mismatch (server projection is Spherical Mercator).

tiles_wgs84.jpg
tiles_utm16.jpg
Spherical Mercator -> WGS84 Spherical Meractor -> WGS84 UTM16

To check whether map projection match the server one use Tiles.ProjectionStatus property.

Most tile servers like OpenStreetMap, GoogleMaps, etc. are using spherical Mercator projection (aka Google Mercator; EPSG 3857). Therefore in most cases it may be set without additional checks:

 axMap1.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR;

More generalized code to initialize map control with projection used by tile server is:

 var ut = new Utils();
 tkTileProjection pr = axMap1.Tiles.ServerProjection;
 GeoProjection gp = ut.TileProjectionToGeoProjection(pr);
 axMap1.GeoProjection = gp;
 Debug.Print("Projection was set: " + axMap1.GeoProjection.Name);
 Debug.Print("Tiles projection status: " + axMap1.Tiles.ProjectionStatus.ToString());
 //if all went was tpsNative status will be returned, i.e. rendering in native projection

B. Providers.

MapWinGIS supports built-in default providers and custom providers.

dot_inline_dotgraph_66.png

MapWinGIS has a number of built-in providers defined in tkTileProvider enumeration. To activate one of those use:

 axMap1.Tiles.Provider = tkTileProvider.OpenCycleMap;
 // or a shorter version
 axMap1.TileProvider = tkTileProvider.OpenCycleMap;

The default provider is OpenStreetMap.

To display list of available providers and their settings:

 TileProviders providers = axMap1.Tiles.Providers;
 for (int i = 0; i < providers.Count; i++)
 {
     Debug.WriteLine("Provider name: " + providers.get_Name(i));
     Debug.WriteLine("Provider type: " + (providers.get_IsCustom(i) ? "custom" : "default"));
     Debug.WriteLine("Min zoom: " + providers.get_MinZoom(i));
     Debug.WriteLine("Min zoom: " + providers.get_MinZoom(i));
     Debug.WriteLine("-----------------------------------");
 }

To add a custom provider to the list (in this example OpenStreetMap is configured as custom provider):

 TileProviders providers = axMap1.Tiles.Providers;
 int providerId = (int)tkTileProvider.ProviderCustom + 1;    // (1024 + 1) should be unique across application runs in case disk caching is used
 providers.Add(providerId, "Custom TMS provider",
 "http://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png",
 tkTileProjection.SphericalMercator, 0, 18);

The following placeholders can be used:

To set this provider as an active one:

 axMap1.Tiles.ProviderId = providerId;
 // the same property can be used to set default providers as well
 // because enumerated constant values match their id:
 axMap1.Tiles.ProviderId = (int)tkTileProvider.OpenStreetMap;

To retrieve custom provider already added to the list:

 int providerId = 1025;       // id of provider passed to TileProviders.Add method
 TileProviders providers = axMap1.Tiles.Providers;
 int index = providers.get_IndexByProviderId(providerId);
 Debug.WriteLine("The recently added custom provider is: " + providers.get_Name(index));

It's necessary to distinguish unique providerId passed to TileProviders.Add method and used by caching mechanism, and index of provider in TileProviders collection which may differ across application runs. To get index in collection by providerId use TileProviders.get_IndexByProviderId.

C. Zoom levels.

Originally MapWinGIS doesn't support concept of discrete zoom levels and can display any arbitrary zoom level between those defined by tile service. This will lead to scaling of tiles, i.e. separate images will be drawn using size other than their original (256 by 256 pixels), which may decrease their readability. To force MapWinGIS to display tiles without scaling set:

 axMap1.ZoomBehavior = zmUseTileLevels;

Map can also be zoomed to particular tile level:

 axMap1.ZoomToTileLevel(10);
 // or 
 axMap1.CurrentZoom = 10;    // available from Form designer

Zoom levels supported by active provider can be accessed via Tiles.MinZoom, Tiles.MaxZoom properties:

 Debug.WriteLine(string.Format("Provider {0} supports zoom levels from {1} to {2}", axMap1.Tiles.Provider.ToString(), 
                                axMap1.Tiles.MinZoom, axMap1.Tiles.MaxZoom));

Available zoom levels for other providers can be retrieved via: TileProviders.get_MaxZoom, TileProviders.get_MinZoom. Visibility of data layers displayed on the map can set for specific zoom levels only with: AxMap.set_LayerMaxVisibleZoom, AxMap.set_LayerMaxVisibleZoom.

D. Caching.

To speed up the display and reduce network traffic it's common to use caching for tiles, i.e. save them locally for further reuse. MapWinGIS supports 2 types of tile cache:

dot_inline_dotgraph_67.png

To enable cache usage:

 axMap1.Tiles.set_UseCache(tkCacheType.Disk, true);  // is on by default
 axMap1.Tiles.set_UseCache(tkCacheType.RAM, true);   // is on by default

To make MapWinGIS add newly downloaded tiles to cache:

 axMap1.Tiles.set_DoCaching(tkCacheType.RAM, true);  // is on by default
 axMap1.Tiles.set_DoCaching(tkCacheType.Disk, true); // if off by default

At this point new SQLite database will created to store tiles if it wasn't created so far. Default filename is mwtiles.db3. Location - the folder with application executable. To change location of disk cache use Tiles.DiskCacheFilename property.

 axMap1.Tiles.DiskCacheFilename = "D:\tiles_cache.db3";

If no file with such name exists it will be created automatically. Only one database can be used at a time.

For both types of cache there is built-in mechanism to limit its size, under exceeding of which the oldest tiles will be removed to give space for the more recent ones:

 axMap1.Tiles.set_MaxCacheSize(tkCacheType.RAM, 200.0);    // size in MB; 100 by default
 axMap1.Tiles.set_MaxCacheSize(tkCacheType.Disk, 500.0);    // size in MB; 100 by default

To get information about the size and content of cache use: Tiles.get_CacheSize, Tiles.get_DiskCacheCount. To clear all the cache or only data for particular zoom levels and providers use: Tiles.ClearCache, Tiles.ClearCache2.

E. Functioning.

If map projection is compatible with server tiles are loaded automatically when map extents change and Tiles.Visible property is set to true. AxMap.TilesLoaded event is fired when all tiles for particular extents are loaded. In case all tiles were found in cache the event will fire immediately, otherwise - after execution of HTTP requests. If new extents were set for map before all HTTP request for previous set of tiles were completed, AxMap.TilesLoaded event won't fire, tiles already requested will be added to the cache, but other pending requests will be discarded. Internally to queue HTTP requests 2 thread pools are used. To identify potential problems HTTP requests can logged into file with Tiles.StartLogRequests method.

The behaviour of tile services depend upon how server and map projection are related. Several cases are possible:

1. Server and map projections are the same.

2. Special case of: server projection is GMercator, map projection - WGS84.

3. Server projection is local one (like Amersfoort/RD New), server projection is different:

4. Server projection is GMercator, map projection is some sort of local projection (like WGS84 UTM zones):


Member Function Documentation

Retrieves and applies proxy server settings (address and port) from IE settings.

Returns:
True on success and false otherwise
bool Tiles.CheckConnection ( string  url)

Sends HTTP request to the specified address and reports back whether there is a response.

Parameters:
urlThe URL to send request to.
Returns:
True if there is a connection (even if there is and error code like 404 in response) and false otherwise.
void Tiles.ClearCache ( tkCacheType  cacheType)

Clears cache of the specified type.

Parameters:
cacheTypeType of cache to be cleared.
void Tiles.ClearCache2 ( tkCacheType  cacheType,
tkTileProvider  Provider,
int  fromScale = 0,
int  toScale = 100 
)

Clears cache of the specified to type for a given provider and scales.

Parameters:
cacheTypeType of cache to be cleared.
ProviderTile provider to be cleared. ProviderNone will clear tiles for all providers.
fromScaleMinimal scale (zoom) to clear tiles for.
toScaleMaximum scale (zoom) to clear tiles for.

Clears information about prefetching errors.

New API 4.9.1:
Added in version 4.9.1

Clears user name and password set by Tiles.SetProxyAuthorization method.

New API 4.9.3:
Added in version 4.9.3
void Tiles.Deserialize ( string  newVal)

Restores the state of Tiles class from string.

Parameters:
newValSerialized string generated by Tiles.Serialize method.
double Tiles.get_CacheSize ( tkCacheType  cacheType)

Gets the current size of cache.

Parameters:
cacheTypeThe type of cache to return size for.
Returns:
The size of cache in MB.
double Tiles.get_CacheSize2 ( tkCacheType  cacheType,
tkTileProvider  Provider = tkTileProvider.ProviderNone,
int  scale = -1 
)

Gets the current size of cache used for specific provider and zoom level.

Parameters:
cacheTypeThe type of cache to return size for.
ProviderProvider. ProviderNone will return size for all providers.
scaleScale (zoom) level. -1 will return size for all zoom levels.
Returns:
The size of cache in MB.
int Tiles.get_DiskCacheCount ( int  Provider,
int  zoom,
int  xMin,
int  xMax,
int  yMin,
int  yMax 
)

Gets number of tiles stored in disk cache for a given provider, zoom and region.

Parameters:
ProviderId of provider.
zoomZoom level.
xMinMin X index of tile.
xMaxMax X index of tile.
yMinMin Y index of tile.
yMaxMax Y index of tile.
Returns:
Number of tiles.
bool Tiles.get_DoCaching ( tkCacheType  cacheType)

Gets the value indicating whether tiles requested from server will be automatically cached.

Parameters:
cacheTypeThe type of cache to be used.
Returns:
True if automatic caching is on.
string Tiles.get_ErrorMsg ( int  ErrorCode)

Gets the description of the specific error code.

Parameters:
ErrorCodeThe error code returned by LastErrorCode property.
Returns:
String with the description.
double Tiles.get_MaxCacheSize ( tkCacheType  cacheType)

Gets the maximum allowable size of cache.

Parameters:
cacheTypeThe type of cache.
Returns:
Maximum size in MB.
bool Tiles.get_UseCache ( tkCacheType  cacheType)

Gets a value indicating whether specific type of cache should be used to display tiles.

Parameters:
cacheTypeThe type of cache.
Returns:
True if the specific type of cache can be used.
Extents Tiles.GetTileBounds ( int  ProviderId,
int  zoom,
int  tileX,
int  tileY 
)

Gets the bounds of specific tile in decimal degrees (for inner use/debug purposes).

Parameters:
ProviderIdId of the provider.
zoomZoom level for a tile.
tileXX coordinate of the tile within zoom level.
tileYY coordinate of the tile within zoom level.
Returns:
Bounds in decimal degrees or null on failure.
Extents Tiles.GetTilesIndices ( Extents  boundsDegrees,
int  zoom,
int  Provider 
)

Gets indices of tiles within specified bounds in coordinates of the given zoom level.

Parameters:
boundsDegreesBounds in decimal degrees.
zoomZoom level.
ProviderId of the provider.
Returns:
Extents object with tile bounds or null on failure.

Can be used at the first step of prefetching operation.

int Tiles.Prefetch ( double  minLat,
double  maxLat,
double  minLng,
double  maxLng,
int  zoom,
int  ProviderId,
IStopExecution  stop 
)

Caches tiles of the specified provider within specified geographic bounds to SQLite database for further offline use.

Parameters:
minLatMinimal latitude to cache within.
maxLatMaximum latitude to cache within.
minLngMinimal longitude to cache within.
maxLngMaximum longitude to cache within.
zoomZoom level.
ProviderIdId of the provider.
stopStopExecution interface implementation to stop the operation prematurely.
Returns:
The number of tiles scheduled for caching.

The operation is executed asynchronously. To get the progress information use Tiles.GlobalCallback property. The callback will returned the number of tiles already downloaded. When operation is completed, -1 will be returned.

int Tiles.Prefetch2 ( int  minX,
int  maxX,
int  minY,
int  maxY,
int  zoom,
int  ProviderId,
IStopExecution  stop 
)

Caches tiles of the specified provider to SQLite database for further offline use.

Parameters:
minXMinimum X index of tile to be cached (in coordinates of tile zoom level).
maxXMaximum X index of tile to be cached (in coordinates of tile zoom level).
minYMinimum Y index of tile to be cached (in coordinates of tile zoom level).
maxYMaximum Y index of tile to be cached (in coordinates of tile zoom level).
zoomZoom level to be cached.
ProviderIdId of the provider.
stopStopExecution interface implementation to stop the operation prematurely.
Returns:
Number of tiles scheduled for caching.

The operation is executed asynchronously. See details in Tiles.Prefetch.

int Tiles.PrefetchToFolder ( Extents  ext,
int  zoom,
int  ProviderId,
string  savePath,
string  fileExt,
IStopExecution  stop 
)

Caches tiles to the specified file system folder for further offline use.

Parameters:
extExtents to cache within in decimal degrees.
zoomZoom level.
ProviderIdId of the provider.
savePathDirectory to save files into. Nested folders for zoom levels, X/Y coordinates will be created automatically.
fileExtFile extension to store tiles with.
stopStopExecution interface implementation to stop the operation prematurely.
Returns:
Number of tiles scheduled for caching.

Often tiles are saved with fictitious extension, like png.tile, to avoid their listing in the gallery of smartphones for example. Tile consuming application often may be configured to handle such extensions. The operation is executed asynchronously. See details in Tiles.Prefetch.

string Tiles.Serialize ( )

Serializes the state of the Tiles class to be restored later with Tiles.Deserialize method.

Returns:
Serialized string.
void Tiles.set_DoCaching ( tkCacheType  cacheType,
bool  pVal 
)

Sets the value indicating whether tiles requested from server will be automatically cached.

Parameters:
cacheTypeThe type of cache to be used.
pValTrue to turn automatic caching on.
void Tiles.set_MaxCacheSize ( tkCacheType  cacheType,
double  pVal 
)

Sets the maximum allowable size of cache.

Parameters:
cacheTypeThe type of cache.
pValMaximum size in MB.
void Tiles.set_UseCache ( tkCacheType  cacheType,
bool  pVal 
)

Sets a value indicating whether specific type of cache should be used to display tiles.

Parameters:
cacheTypeThe type of cache.
pValTrue if the specific type of cache can be used.
bool Tiles.SetProxy ( string  address,
int  port 
)

Set proxy server for tiles class.

Parameters:
addressIP address of proxy.
portPort to be used.
Returns:
True on success and false otherwise.
bool Tiles.SetProxyAuthorization ( string  username,
string  password,
string  domain 
)

Sets credentials for proxy authorization.

HTTP client will use this credentials when 401 or 407 response is received for original request: http://msdn.microsoft.com/en-us/library/7shxzbwb%28v=vs.80%29.aspx

Parameters:
usernameUsername.
passwordPassword.
domainDomain name.
Returns:
True on success.
New API 4.9.3:
Added in version 4.9.3
bool Tiles.StartLogRequests ( string  Filename,
bool  errorsOnly = false 
)

Starts logging HTTP requests for tile server.

Parameters:
FilenameFilename to write log into. New file will be created any existing file - overwritten.
errorsOnlyIndicate whether only unsuccessful requests should logged.
Returns:
True if log was opened, and false on failure.
New API 4.9.1:
Added in version 4.9.1

Stops logging of HTTP requests to a file.

New API 4.9.1:
Added in version 4.9.1

Property Documentation

int Tiles.CurrentZoom [get]

Gets zoom (scale) of tiles currently displayed on the map.

Tile zooms are discrete, but the scale for Map control is continuous. Therefore in most cases tiles of particular zoom will be somewhat additionally scaled to fit the map, i.e. their display size on map won't be equal to the original 256 pixels.

string Tiles.DiskCacheFilename [get, set]

Gets or sets the filename of SQLite database to cache tiles into.

Gets or sets a Callback object which handles progress and error messages.

Deprecated:
v4.9.3 Use GlobalSettings.ApplicationCallback instead.
bool Tiles.GridLinesVisible [get, set]

Gets or sets a value indicating whether a grid should be drawn to displayes borders of tiles (for debug purposes).

string Tiles.Key [get, set]

A text string associated with object. Any value can be stored by developer in this property.

Gets the code of last error which took place inside this object.

bool Tiles.LogErrorsOnly [get, set]

Gets or sets a value indicating whether log will include all HTTP requests or only unsuccessful ones.

New API 4.9.1:
Added in version 4.9.1
string Tiles.LogFilename [get]

Gets filename to write log into.

New API 4.9.1:
Added in version 4.9.1
bool Tiles.LogIsOpened [get]

Gets a value indicating whether logging of HTTP requests will be performed.

New API 4.9.1:
Added in version 4.9.1
int Tiles.MaxScaleToCache [get, set]

Gets or sets the maximum zoom (scale) to be cached if the automatic caching is chosen.

The setting won't affect tile prefetching.

int Tiles.MaxZoom [get]

Gets maximum available zoom level for the current provider.

New API 4.9.1:
Added in version 4.9.1
int Tiles.MinScaleToCache [get, set]

Gets or sets the minimum zoom (scale) to be cached if the automatic caching is chosen.

The setting won't affect tile prefetching.

int Tiles.MinZoom [get]

Gets minimum available zoom level for the current provider.

New API 4.9.1:
Added in version 4.9.1

Gets the number of unsuccessful HTTP requests during prefetching operation (Tiles.Prefetch and overloads).

New API 4.9.1:
Added in version 4.9.1

Gets the total number of requests carried out during prefetching operation.

New API 4.9.1:
Added in version 4.9.1

Get information about whether map projection and tile projection match.

This diagnostic value indicates whether tiles will be rendered without scaling and distortions and if they will be rendered at all.

New API 4.9.1:
Added in version 4.9.1
tkTileProvider Tiles.Provider [get, set]

Gets or sets active provider to serve the tiles.

The property will return ProviderCustom for custom provider and won't be able to set a custom provider (use Tiles.ProviderId to do it).

int Tiles.ProviderId [get, set]

Gets or sets active provider to server the tiles. Ids of both default and custom providers can be specified.

string Tiles.ProviderName [get]

Gets the name of the active provider.

Gets list of the available default and custom tile providers.

string Tiles.Proxy [get]

Gets proxy server settings for tiles class including IP and port, e.g. 192.168.0.1:80.

Gets projection used by specific tile service.

New API 4.9.1:
Added in version 4.9.1

Gets or sets the amount of time in milliseconds a worker thread will sleep before the next HTTP request.

In some cases rapid caching of tiles can enact certain blocking logic for the IP address by server or one of the proxies.

New API 4.9.1:
Added in version 4.9.1
bool Tiles.UseServer [get, set]

Gets or sets a value indicating whether server requests will be made to get the tiles.

When set to false tiles will only be loaded from cache.

bool Tiles.Visible [get, set]

Gets or sets a value indicating whether the tiles will be displayed on the map.

When set to false tiles won't be requested either from server or cache.

 All Classes Files Functions Enumerations Properties Events