Tile System API
advanced scriptingWorld Map Strategy Kit · Scripting Support (C#)
WMSK (namespace WorldMapStrategyKit)
Tiles API
Methods for working with the tile system (online map tile layers).
Properties
bool showTiles { get; set; }Enable or disable the tile layer.
string tileServer { get; set; }URL template for the tile server (e.g., OpenStreetMap, Mapbox). Use {x}, {y}, {z} placeholders.
int tileMaxZoomLevel { get; set; }Maximum zoom level for tile loading (default 15).
int tileMaxConcurrentDownloads { get; set; }Maximum number of simultaneous tile downloads.
enum OFFLINE_TILES_SOURCE_TYPEGets or sets the o f f l i n e_ t i l e s_ s o u r c e_ t y p e.
int tileMaxTileLoadsPerFrameGets or sets the maximum number of tile loads per frame.
bool tileTransparentLayerBlends tiles with background imagery. Disabled for performance purposes (when disabled, tiles will use an opaque shader which renders faster)
float tileMaxAlphaGets or sets the tile max alpha (transparency). Reduce to force transparent layers when tiles are opaque.
bool tileEnableLocalCacheEnables or disables local cache for tile storage.
long tileMaxLocalCacheSizeGets or sets the size of the local cache in Mb.
int tileQueueLengthGets number of tiles pending load
int tileConcurrentLoadsGets current active tile downloads
int tileCurrentZoomLevelGets current tile zoom level
int tileWebDownloadsGets number of total tiles downloaded from web
int tileResourceDownloadsGets number of total tiles downloaded from the application Resources folder
long tileWebDownloadsTotalSizeGets total size in byte sof tiles downloaded from web
int tileCacheLoadsGets number of total tiles downloaded from local cache
long tileCacheLoadsTotalSizeGets total size in byte sof tiles downloaded from local cache
bool tileUseSecureConnectionUse https instead of simple http for secure connection to default servers.
string tileServerCustomUrlGets or sets the tile server Url. Only used whtn Tile Server is set to Custom.
float tileResolutionFactorGets or sets the tile resolution factor.
string tileServerCopyrightNoticeReturns the credits or copyright message required to be displayed with the active tile server. Returns null if credit not required.
string tileLastErrorReturns last logged error
DateTime tileLastErrorDateReturns last logged error date & time
string tileServerAPIKeyReturns current tile server API key
string tileServerClientIdReturns current tile server client id used by some providers
string tileServerLayerTypesReturns current tile server layer types used by some providers
string tileServerTimeOffsetReturns current tile server time offset used by some providers
bool tileDebugErrorsEnables/disables error dump to console or log file.
bool tilePreloadTilesTries to load all first zoom level of tiles at start so map shows complete from the beginning
long tileCurrentCacheUsageReturns the current disk usage of the tile cache in bytes.
float tileKeepAliveTime that an inactive tile remains in memory before being destroyed
bool tileEnableOfflineTilesEnables or disables loading tiles from application resources.
OFFLINE_TILES_SOURCE_TYPE tileOfflineTilesSourceTypeSpecifies the type of source for the offline tiles (Resources, File System or Streaming Assets Path)
bool tileOfflineTilesOnlyIf enabled, only tiles from Resources path will be loaded
string tileResourcePathBaseReturns path for the application resource path where tiles can be stored using the tile downloader
int tileLinesMaxZoomLevelGets or sets the maximum zoom level on which frontiers and other lines can be drawn over the map
Texture2D tileResourceFallbackTextureTexture for a tile which is not found in Resources path and tileOfflineTilesOnly is enabled
bool tileRestrictToAreaEnables area restriction
Vector4 tileMinMaxLatLonMinimum / maximum latitude/longitude allowed for fetching tiles. Only applies if tileRestrictToArea is enabled.
Methods
void ReloadTiles()Reloads the tile layer (useful after changing tile server or zoom level).
void ClearTileCache()Clears the local tile cache, forcing fresh downloads.
void PurgeTileCache()PurgeTileCache method.
void FlyToTile(int x, int y, int zoomLevel)Navigates to a given tile
void FlyToTile(int x, int y, int zoomLevel, float duration)Navigates to a given tile
Suggest an improvement
Help us improve this documentation page.