diff --git a/docs/API.md b/docs/API.md index e400cdf..e672e86 100644 --- a/docs/API.md +++ b/docs/API.md @@ -17,15 +17,17 @@ * [MBTilesVectorOptions][13] * [sqlWorkers][14] * [layers][15] - * [pool][16] -* [SQLOptions][17] - * [url][18] - * [sqlWorkers][19] - * [maxSqlPageSize][20] - * [sqlCacheSize][21] - * [backendType][22] -* [importMBTiles][23] - * [Parameters][24] + * [minZoom][16] + * [maxZoom][17] + * [pool][18] +* [SQLOptions][19] + * [url][20] + * [sqlWorkers][21] + * [maxSqlPageSize][22] + * [sqlCacheSize][23] + * [backendType][24] +* [importMBTiles][25] + * [Parameters][26] ## MBTilesRasterSource @@ -41,7 +43,7 @@ automatically garbage-collect unless the dispose() method is invoked. If you need to dispose a map that can potentially contain MBTilesSource objects, check loadExample() in -[https://github.com/mmomtchev/ol-mbtiles/blob/main/examples/index.ts#L15][25] +[https://github.com/mmomtchev/ol-mbtiles/blob/main/examples/index.ts#L15][27] ### Parameters @@ -57,25 +59,29 @@ Options for creating a MBTilesRasterSource Number of parallel workers to use for retrieving tiles, @default 4 -Type: [number][26] +Type: [number][28] ### layers List of layer names to selectively include, @default everything -Type: [Array][27]<[string][28]> +Type: [Array][29]<[string][30]> ### minZoom -Alternative method of specifying minZoom, mutually exclusive with tileGrid, requires explicit projection +Alternative method of specifying minZoom, mutually exclusive with tileGrid, requires explicit projection. +This refers to the available zoom levels of the tiled data and it is different from the OpenLayers minZoom +parameter that applies to the layer. -Type: [number][26] +Type: [number][28] ### maxZoom -Alternative method of specifying minZoom, mutually exclusive with tileGrid, requires explicit projection +Alternative method of specifying maxZoom, mutually exclusive with tileGrid, requires explicit projection +This refers to the available zoom levels of the tiled data and it is different from the OpenLayers maxZoom +parameter that applies to the layer. -Type: [number][26] +Type: [number][28] ### tileGrid @@ -87,13 +93,13 @@ Type: TileGrid Optional already open SQLiteHTTP pool (mutually exclusive with url) -Type: [Promise][29]\ +Type: [Promise][31]\ ### mime -Optional MIME type for loaded tiles (see [https://github.com/mmomtchev/ol-mbtiles/issues/68][30]) +Optional MIME type for loaded tiles (see [https://github.com/mmomtchev/ol-mbtiles/issues/68][32]) -Type: [string][28] +Type: [string][30] ## MBTilesVectorSource @@ -109,7 +115,7 @@ automatically garbage-collect unless the dispose() method is invoked. If you need to dispose a map that can potentially contain MBTilesSource objects, check loadExample() in -[https://github.com/mmomtchev/ol-mbtiles/blob/main/examples/index.ts#L15][25] +[https://github.com/mmomtchev/ol-mbtiles/blob/main/examples/index.ts#L15][27] ### Parameters @@ -125,19 +131,35 @@ Options for creating a MBTilesVectorSource Number of parallel workers to use for retrieving tiles, @default 4 -Type: [number][26] +Type: [number][28] ### layers List of layer names to selectively include, @default everything -Type: [Array][27]<[string][28]> +Type: [Array][29]<[string][30]> + +### minZoom + +Minimum available zoom level. +This refers to the available zoom levels of the tiled data and it is different from the OpenLayers minZoom +parameter that applies to the layer. + +Type: [number][28] + +### maxZoom + +Maximum available zoom level. +This refers to the available zoom levels of the tiled data and it is different from the OpenLayers maxZoom +parameter that applies to the layer. + +Type: [number][28] ### pool Optional already open SQLiteHTTP pool (mutually exclusive with url) -Type: [Promise][29]\ +Type: [Promise][31]\ ## SQLOptions @@ -147,25 +169,25 @@ Shared options for all MBTiles URL of the remote MBTiles source -Type: [string][28] +Type: [string][30] ### sqlWorkers Number of parallel workers to use for retrieving tiles, @default 4 -Type: [number][26] +Type: [number][28] ### maxSqlPageSize Maximum expected page size in bytes for SQLite3 files, @default 4096 -Type: [number][26] +Type: [number][28] ### sqlCacheSize Memory to use for SQLite cache in KB, @default 4096 -Type: [number][26] +Type: [number][28] ### backendType @@ -214,32 +236,36 @@ Returns **([MBTilesRasterOptions][3] | [MBTilesVectorOptions][13])** [15]: #layers-1 -[16]: #pool-1 +[16]: #minzoom-1 + +[17]: #maxzoom-1 + +[18]: #pool-1 -[17]: #sqloptions +[19]: #sqloptions -[18]: #url +[20]: #url -[19]: #sqlworkers-2 +[21]: #sqlworkers-2 -[20]: #maxsqlpagesize +[22]: #maxsqlpagesize -[21]: #sqlcachesize +[23]: #sqlcachesize -[22]: #backendtype +[24]: #backendtype -[23]: #importmbtiles +[25]: #importmbtiles -[24]: #parameters-2 +[26]: #parameters-2 -[25]: https://github.com/mmomtchev/ol-mbtiles/blob/main/examples/index.ts#L15 +[27]: https://github.com/mmomtchev/ol-mbtiles/blob/main/examples/index.ts#L15 -[26]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +[28]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number -[27]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array +[29]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array -[28]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +[30]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String -[29]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise +[31]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise -[30]: https://github.com/mmomtchev/ol-mbtiles/issues/68 +[32]: https://github.com/mmomtchev/ol-mbtiles/issues/68 diff --git a/package-lock.json b/package-lock.json index cf5822e..4094f46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ol-mbtiles", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ol-mbtiles", - "version": "2.1.0", + "version": "2.2.0", "license": "ISC", "dependencies": { "@mapbox/vector-tile": "^1.3.1", diff --git a/package.json b/package.json index 48d5cee..1ac0732 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ol-mbtiles", - "version": "2.1.0", + "version": "2.2.0", "description": "MBTiles format reader for Openlayers", "main": "dist/index.js", "types": "dist/index.d.ts",