Skip to content

Commit 7ed6af7

Browse files
authored
Fix documentation of addProtocol and remove version docs (#779)
* Fix documentation of `addProtocol` and remove `version` docs * Bump to v2.0.1
1 parent 1e14690 commit 7ed6af7

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
- *...Add new stuff here...*
1010

11+
## 2.0.1
12+
13+
### 🐞 Bug fixes
14+
15+
- Fix documentation of `addProtocol` and `removeProtocol`.
16+
1117
## 2.0.0
1218

1319
### Features and improvements

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "maplibre-gl",
33
"description": "BSD licensed community fork of mapbox-gl, a WebGL interactive maps library",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"main": "dist/maplibre-gl.js",
66
"style": "dist/maplibre-gl.css",
77
"license": "BSD-3-Clause",

src/index.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ const exported = {
144144
* The example below will be triggered for custom:// urls defined in the sources list in the style definitions.
145145
* The function passed will receive the request parameters and should call the callback with the resulting request,
146146
* for example a pbf vector tile, non-compressed, represented as ArrayBuffer.
147+
*
148+
* @function addProtocol
147149
* @param {string} customProtocol - the protocol to hook, for example 'custom'
148150
* @param {Function} loadFn - the function to use when trying to fetch a tile specified by the customProtocol
149151
* @example
@@ -176,6 +178,8 @@ const exported = {
176178

177179
/**
178180
* Removes a previusly added protocol
181+
*
182+
* @function removeProtocol
179183
* @param {string} customProtocol - the custom protocol to remove registration for
180184
* @example
181185
* maplibregl.removeProtocol('custom');
@@ -188,13 +192,6 @@ const exported = {
188192
//This gets automatically stripped out in production builds.
189193
Debug.extend(exported, {isSafari, getPerformanceMetrics: PerformanceUtils.getPerformanceMetrics});
190194

191-
/**
192-
* The version of MapLibre GL JS in use as specified in `package.json`,
193-
* `CHANGELOG.md`, and the GitHub release.
194-
*
195-
* @var {string} version
196-
*/
197-
198195
/**
199196
* Test whether the browser supports MapLibre GL JS.
200197
*

0 commit comments

Comments
 (0)