modelit.mapviewer.AbstractTileSource/AbstractTileSource is a constructor. obj = modelit.mapviewer.AbstractTileSource
baseUrl | string, default value: 'png'. | The tile url without parameters. |
isWGS | boolean | Return true if WGS coordinate. |
maxZoomLevel | number | Maximum (greatest detail) zoomlevel. |
minZoomLevel | number | Minimum (lowest detail) zoomlevel. |
name | string | The name of the tilesource. |
numberOfThreads | number, default value: 2 | Number of threads that can be used to download the tiles. Note that some of the tileproviders have a limit of the number of parallel requests. |
tileSize | number, default value: 256. | The tilesize in pixels. Tile are assumed to be square. |
tileType | string, default value: 'png'. | The image type of the tiles. |
tileUrl | string|@(zoomlevel, x, y) = string> | The part of the url that defines which tile to retrieve. |
Transform WGS to local coordinates
Transform local coordinates to WGS
Transform local coordinates to pixel coordinates, all in 1
Transform pixel coordinates to local coordinates, all in 1
Transform y-coordinate in pixels to second local coordinate.
Transform x-coordinate in pixels to first local coordinate.
Transform local y coordinate to y-coordinate in pixels.
Transform local x coordinate to x-coordinate in pixels.
Get the maximum number of pixels in y or x for a zoomlevel.
Get url to retrieve a specific tile at a given (x,y) index and zoomlevel from the tileserver
url = getTileUrl(obj, zoomlevel, x, y)
obj | modelit.mapviewer.PDOKTileSource | |
zoomlevel | integer | the zoomlevel. Choose zoomlevel between getMinZoomLevel and getMaxZoomLevel |
x | number | Horizontal tile index. |
y | number | Vertical tile index. |
url | string | url for a tile with index (x,y) and zoomlevel at the tileserver. |
Get the base url for this TileSource, use this with getTileUrl. To get the url for a specific tile at a specific coordinate and zoomlevel.
url = getBaseUrl(obj)
obj | modelit.mapviewer.AbstractTileSource |
url | string | with base url. |
Get the image type of the tiles.
type = getTileType(obj)
obj | modelit.mapviewer.AbstractTileSource |
type | string | with image type. For OpenStreetMap tiles type='png' |
The minimum zoom value. This value is usually 0.
zoom = getMinZoomLevel(obj)
obj | modelit.mapviewer.AbstractTileSource |
zoom | integer | with the minimum (less detailed) zoomlevel. |
The maximum zoom value.
zoom = getMaxZoomLevel(obj)
obj | modelit.mapviewer.AbstractTileSource |
zoom | integer | with the maximum (most detailed) zoomlevel. |
Get name that uniquely identifies this tilesource. Used for caching.
name = getName(obj)
obj | modelit.mapviewer.AbstractTileSource |
name | string |
The tilesize of the square tiles in pixels.
tileSize = getTileSize(obj)
obj | modelit.mapviewer.AbstractTileSource |
tileSize | integer | the width and height for a tile in pixels. |
modelit.mapviewer.AbstractTileSource/AbstractTileSource is a constructor. obj = modelit.mapviewer.AbstractTileSource modelit.mapviewer.AbstractTileSource Properties: numberOfThreads - Number of threads that can be used to download the tiles. minZoomLevel - Minimum (lowest detail) zoomlevel. maxZoomLevel - Maximum (greatest detail) zoomlevel. baseUrl - The tile url without parameters. tileUrl - The part of the url that defines which tile to retrieve. name - The name of the tilesource. tileType - The image type of the tiles. isWGS - Return true if WGS coordinate. modelit.mapviewer.AbstractTileSource Methods: WGSToLocal - (Abstract) Transform WGS to local coordinates localToWGS - (Abstract) Transform local coordinates to WGS localToPixel - (Abstract) Transform local coordinates to pixel coordinates, all in 1 pixelToLocal - (Abstract) Transform pixel coordinates to local coordinates, all in 1 YToLat - (Abstract) Transform y-coordinate in pixels to second local coordinate. XToLon - (Abstract) Transform x-coordinate in pixels to first local coordinate. LatToY - (Abstract) Transform local y coordinate to y-coordinate in pixels. LonToX - (Abstract) Transform local x coordinate to x-coordinate in pixels. getMaxPixels - (Abstract) Get the maximum number of pixels in y or x for a zoomlevel. getTileSize - (Abstract) Get the size (height and width) of each tile in pixels getTileUrl - Get url to retrieve a specific tile at a given (x,y) index getBaseUrl - Get the base url for this TileSource, use this with getTileUrl. getTileType - Get the image type of the tiles. getMinZoomLevel - The minimum zoom value. This value is usually 0. getMaxZoomLevel - The maximum zoom value. getName - Get name that uniquely identifies this tilesource. AbstractTileSource - modelit.mapviewer.AbstractTileSource/AbstractTileSource is a constructor.