modelit.mapviewer.RDTileSource constructor.
baseUrl | string, default value: 'png'. | The tile url without parameters. |
isWGS | Return true if WGS coordinate. | |
MAX_LAT | Maximum latitude (north) for mercator display | |
maxZoomLevel | number | Maximum (greatest detail) zoomlevel. |
MIN_LAT | Minimum latitude (south) for mercator display | |
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. |
Transforms pixel coordinate Y to latitude
lat = YToLat(aY, aZoomlevel)
obj | any | modelit.mapviewer.RDTileSource |
aY | any | Double with y-coordinate in pixelspace. |
aZoomlevel | any | Integer with zoomlevel. |
lat | any | Double with latitude. |
Transforms latitude to pixelspace.
y = LatToY(obj, aLatitude, aZoomlevel)
obj | modelit.mapviewer.RDTileSource | |
aLatitude | number | the latitude. |
aZoomlevel | integer | the zoomlevel. |
y | number | the y-coordinate in pixelspace. |
Transforms pixel coordinate X to RD.
lon = XToLon(obj, aX, aZoomlevel)
obj | modelit.mapviewer.RDTileSource | |
aX | number | the x-coordinate in pixelspace. |
aZoomlevel | integer | the zoomlevel. |
lon | number | the longitude. |
Transform local coordinates to pixel coordinates.
xy = localToPixel(obj, xy_local, aZoomlevel)
obj | any | <modelit.mapviewer.RDTileSource> |
xy_local | any | <Double> Nx2, with local coordinates(RD). |
aZoomlevel | any | <integer> with zoomlevel. |
xy | any | <Double> NNx2, with x-coordinate in pixelspace. |
pixel coordinates to local coordinates (RD), all in 1
Transform longitude to pixelspace.
x = LonToX(obj, aLongitude, aZoomlevel)
obj | any | <modelit.mapviewer.RDTileSource> |
aLongitude | any | <Double> with longitude (RD). |
aZoomlevel | any | <integer> with zoomlevel. |
x | any | <Double> with x-coordinate in pixelspace. |
Determine zoomlevel from x coordinate.
zm = pixel2Zoomlevel(obj, x)
obj | modelit.mapviewer.RDTileSource | |
x | integer|integer[] | pixel coordinate in x direction |
zm | integer | defined as: 2^aZoomlevel * tileSize. |
Get the maximum number of pixels in y or x for a zoomlevel.
maxPixels = getMaxPixels(aZoomlevel)
obj | modelit.mapviewer.RDTileSource | |
aZoomlevel | integer|integer[] | the zoomlevel(s). |
maxPixels | integer | defined as: 2^aZoomlevel * tileSize. |
Get name that uniquely identifies this tilesource. Used for caching.
name = getName(obj)
obj | modelit.mapviewer.RDTileSource |
name | string |
modelit.mapviewer.RDTileSource constructor.
obj = RDTileSource(tileType)
tileType | string | The image type of the tiles. |
obj | modelit.mapviewer.RDTileSource | Documentation for modelit.mapviewer.RDTileSource/RDTileSource doc modelit.mapviewer.RDTileSource |
Transforms WGS coordinates to local (=RD)
xy_local = WGSToLocal(xy_wgs)
obj | any | modelit.mapviewer.RDTileSource wx,wy: WGS coordinates, scalar, vector or matrix |
lon,lat: Coresponding local coordinates (RD)
Transforms local coordinates (=RD) to WGS
[xy_wgs] = localToWGS(xy_local)
xy_local | any | Local coordinates, Nx2, colum1 corresponds to x, column2 corresponds to y |
xy_wgs | any | Coresponding WGS coordinates |
The linear value added to all y-coordinates of a map projection so that none of the values in the geographic region being mapped are negative.
fn = falseNorthing(obj, aZoomlevel)
obj | any | <modelit.mapviewer.RDTileSource> |
aZoomlevel | any | <integer> with zoomlevel. |
fn | any | Corrected y-coordinate. |
The linear value added to all x-coordinates of a map projection so that none of the values in the geographic region being mapped are negative.
fe = falseEasting(obj, aZoomlevel)
obj | any | <modelit.mapviewer.RDTileSource> |
aZoomlevel | any | <integer> with zoomlevel. |
fe | any | Corrected x-coordinate. |
Get radius in pixels at a given zoomlevel.
r = radius(obj, aZoomlevel)
obj | any | <modelit.mapviewer.RDTileSource> |
aZoomlevel | any | <integer> with zoomlevel. |
r | any | Integer with radius in pixels at a given 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. Help for modelit.mapviewer.RDTileSource/getTileUrl is inherited from superclass modelit.mapviewer.AbstractTileSource |
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. Help for modelit.mapviewer.RDTileSource/getBaseUrl is inherited from superclass modelit.mapviewer.AbstractTileSource |
Get the image type of the tiles.
type = getTileType(obj)
obj | modelit.mapviewer.AbstractTileSource |
type | string | with image type. For OpenStreetMap tiles type='png' Help for modelit.mapviewer.RDTileSource/getTileType is inherited from superclass modelit.mapviewer.AbstractTileSource |
The minimum zoom value. This value is usually 0.
zoom = getMinZoomLevel(obj)
obj | modelit.mapviewer.AbstractTileSource |
zoom | integer | with the minimum (less detailed) zoomlevel. Help for modelit.mapviewer.RDTileSource/getMinZoomLevel is inherited from superclass modelit.mapviewer.AbstractTileSource |
The maximum zoom value.
zoom = getMaxZoomLevel(obj)
obj | modelit.mapviewer.AbstractTileSource |
zoom | integer | with the maximum (most detailed) zoomlevel. Help for modelit.mapviewer.RDTileSource/getMaxZoomLevel is inherited from superclass modelit.mapviewer.AbstractTileSource |
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. Help for modelit.mapviewer.RDTileSource/getTileSize is inherited from superclass modelit.mapviewer.AbstractTileSource |