Holds the list of tile providers associated with Tiles class. More...
Public Member Functions | |
bool | Add (int Id, string Name, string urlPattern, tkTileProjection Projection, int minZoom=0, int maxZoom=17) |
Adds a custom tile provider. More... | |
void | Clear (bool ClearCache) |
Removes custom providers from the list. More... | |
string | get_ErrorMsg (int ErrorCode) |
Gets the description of the specific error code. More... | |
Extents | get_GeographicBounds (int Index) |
Gets the geographic bounds of the specified provider. More... | |
int | get_Id (int Index) |
Gets provider ID by its index in the list. More... | |
int | get_IndexByProvider (tkTileProvider Provider) |
Gets the index of default provider in the list. More... | |
int | get_IndexByProviderId (int ProviderId) |
Gets the index of provider in the list by its ID. More... | |
bool | get_IsCustom (int Index) |
Gets a value indicating whether given provider is a custom one. More... | |
string | get_Language (int Index) |
Gets language settings for a given provider. More... | |
int | get_MaxZoom (int Index) |
Gets maximum zoom level provided by tile server. More... | |
int | get_MinZoom (int Index) |
Gets minimum zoom level provided by tile server. More... | |
string | get_Name (int Index) |
Gets name of the specific provider. More... | |
tkTileProjection | get_Projection (int Index) |
Gets server projection for specified provider. More... | |
string | get_UrlPattern (int Index) |
Gets URL pattern for custom provider. More... | |
string | get_Version (int Index) |
Get a version string for specified provider. More... | |
bool | Remove (int ProviderId, bool ClearCache) |
Removes specified custom provider from the list. More... | |
void | set_GeographicBounds (int Index, Extents pVal) |
Sets the geographic bounds of the specified provider. More... | |
void | set_Language (int Index, string newVal) |
Sets language settings for a given provider. More... | |
void | set_Name (int Index, string newVal) |
Sets name of the specific providers. More... | |
void | set_Version (int Index, string retVal) |
Sets a version string for specified provider. More... | |
Properties | |
int | Count [get] |
Gets the number of providers in the list. More... | |
ICallback | GlobalCallback [get, set] |
Gets or sets a Callback object which handles progress and error messages. More... | |
int | LastErrorCode [get] |
Gets the code of last error which took place inside this object. More... | |
Holds the list of tile providers associated with Tiles class.
bool TileProviders.Add | ( | int | Id, |
string | Name, | ||
string | urlPattern, | ||
tkTileProjection | Projection, | ||
int | minZoom = 0 , |
||
int | maxZoom = 17 |
||
) |
Adds a custom tile provider.
Id | Unique ID to to access this provider later on (including caching). |
Name | Arbitrary name of provider. |
urlPattern | Url pattern for provider. The pattern may include the following varying components: {zoom}, {x}, {y}, {switch:n1,n2,n3}. For example, the following can be used to setup OpenStreetMap as custom provider: "https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png". |
Projection | Projection used by tile server. Projection must not necessarily match the map projection. MapWinGIS will try to do the transformation even if projection don't match, though these may lead to distortions and gaps between tiles. |
minZoom | Minimum zoom level provided by server. |
maxZoom | Maximum zoom level provided by server. |
void TileProviders.Clear | ( | bool | ClearCache | ) |
Removes custom providers from the list.
ClearCache | True in case cached tiles, both from RAM and disk, for custom providers should be removed as well. |
string TileProviders.get_ErrorMsg | ( | int | ErrorCode | ) |
Gets the description of the specific error code.
ErrorCode | The error code returned by LastErrorCode property. |
Extents TileProviders.get_GeographicBounds | ( | int | Index | ) |
Gets the geographic bounds of the specified provider.
Index | The index of the provider. |
int TileProviders.get_Id | ( | int | Index | ) |
Gets provider ID by its index in the list.
Index | The index of provider in the list. |
For default providers the index in the list and ID are the same. For custom providers any unique ID can be specified on creation, which may not match the index in the list.
int TileProviders.get_IndexByProvider | ( | tkTileProvider | Provider | ) |
Gets the index of default provider in the list.
Provider | Provider to find index for. |
int TileProviders.get_IndexByProviderId | ( | int | ProviderId | ) |
Gets the index of provider in the list by its ID.
ProviderId | Id of the provider. |
bool TileProviders.get_IsCustom | ( | int | Index | ) |
Gets a value indicating whether given provider is a custom one.
Index | Index of provider in the list. |
string TileProviders.get_Language | ( | int | Index | ) |
Gets language settings for a given provider.
Index | Index of provider in list. |
The setting will be included in http request and if supported by tile provider it may actually change language information is displayed on map with.
int TileProviders.get_MaxZoom | ( | int | Index | ) |
Gets maximum zoom level provided by tile server.
Index | Index of the provider in the list. |
Zoom level is hardcoded for default providers and passed as a parameter on creation for custom providers. Server isn't queried to check whether the values are correct.
int TileProviders.get_MinZoom | ( | int | Index | ) |
Gets minimum zoom level provided by tile server.
Index | Index of the provider in the list. |
string TileProviders.get_Name | ( | int | Index | ) |
Gets name of the specific provider.
Index | Index of the provider in the list. |
tkTileProjection TileProviders.get_Projection | ( | int | Index | ) |
Gets server projection for specified provider.
Index | Index of the provider in the list. |
string TileProviders.get_UrlPattern | ( | int | Index | ) |
Gets URL pattern for custom provider.
Index | Index of the provider in the list. |
string TileProviders.get_Version | ( | int | Index | ) |
Get a version string for specified provider.
Index | Index of the provider in the list. |
Many tile servers include version as a parameter of HTTP request. Tiles may not load if the obsolete version is passed.
bool TileProviders.Remove | ( | int | ProviderId, |
bool | ClearCache | ||
) |
Removes specified custom provider from the list.
ProviderId | Id of provider to be removed. |
ClearCache | True in case cached tiles should be removed as well. |
It's not allowed to remove default providers.
void TileProviders.set_GeographicBounds | ( | int | Index, |
Extents | pVal | ||
) |
Sets the geographic bounds of the specified provider.
Index | The index. |
pVal | The p value. |
void TileProviders.set_Language | ( | int | Index, |
string | newVal | ||
) |
Sets language settings for a given provider.
Index | Index of provider in list. |
newVal | Language settings, e.g. "en", "fr", "ru", etc. |
The setting will be included in http request and if supported by tile provider it may actually change language information is displayed on map with.
void TileProviders.set_Name | ( | int | Index, |
string | newVal | ||
) |
Sets name of the specific providers.
Index | Index of the provider in the list. |
newVal | New name of the provider. |
Providers are cached by ID therefore renaming of provider won't affect its cache.
void TileProviders.set_Version | ( | int | Index, |
string | retVal | ||
) |
Sets a version string for specified provider.
Index | Index of the provider in the list. |
retVal | Version string. |
|
get |
Gets the number of providers in the list.
|
getset |
Gets or sets a Callback object which handles progress and error messages.
|
get |
Gets the code of last error which took place inside this object.