Remove lint
This commit is contained in:
@@ -157,9 +157,9 @@ class CartoDB extends XYZ {
|
||||
if (!client.status || (client.status >= 200 && client.status < 300)) {
|
||||
let response;
|
||||
try {
|
||||
response = /** @type {CartoDBLayerInfo} */ (JSON.parse(
|
||||
client.responseText
|
||||
));
|
||||
response = /** @type {CartoDBLayerInfo} */ (
|
||||
JSON.parse(client.responseText)
|
||||
);
|
||||
} catch (err) {
|
||||
this.setState(SourceState.ERROR);
|
||||
return;
|
||||
|
||||
@@ -113,7 +113,10 @@ class ImageWMS extends ImageSource {
|
||||
* @private
|
||||
* @type {import("./WMSServerType.js").default|undefined}
|
||||
*/
|
||||
this.serverType_ = /** @type {import("./WMSServerType.js").default|undefined} */ (options.serverType);
|
||||
this.serverType_ =
|
||||
/** @type {import("./WMSServerType.js").default|undefined} */ (
|
||||
options.serverType
|
||||
);
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
@@ -626,15 +626,13 @@ class RasterSource extends ImageSource {
|
||||
* @private
|
||||
*/
|
||||
updateFrameState_(extent, resolution, projection) {
|
||||
const frameState = /** @type {import("../PluggableMap.js").FrameState} */ (assign(
|
||||
{},
|
||||
this.frameState_
|
||||
));
|
||||
const frameState = /** @type {import("../PluggableMap.js").FrameState} */ (
|
||||
assign({}, this.frameState_)
|
||||
);
|
||||
|
||||
frameState.viewState = /** @type {import("../View.js").State} */ (assign(
|
||||
{},
|
||||
frameState.viewState
|
||||
));
|
||||
frameState.viewState = /** @type {import("../View.js").State} */ (
|
||||
assign({}, frameState.viewState)
|
||||
);
|
||||
|
||||
const center = getCenter(extent);
|
||||
|
||||
|
||||
@@ -153,9 +153,9 @@ class TileSource extends Source {
|
||||
tileCoordKey = getKeyZXY(z, x, y);
|
||||
loaded = false;
|
||||
if (tileCache.containsKey(tileCoordKey)) {
|
||||
tile = /** @type {!import("../Tile.js").default} */ (tileCache.get(
|
||||
tileCoordKey
|
||||
));
|
||||
tile = /** @type {!import("../Tile.js").default} */ (
|
||||
tileCache.get(tileCoordKey)
|
||||
);
|
||||
loaded = tile.getState() === TileState.LOADED;
|
||||
if (loaded) {
|
||||
loaded = callback(tile) !== false;
|
||||
|
||||
@@ -251,9 +251,8 @@ class TileImage extends UrlTile {
|
||||
} else {
|
||||
const projKey = getUid(projection);
|
||||
if (!(projKey in this.tileGridForProjection)) {
|
||||
this.tileGridForProjection[projKey] = getTileGridForProjection(
|
||||
projection
|
||||
);
|
||||
this.tileGridForProjection[projKey] =
|
||||
getTileGridForProjection(projection);
|
||||
}
|
||||
return this.tileGridForProjection[projKey];
|
||||
}
|
||||
@@ -472,7 +471,8 @@ class TileImage extends UrlTile {
|
||||
* @param {string} src Source.
|
||||
*/
|
||||
function defaultTileLoadFunction(imageTile, src) {
|
||||
/** @type {HTMLImageElement|HTMLVideoElement} */ (imageTile.getImage()).src = src;
|
||||
/** @type {HTMLImageElement|HTMLVideoElement} */ (imageTile.getImage()).src =
|
||||
src;
|
||||
}
|
||||
|
||||
export default TileImage;
|
||||
|
||||
@@ -127,7 +127,10 @@ class TileWMS extends TileImage {
|
||||
* @private
|
||||
* @type {import("./WMSServerType.js").default|undefined}
|
||||
*/
|
||||
this.serverType_ = /** @type {import("./WMSServerType.js").default|undefined} */ (options.serverType);
|
||||
this.serverType_ =
|
||||
/** @type {import("./WMSServerType.js").default|undefined} */ (
|
||||
options.serverType
|
||||
);
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
@@ -222,9 +222,9 @@ export class CustomTile extends Tile {
|
||||
if (!client.status || (client.status >= 200 && client.status < 300)) {
|
||||
let response;
|
||||
try {
|
||||
response = /** @type {!UTFGridJSON} */ (JSON.parse(
|
||||
client.responseText
|
||||
));
|
||||
response = /** @type {!UTFGridJSON} */ (
|
||||
JSON.parse(client.responseText)
|
||||
);
|
||||
} catch (err) {
|
||||
this.handleError_();
|
||||
return;
|
||||
@@ -341,9 +341,9 @@ class UTFGrid extends TileSource {
|
||||
if (!client.status || (client.status >= 200 && client.status < 300)) {
|
||||
let response;
|
||||
try {
|
||||
response = /** @type {import("./TileJSON.js").Config} */ (JSON.parse(
|
||||
client.responseText
|
||||
));
|
||||
response = /** @type {import("./TileJSON.js").Config} */ (
|
||||
JSON.parse(client.responseText)
|
||||
);
|
||||
} catch (err) {
|
||||
this.handleTileJSONError();
|
||||
return;
|
||||
@@ -391,13 +391,15 @@ class UTFGrid extends TileSource {
|
||||
if (this.tileGrid) {
|
||||
const z = this.tileGrid.getZForResolution(resolution, this.zDirection);
|
||||
const tileCoord = this.tileGrid.getTileCoordForCoordAndZ(coordinate, z);
|
||||
const tile = /** @type {!CustomTile} */ (this.getTile(
|
||||
tileCoord[0],
|
||||
tileCoord[1],
|
||||
tileCoord[2],
|
||||
1,
|
||||
this.getProjection()
|
||||
));
|
||||
const tile = /** @type {!CustomTile} */ (
|
||||
this.getTile(
|
||||
tileCoord[0],
|
||||
tileCoord[1],
|
||||
tileCoord[2],
|
||||
1,
|
||||
this.getProjection()
|
||||
)
|
||||
);
|
||||
tile.forDataAtCoordinate(coordinate, callback, opt_request);
|
||||
} else {
|
||||
if (opt_request === true) {
|
||||
|
||||
@@ -474,7 +474,9 @@ class VectorSource extends Source {
|
||||
if (!modifyingCollection) {
|
||||
modifyingCollection = true;
|
||||
this.addFeature(
|
||||
/** @type {import("../Feature.js").default<Geometry>} */ (evt.element)
|
||||
/** @type {import("../Feature.js").default<Geometry>} */ (
|
||||
evt.element
|
||||
)
|
||||
);
|
||||
modifyingCollection = false;
|
||||
}
|
||||
@@ -489,7 +491,9 @@ class VectorSource extends Source {
|
||||
if (!modifyingCollection) {
|
||||
modifyingCollection = true;
|
||||
this.removeFeature(
|
||||
/** @type {import("../Feature.js").default<Geometry>} */ (evt.element)
|
||||
/** @type {import("../Feature.js").default<Geometry>} */ (
|
||||
evt.element
|
||||
)
|
||||
);
|
||||
modifyingCollection = false;
|
||||
}
|
||||
@@ -668,7 +672,9 @@ class VectorSource extends Source {
|
||||
extend(features, getValues(this.nullGeometryFeatures_));
|
||||
}
|
||||
}
|
||||
return /** @type {Array<import("../Feature.js").default<Geometry>>} */ (features);
|
||||
return /** @type {Array<import("../Feature.js").default<Geometry>>} */ (
|
||||
features
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -838,7 +844,9 @@ class VectorSource extends Source {
|
||||
* @private
|
||||
*/
|
||||
handleFeatureChange_(event) {
|
||||
const feature = /** @type {import("../Feature.js").default<Geometry>} */ (event.target);
|
||||
const feature = /** @type {import("../Feature.js").default<Geometry>} */ (
|
||||
event.target
|
||||
);
|
||||
const featureKey = getUid(feature);
|
||||
const geometry = feature.getGeometry();
|
||||
if (!geometry) {
|
||||
|
||||
@@ -323,9 +323,8 @@ class VectorTile extends UrlTile {
|
||||
tile.loadingSourceTiles++;
|
||||
}
|
||||
if (sourceTileState === TileState.IDLE) {
|
||||
sourceTile.extent = sourceTileGrid.getTileCoordExtent(
|
||||
sourceTileCoord
|
||||
);
|
||||
sourceTile.extent =
|
||||
sourceTileGrid.getTileCoordExtent(sourceTileCoord);
|
||||
sourceTile.projection = projection;
|
||||
sourceTile.resolution = sourceTileGrid.getResolution(
|
||||
sourceTileCoord[0]
|
||||
@@ -471,9 +470,8 @@ class VectorTile extends UrlTile {
|
||||
*/
|
||||
updateCacheSize(tileCount, projection) {
|
||||
super.updateCacheSize(tileCount * 2, projection);
|
||||
this.sourceTileCache.highWaterMark = this.getTileCacheForProjection(
|
||||
projection
|
||||
).highWaterMark;
|
||||
this.sourceTileCache.highWaterMark =
|
||||
this.getTileCacheForProjection(projection).highWaterMark;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,9 @@ class WMTS extends TileImage {
|
||||
|
||||
const requestEncoding =
|
||||
options.requestEncoding !== undefined
|
||||
? /** @type {import("./WMTSRequestEncoding.js").default} */ (options.requestEncoding)
|
||||
? /** @type {import("./WMTSRequestEncoding.js").default} */ (
|
||||
options.requestEncoding
|
||||
)
|
||||
: WMTSRequestEncoding.KVP;
|
||||
|
||||
// FIXME: should we create a default tileGrid?
|
||||
@@ -293,8 +295,9 @@ class WMTS extends TileImage {
|
||||
return p.toLowerCase() in context ? context[p.toLowerCase()] : m;
|
||||
});
|
||||
|
||||
const tileGrid = /** @type {import("../tilegrid/WMTS.js").default} */ (this
|
||||
.tileGrid);
|
||||
const tileGrid = /** @type {import("../tilegrid/WMTS.js").default} */ (
|
||||
this.tileGrid
|
||||
);
|
||||
const dimensions = this.dimensions_;
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user