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 id
string Tile id.
isCentroid
boolean 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 resolution
number The resolution.
lat
number 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 levelOfDetail
number 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 longitude
number Longitude coordiante.
latitude
number Latitude coordinate.
level
number 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 bbox
Mapspace.Extent Longitude latitude bbox coordinates.
level
number quadtree level of detail.
- Source:
- mapspace/util/quadtree.js
Returns:
- Type
- Array.<string>