This namespace contains definitions of static functions for usual tasks with quadtrees.
- Source:
- mapspace/util/util.jsdoc
Methods
-
<static> getCoorFromTileId(id, isCentroid)
-
Returns the bounding box or centroid coordinate of one tile id in EPSG:3857 projection.
Parameters:
Name Type Description idstring Tile id.
isCentroidboolean If true only provides de centroid location.
- Source:
- mapspace/util/quadtree.js
Returns:
-
<static> getLevel(resolution, lat)
-
Returns zoom level from a given resolution and latitude.
Parameters:
Name Type Description resolutionnumber The resolution.
latnumber The latitude.
- Source:
- mapspace/util/quadtree.js
Returns:
- Type
- number
-
<static> getMapSize(levelOfDetail)
-
Returns the size in pixels of all the tiles for a given zoom level.
Parameters:
Name Type Description levelOfDetailnumber The zoom level, from zero to maximum zoom level.
- Source:
- mapspace/util/quadtree.js
Returns:
- Type
- number
-
<static> getTileIDFromCoord(longitude, latitude, level)
-
Returns tile id from a coordinate in EPSG:4326 projection.
Parameters:
Name Type Description longitudenumber Longitude coordiante.
latitudenumber Latitude coordinate.
levelnumber Quadtree level of detail.
- Source:
- mapspace/util/quadtree.js
Returns:
- Type
- string
-
<static> getTilesByBbox(bbox, level)
-
Returns an array of tile IDs from a bounding box in EPSG:4326 coordinates.
Parameters:
Name Type Description bboxMapspace.Extent Longitude latitude bbox coordinates.
levelnumber quadtree level of detail.
- Source:
- mapspace/util/quadtree.js
Returns:
- Type
- Array.<string>