From 3e17bef44bd0a2991f342b9b9d798f0492f0149e Mon Sep 17 00:00:00 2001 From: Blayne Chard Date: Thu, 26 May 2022 09:59:34 +1200 Subject: [PATCH] fix(lambda-tiler): do not serve mvt in the wrong projection --- packages/lambda-tiler/src/tile.set.vector.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/lambda-tiler/src/tile.set.vector.ts b/packages/lambda-tiler/src/tile.set.vector.ts index 9d7648c19..0954a9948 100644 --- a/packages/lambda-tiler/src/tile.set.vector.ts +++ b/packages/lambda-tiler/src/tile.set.vector.ts @@ -1,5 +1,5 @@ import { ConfigTileSetVector, TileSetNameComponents, TileSetNameParser, TileSetType } from '@basemaps/config'; -import { TileMatrixSet, VectorFormat } from '@basemaps/geo'; +import { GoogleTms, TileMatrixSet, VectorFormat } from '@basemaps/geo'; import { fsa, TileDataXyz } from '@basemaps/shared'; import { Cotar } from '@cotar/core'; import { HttpHeader, LambdaHttpRequest, LambdaHttpResponse } from '@linzjs/lambda'; @@ -53,6 +53,7 @@ export class TileSetVector { async tile(req: LambdaHttpRequest, xyz: TileDataXyz): Promise { if (xyz.ext !== VectorFormat.MapboxVectorTiles) return NotFound; + if (xyz.tileMatrix.identifier !== GoogleTms.identifier) return NotFound; if (this.tileSet.layers.length > 1) return new LambdaHttpResponse(500, 'Too many layers in tileset'); const [layer] = this.tileSet.layers; if (layer[3857] == null) return new LambdaHttpResponse(500, 'Layer url not found from tileset Config');