Expose original getGutter
TileWMS objects take a gutter option but do not have a public getter for it. This makes it convoluted for user code to recreate the object (ex: in the case of serialization/deserialization). - the getGutterInternal() method is renamed to getGutter; - the getGutter(projection) method is renamed to getGutterForProjection, which is also more explicit. The getGutter method was not API and is only used by the renderer.
This commit is contained in:
@@ -164,20 +164,19 @@ class TileImage extends UrlTile {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
getGutter(projection) {
|
||||
getGutterForProjection(projection) {
|
||||
if (ENABLE_RASTER_REPROJECTION &&
|
||||
this.getProjection() && projection && !equivalent(this.getProjection(), projection)) {
|
||||
return 0;
|
||||
} else {
|
||||
return this.getGutterInternal();
|
||||
return this.getGutter();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @return {number} Gutter.
|
||||
*/
|
||||
getGutterInternal() {
|
||||
getGutter() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -289,7 +288,7 @@ class TileImage extends UrlTile {
|
||||
sourceProjection, sourceTileGrid,
|
||||
projection, targetTileGrid,
|
||||
tileCoord, wrappedTileCoord, this.getTilePixelRatio(pixelRatio),
|
||||
this.getGutterInternal(),
|
||||
this.getGutter(),
|
||||
function(z, x, y, pixelRatio) {
|
||||
return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);
|
||||
}.bind(this), this.reprojectionErrorThreshold_,
|
||||
|
||||
Reference in New Issue
Block a user