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:
Guillaume Beraudo
2018-08-02 17:12:41 +02:00
parent c74faaa7ca
commit fe86d2e7f7
6 changed files with 9 additions and 10 deletions

View File

@@ -259,7 +259,7 @@ class CanvasTileLayerRenderer extends IntermediateCanvasRenderer {
currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);
currentResolution = tileGrid.getResolution(currentZ);
currentScale = currentResolution / tileResolution;
tileGutter = tilePixelRatio * tileSource.getGutter(projection);
tileGutter = tilePixelRatio * tileSource.getGutterForProjection(projection);
tilesToDraw = tilesToDrawByZ[currentZ];
for (const tileCoordKey in tilesToDraw) {
tile = tilesToDraw[tileCoordKey];