getURL

getURL(baseUrl: String, layer: String, x: Number, y: Number, z: Number, options: Object?): String
Parameters
baseUrl (String) Base url of the WMS server
layer (String) Layer name
x (Number) Tile coordinate x
y (Number) Tile coordinate y
z (Number) Tile zoom
options (Object?)
Name Description
options.format String (default 'image/png')
options.service String (default 'WMS')
options.version String (default '1.1.1')
options.request String (default 'GetMap')
options.srs String (default 'EPSG:3857')
options.width Number (default '256')
options.height Number (default '256')
Returns
String: url
Example
var baseUrl = 'https://img.nj.gov/imagerywms/Natural2015';
var layer = 'Natural2015';
var url = whoots.getURL(baseUrl, layer, 154308, 197167, 19);

getTileBBox

index.mjs

getTileBBox

getTileBBox(x: Number, y: Number, z: Number): String
Parameters
x (Number) Tile coordinate x
y (Number) Tile coordinate y
z (Number) Tile zoom
Returns
String: String of the bounding box

getMercCoords

index.mjs

getMercCoords

getMercCoords(x: Number, y: Number, z: Number): Array
Parameters
x (Number) Pixel coordinate x
y (Number) Pixel coordinate y
z (Number) Tile zoom
Returns
Array: [x, y]