@basemaps/lambda-tiler 6.29.0 → 6.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/build/__tests__/config.data.d.ts +11 -0
  3. package/build/__tests__/config.data.d.ts.map +1 -0
  4. package/build/__tests__/config.data.js +112 -0
  5. package/build/__tests__/config.data.js.map +1 -0
  6. package/build/__tests__/index.test.js +5 -14
  7. package/build/__tests__/index.test.js.map +1 -0
  8. package/build/__tests__/tile.style.json.test.js +1 -0
  9. package/build/__tests__/tile.style.json.test.js.map +1 -0
  10. package/build/__tests__/wmts.capability.test.d.ts +1 -1
  11. package/build/__tests__/wmts.capability.test.d.ts.map +1 -1
  12. package/build/__tests__/wmts.capability.test.js +286 -125
  13. package/build/__tests__/wmts.capability.test.js.map +1 -0
  14. package/build/__tests__/xyz.util.d.ts +7 -11
  15. package/build/__tests__/xyz.util.d.ts.map +1 -1
  16. package/build/__tests__/xyz.util.js +14 -42
  17. package/build/__tests__/xyz.util.js.map +1 -0
  18. package/build/index.d.ts +0 -2
  19. package/build/index.d.ts.map +1 -1
  20. package/build/index.js +68 -41
  21. package/build/index.js.map +1 -0
  22. package/build/routes/__tests__/attribution.test.js +351 -399
  23. package/build/routes/__tests__/attribution.test.js.map +1 -0
  24. package/build/routes/__tests__/fonts.test.js +17 -3
  25. package/build/routes/__tests__/fonts.test.js.map +1 -0
  26. package/build/routes/__tests__/health.test.js +17 -13
  27. package/build/routes/__tests__/health.test.js.map +1 -0
  28. package/build/routes/__tests__/imagery.test.js +1 -0
  29. package/build/routes/__tests__/imagery.test.js.map +1 -0
  30. package/build/routes/__tests__/memory.fs.js +1 -0
  31. package/build/routes/__tests__/memory.fs.js.map +1 -0
  32. package/build/routes/__tests__/sprites.test.js +7 -0
  33. package/build/routes/__tests__/sprites.test.js.map +1 -0
  34. package/build/routes/__tests__/tile.json.test.d.ts +2 -0
  35. package/build/routes/__tests__/tile.json.test.d.ts.map +1 -0
  36. package/build/routes/__tests__/tile.json.test.js +124 -0
  37. package/build/routes/__tests__/tile.json.test.js.map +1 -0
  38. package/build/routes/__tests__/tile.style.json.test.d.ts +2 -0
  39. package/build/routes/__tests__/tile.style.json.test.d.ts.map +1 -0
  40. package/build/routes/__tests__/tile.style.json.test.js +95 -0
  41. package/build/routes/__tests__/tile.style.json.test.js.map +1 -0
  42. package/build/routes/__tests__/wmts.test.js +37 -27
  43. package/build/routes/__tests__/wmts.test.js.map +1 -0
  44. package/build/{__tests__ → routes/__tests__}/xyz.test.d.ts +0 -0
  45. package/build/routes/__tests__/xyz.test.d.ts.map +1 -0
  46. package/build/routes/__tests__/xyz.test.js +99 -0
  47. package/build/routes/__tests__/xyz.test.js.map +1 -0
  48. package/build/routes/attribution.d.ts +7 -5
  49. package/build/routes/attribution.d.ts.map +1 -1
  50. package/build/routes/attribution.js +50 -91
  51. package/build/routes/attribution.js.map +1 -0
  52. package/build/routes/fonts.d.ts +1 -1
  53. package/build/routes/fonts.d.ts.map +1 -1
  54. package/build/routes/fonts.js +33 -10
  55. package/build/routes/fonts.js.map +1 -0
  56. package/build/routes/health.d.ts +3 -3
  57. package/build/routes/health.d.ts.map +1 -1
  58. package/build/routes/health.js +16 -13
  59. package/build/routes/health.js.map +1 -0
  60. package/build/routes/imagery.d.ts +8 -1
  61. package/build/routes/imagery.d.ts.map +1 -1
  62. package/build/routes/imagery.js +17 -17
  63. package/build/routes/imagery.js.map +1 -0
  64. package/build/routes/ping.d.ts +3 -0
  65. package/build/routes/ping.d.ts.map +1 -0
  66. package/build/routes/ping.js +7 -0
  67. package/build/routes/ping.js.map +1 -0
  68. package/build/routes/sprites.d.ts.map +1 -1
  69. package/build/routes/sprites.js +22 -22
  70. package/build/routes/sprites.js.map +1 -0
  71. package/build/routes/tile.json.d.ts +7 -1
  72. package/build/routes/tile.json.d.ts.map +1 -1
  73. package/build/routes/tile.json.js +19 -22
  74. package/build/routes/tile.json.js.map +1 -0
  75. package/build/routes/tile.style.json.d.ts +6 -1
  76. package/build/routes/tile.style.json.d.ts.map +1 -1
  77. package/build/routes/tile.style.json.js +11 -13
  78. package/build/routes/tile.style.json.js.map +1 -0
  79. package/build/routes/tile.wmts.d.ts +9 -3
  80. package/build/routes/tile.wmts.d.ts.map +1 -1
  81. package/build/routes/tile.wmts.js +37 -50
  82. package/build/routes/tile.wmts.js.map +1 -0
  83. package/build/routes/tile.xyz.d.ts +14 -4
  84. package/build/routes/tile.xyz.d.ts.map +1 -1
  85. package/build/routes/tile.xyz.js +22 -17
  86. package/build/routes/tile.xyz.js.map +1 -0
  87. package/build/routes/tile.xyz.raster.d.ts +11 -0
  88. package/build/routes/tile.xyz.raster.d.ts.map +1 -0
  89. package/build/routes/tile.xyz.raster.js +90 -0
  90. package/build/routes/tile.xyz.raster.js.map +1 -0
  91. package/build/routes/tile.xyz.vector.d.ts +8 -0
  92. package/build/routes/tile.xyz.vector.d.ts.map +1 -0
  93. package/build/routes/tile.xyz.vector.js +46 -0
  94. package/build/routes/tile.xyz.vector.js.map +1 -0
  95. package/build/routes/version.d.ts +3 -0
  96. package/build/routes/version.d.ts.map +1 -0
  97. package/build/routes/version.js +9 -0
  98. package/build/routes/version.js.map +1 -0
  99. package/build/util/__test__/validate.test.d.ts +2 -0
  100. package/build/util/__test__/validate.test.d.ts.map +1 -0
  101. package/build/util/__test__/validate.test.js +66 -0
  102. package/build/util/__test__/validate.test.js.map +1 -0
  103. package/build/util/cotar.serve.d.ts +20 -0
  104. package/build/util/cotar.serve.d.ts.map +1 -0
  105. package/build/util/cotar.serve.js +41 -0
  106. package/build/util/cotar.serve.js.map +1 -0
  107. package/build/util/etag.d.ts +6 -0
  108. package/build/util/etag.d.ts.map +1 -0
  109. package/build/util/etag.js +20 -0
  110. package/build/util/etag.js.map +1 -0
  111. package/build/util/response.d.ts +4 -0
  112. package/build/util/response.d.ts.map +1 -0
  113. package/build/util/response.js +4 -0
  114. package/build/util/response.js.map +1 -0
  115. package/build/util/source.cache.d.ts +28 -0
  116. package/build/util/source.cache.d.ts.map +1 -0
  117. package/build/util/source.cache.js +53 -0
  118. package/build/util/source.cache.js.map +1 -0
  119. package/build/{source.tracer.d.ts → util/source.tracer.d.ts} +1 -0
  120. package/build/util/source.tracer.d.ts.map +1 -0
  121. package/build/{source.tracer.js → util/source.tracer.js} +4 -0
  122. package/build/util/source.tracer.js.map +1 -0
  123. package/build/util/swapping.lru.d.ts +21 -0
  124. package/build/util/swapping.lru.d.ts.map +1 -0
  125. package/build/util/swapping.lru.js +56 -0
  126. package/build/util/swapping.lru.js.map +1 -0
  127. package/build/util/validate.d.ts +46 -0
  128. package/build/util/validate.d.ts.map +1 -0
  129. package/build/util/validate.js +107 -0
  130. package/build/util/validate.js.map +1 -0
  131. package/build/wmts.capability.d.ts +27 -13
  132. package/build/wmts.capability.d.ts.map +1 -1
  133. package/build/wmts.capability.js +156 -55
  134. package/build/wmts.capability.js.map +1 -0
  135. package/dist/index.js +89 -73
  136. package/dist/node_modules/.package-lock.json +1 -1
  137. package/dist/package-lock.json +2 -2
  138. package/dist/package.json +1 -1
  139. package/package.json +10 -10
  140. package/src/__tests__/config.data.ts +120 -0
  141. package/src/__tests__/index.test.ts +4 -20
  142. package/src/__tests__/wmts.capability.test.ts +312 -139
  143. package/src/__tests__/xyz.util.ts +17 -45
  144. package/src/index.ts +75 -41
  145. package/src/routes/__tests__/attribution.test.ts +356 -403
  146. package/src/routes/__tests__/fonts.test.ts +18 -3
  147. package/src/routes/__tests__/health.test.ts +17 -13
  148. package/src/routes/__tests__/sprites.test.ts +6 -1
  149. package/src/routes/__tests__/tile.json.test.ts +145 -0
  150. package/src/routes/__tests__/tile.style.json.test.ts +105 -0
  151. package/src/routes/__tests__/wmts.test.ts +44 -34
  152. package/src/routes/__tests__/xyz.test.ts +119 -0
  153. package/src/routes/attribution.ts +59 -111
  154. package/src/routes/fonts.ts +32 -10
  155. package/src/routes/health.ts +17 -16
  156. package/src/routes/imagery.ts +18 -15
  157. package/src/routes/ping.ts +8 -0
  158. package/src/routes/sprites.ts +20 -22
  159. package/src/routes/tile.json.ts +24 -19
  160. package/src/routes/tile.style.json.ts +15 -12
  161. package/src/routes/tile.wmts.ts +41 -44
  162. package/src/routes/tile.xyz.raster.ts +106 -0
  163. package/src/routes/tile.xyz.ts +31 -16
  164. package/src/routes/tile.xyz.vector.ts +47 -0
  165. package/src/routes/version.ts +8 -0
  166. package/src/util/__test__/validate.test.ts +74 -0
  167. package/src/util/cotar.serve.ts +46 -0
  168. package/src/util/etag.ts +20 -0
  169. package/src/util/response.ts +4 -0
  170. package/src/util/source.cache.ts +71 -0
  171. package/src/{source.tracer.ts → util/source.tracer.ts} +4 -0
  172. package/src/util/swapping.lru.ts +63 -0
  173. package/src/util/validate.ts +126 -0
  174. package/src/wmts.capability.ts +170 -68
  175. package/tsconfig.tsbuildinfo +1 -1
  176. package/build/__tests__/route.test.d.ts +0 -2
  177. package/build/__tests__/route.test.d.ts.map +0 -1
  178. package/build/__tests__/route.test.js +0 -20
  179. package/build/__tests__/tiff.cache.test.d.ts +0 -2
  180. package/build/__tests__/tiff.cache.test.d.ts.map +0 -1
  181. package/build/__tests__/tiff.cache.test.js +0 -58
  182. package/build/__tests__/tile.cache.key.test.d.ts +0 -2
  183. package/build/__tests__/tile.cache.key.test.d.ts.map +0 -1
  184. package/build/__tests__/tile.cache.key.test.js +0 -48
  185. package/build/__tests__/tile.set.cache.test.d.ts +0 -2
  186. package/build/__tests__/tile.set.cache.test.d.ts.map +0 -1
  187. package/build/__tests__/tile.set.cache.test.js +0 -123
  188. package/build/__tests__/tile.set.test.d.ts +0 -2
  189. package/build/__tests__/tile.set.test.d.ts.map +0 -1
  190. package/build/__tests__/tile.set.test.js +0 -11
  191. package/build/__tests__/xyz.test.d.ts.map +0 -1
  192. package/build/__tests__/xyz.test.js +0 -306
  193. package/build/api.key.d.ts +0 -2
  194. package/build/api.key.d.ts.map +0 -1
  195. package/build/api.key.js +0 -23
  196. package/build/cli/dump.d.ts +0 -2
  197. package/build/cli/dump.d.ts.map +0 -1
  198. package/build/cli/dump.js +0 -47
  199. package/build/cli/tile.set.local.d.ts +0 -12
  200. package/build/cli/tile.set.local.d.ts.map +0 -1
  201. package/build/cli/tile.set.local.js +0 -39
  202. package/build/router.d.ts +0 -15
  203. package/build/router.d.ts.map +0 -1
  204. package/build/router.js +0 -49
  205. package/build/routes/api.d.ts +0 -5
  206. package/build/routes/api.d.ts.map +0 -1
  207. package/build/routes/api.js +0 -16
  208. package/build/routes/esri/rest.d.ts +0 -10
  209. package/build/routes/esri/rest.d.ts.map +0 -1
  210. package/build/routes/esri/rest.js +0 -87
  211. package/build/routes/response.d.ts +0 -4
  212. package/build/routes/response.d.ts.map +0 -1
  213. package/build/routes/response.js +0 -3
  214. package/build/routes/tile.d.ts +0 -3
  215. package/build/routes/tile.d.ts.map +0 -1
  216. package/build/routes/tile.etag.d.ts +0 -11
  217. package/build/routes/tile.etag.d.ts.map +0 -1
  218. package/build/routes/tile.etag.js +0 -29
  219. package/build/routes/tile.js +0 -27
  220. package/build/source.tracer.d.ts.map +0 -1
  221. package/build/tiff.cache.d.ts +0 -17
  222. package/build/tiff.cache.d.ts.map +0 -1
  223. package/build/tiff.cache.js +0 -45
  224. package/build/tile.set.cache.d.ts +0 -21
  225. package/build/tile.set.cache.d.ts.map +0 -1
  226. package/build/tile.set.cache.js +0 -100
  227. package/build/tile.set.d.ts +0 -4
  228. package/build/tile.set.d.ts.map +0 -1
  229. package/build/tile.set.js +0 -1
  230. package/build/tile.set.raster.d.ts +0 -49
  231. package/build/tile.set.raster.d.ts.map +0 -1
  232. package/build/tile.set.raster.js +0 -186
  233. package/build/tile.set.vector.d.ts +0 -25
  234. package/build/tile.set.vector.d.ts.map +0 -1
  235. package/build/tile.set.vector.js +0 -71
  236. package/build/validate.d.ts +0 -16
  237. package/build/validate.d.ts.map +0 -1
  238. package/build/validate.js +0 -31
  239. package/src/__tests__/route.test.ts +0 -24
  240. package/src/__tests__/tiff.cache.test.ts +0 -73
  241. package/src/__tests__/tile.cache.key.test.ts +0 -56
  242. package/src/__tests__/tile.set.cache.test.ts +0 -146
  243. package/src/__tests__/tile.set.test.ts +0 -12
  244. package/src/__tests__/xyz.test.ts +0 -362
  245. package/src/api.key.ts +0 -23
  246. package/src/cli/dump.ts +0 -61
  247. package/src/cli/tile.set.local.ts +0 -51
  248. package/src/router.ts +0 -58
  249. package/src/routes/api.ts +0 -19
  250. package/src/routes/esri/rest.ts +0 -90
  251. package/src/routes/response.ts +0 -4
  252. package/src/routes/tile.etag.ts +0 -36
  253. package/src/routes/tile.ts +0 -23
  254. package/src/tiff.cache.ts +0 -51
  255. package/src/tile.set.cache.ts +0 -111
  256. package/src/tile.set.raster.ts +0 -228
  257. package/src/tile.set.ts +0 -4
  258. package/src/tile.set.vector.ts +0 -79
  259. package/src/validate.ts +0 -32
@@ -1,17 +1,13 @@
1
- import { ConfigProvider } from '@basemaps/config';
2
- import { TileMatrixSet } from '@basemaps/geo';
3
1
  import { LogConfig } from '@basemaps/shared';
4
- import { LambdaAlbRequest, LambdaHttpRequest } from '@linzjs/lambda';
2
+ import { LambdaAlbRequest, LambdaHttpRequest, LambdaUrlRequest } from '@linzjs/lambda';
5
3
  import { Context } from 'aws-lambda';
6
- import { TileSetRaster } from '../tile.set.raster.js';
7
- import { TileSetVector } from '../tile.set.vector.js';
8
4
 
9
5
  export function mockRequest(path: string, method = 'get', headers: Record<string, string> = {}): LambdaHttpRequest {
10
6
  return new LambdaAlbRequest(
11
7
  {
12
8
  requestContext: null as any,
13
9
  httpMethod: method.toUpperCase(),
14
- path,
10
+ path: encodeURI(path),
15
11
  headers,
16
12
  body: null,
17
13
  isBase64Encoded: false,
@@ -21,45 +17,21 @@ export function mockRequest(path: string, method = 'get', headers: Record<string
21
17
  );
22
18
  }
23
19
 
24
- export class FakeTileSet extends TileSetRaster {
25
- constructor(name: string, tileMatrix: TileMatrixSet, title = `${name}:title`, description = `${name}:description`) {
26
- super(name, tileMatrix);
27
- this.tileSet = { title, description } as any;
28
- }
29
- }
30
-
31
- export class FakeTileSetVector extends TileSetVector {
32
- constructor(name: string, tileMatrix: TileMatrixSet) {
33
- super(name, tileMatrix);
34
- this.tileSet = {} as any;
35
- }
20
+ export function mockUrlRequest(path: string, query = '', headers: Record<string, unknown> = {}): LambdaHttpRequest {
21
+ return new LambdaUrlRequest(
22
+ {
23
+ requestContext: { http: { method: 'GET' } },
24
+ headers,
25
+ rawPath: encodeURI(path),
26
+ rawQueryString: query,
27
+ isBase64Encoded: false,
28
+ } as any,
29
+ {} as Context,
30
+ LogConfig.get(),
31
+ );
36
32
  }
37
33
 
38
- export const Provider: ConfigProvider = {
39
- name: 'main',
40
- id: 'pv_main_production',
41
- updatedAt: Date.now(),
42
- version: 1,
43
- serviceIdentification: {
44
- accessConstraints: 'the accessConstraints',
45
- description: 'the description',
46
- fees: 'the fees',
47
- title: 'the title',
48
- },
49
- serviceProvider: {
50
- contact: {
51
- address: {
52
- city: 'the city',
53
- country: 'the country',
54
- deliveryPoint: 'the deliveryPoint',
55
- email: 'email address',
56
- postalCode: 'the postalCode',
57
- },
58
- individualName: 'the contact name',
59
- phone: 'the phone',
60
- position: 'the position',
61
- },
62
- name: 'the name',
63
- site: 'https://example.provider.com',
64
- },
34
+ export const Api = {
35
+ key: 'd01f7w7rnhdzg0p7fyrc9v9ard1',
36
+ header: { 'x-linz-api-key': 'd01f7w7rnhdzg0p7fyrc9v9ard1' },
65
37
  };
package/src/index.ts CHANGED
@@ -1,59 +1,93 @@
1
- import { lf, LambdaHttpRequest, LambdaHttpResponse } from '@linzjs/lambda';
2
1
  import { LogConfig } from '@basemaps/shared';
3
- import { Ping, Version } from './routes/api.js';
4
- import { Health } from './routes/health.js';
5
- import { Tiles } from './routes/tile.js';
6
- import { Router } from './router.js';
7
- import { createHash } from 'crypto';
8
- import { Imagery } from './routes/imagery.js';
9
- import { Esri } from './routes/esri/rest.js';
10
- import { St } from './source.tracer.js';
11
- import { spriteGet } from './routes/sprites.js';
2
+ import { LambdaHttpResponse, LambdaUrlRequest, lf } from '@linzjs/lambda';
3
+ import { tileAttributionGet } from './routes/attribution.js';
12
4
  import { fontGet, fontList } from './routes/fonts.js';
5
+ import { healthGet } from './routes/health.js';
6
+ import { imageryGet } from './routes/imagery.js';
7
+ import { pingGet } from './routes/ping.js';
8
+ import { spriteGet } from './routes/sprites.js';
9
+ import { tileJsonGet } from './routes/tile.json.js';
10
+ import { styleJsonGet } from './routes/tile.style.json.js';
11
+ import { wmtsCapabilitiesGet } from './routes/tile.wmts.js';
12
+ import { tileXyzGet } from './routes/tile.xyz.js';
13
+ import { versionGet } from './routes/version.js';
14
+ import { NotFound } from './util/response.js';
15
+ import { CoSources } from './util/source.cache.js';
16
+ import { St } from './util/source.tracer.js';
13
17
 
14
- const app = new Router();
18
+ export const handler = lf.http(LogConfig.get());
15
19
 
16
- app.get('ping', Ping);
17
- app.get('health', Health);
18
- app.get('version', Version);
19
- app.get('tiles', Tiles);
20
- app.get('imagery', Imagery);
21
- app.get('esri', Esri);
20
+ handler.router.hook('request', (req) => {
21
+ req.set('name', 'LambdaTiler');
22
22
 
23
- let slowTimer: NodeJS.Timer | null = null;
24
- export async function handleRequest(req: LambdaHttpRequest): Promise<LambdaHttpResponse> {
25
- // Reset the request tracing
23
+ // Reset the request tracing before every request
26
24
  St.reset();
25
+ });
27
26
 
28
- // Warn if a request takes more than 10 seconds to process
29
- if (slowTimer) clearTimeout(slowTimer);
30
- slowTimer = setTimeout(() => req.log.warn(req.logContext, 'Lambda:Slow'), 10_000);
31
- slowTimer.unref();
32
-
33
- req.set('name', 'LambdaTiler');
34
- try {
35
- const apiKey = Router.apiKey(req);
36
- if (apiKey != null) {
37
- const apiKeyHash = createHash('sha256').update(apiKey).digest('base64');
38
- req.set('api', apiKeyHash);
39
- }
40
- const ret = await app.handle(req);
41
-
27
+ handler.router.hook('response', (req, res) => {
28
+ if (St.requests.length > 0) {
42
29
  // TODO this could be relaxed to every say 5% of requests if logging gets too verbose.
43
30
  req.set('requests', St.requests.slice(0, 100)); // limit to 100 requests (some tiles need 100s of requests)
44
31
  req.set('requestCount', St.requests.length);
32
+ }
33
+ // Log the source cache hit/miss ratio
34
+ req.set('sources', {
35
+ hits: CoSources.cache.hits,
36
+ misses: CoSources.cache.misses,
37
+ size: CoSources.cache.currentSize,
38
+ resets: CoSources.cache.resets,
39
+ cacheA: CoSources.cache.cacheA.size,
40
+ cacheB: CoSources.cache.cacheB.size,
41
+ });
45
42
 
46
- return ret;
47
- } finally {
48
- if (slowTimer) clearTimeout(slowTimer);
49
- slowTimer = null;
43
+ // FunctionURLs automatically inject CORS responses for us
44
+ if (!(req instanceof LambdaUrlRequest) && req.headers.has('origin')) {
45
+ res.header('access-control-allow-origin', '*');
50
46
  }
51
- }
47
+ });
52
48
 
53
- export const handler = lf.http(LogConfig.get());
49
+ // CORS is handled by function url hook so just return ok if the route exists
50
+ handler.router.options('*', (req) => {
51
+ const route = handler.router.router.find('GET', req.path);
52
+ if (route == null) return NotFound();
53
+ return LambdaHttpResponse.ok();
54
+ });
54
55
 
56
+ // TODO some internal health checks hit these routes, we should change them all to point at /v1/
57
+ handler.router.get('/ping', pingGet);
58
+ handler.router.get('/health', healthGet);
59
+ handler.router.get('/version', versionGet);
60
+
61
+ handler.router.get('/v1/ping', pingGet);
62
+ handler.router.get('/v1/health', healthGet);
63
+ handler.router.get('/v1/version', versionGet);
64
+
65
+ // Image Metadata
66
+ handler.router.get('/v1/imagery/:imageryId/:fileName', imageryGet);
67
+
68
+ // Sprites
55
69
  handler.router.get('/v1/sprites/:spriteName', spriteGet);
70
+
71
+ // Fonts
56
72
  handler.router.get('/v1/fonts.json', fontList);
57
73
  handler.router.get('/v1/fonts/:fontStack/:range.pbf', fontGet);
58
74
 
59
- handler.router.get('*', handleRequest);
75
+ // StyleJSON
76
+ handler.router.get('/v1/styles/:styleName.json', styleJsonGet);
77
+ /** @deprecated 2022-07-22 all styles should be being served from /v1/styles/:styleName.json */
78
+ handler.router.get('/v1/tiles/:tileSet/:tileMatrix/style/:styleName.json', styleJsonGet);
79
+
80
+ // TileJSON
81
+ handler.router.get('/v1/tiles/:tileSet/:tileMatrix/tile.json', tileJsonGet);
82
+
83
+ // Tiles
84
+ handler.router.get('/v1/tiles/:tileSet/:tileMatrix/:z/:x/:y.:tileType', tileXyzGet);
85
+
86
+ // Attribution
87
+ handler.router.get('/v1/tiles/:tileSet/:tileMatrix/attribution.json', tileAttributionGet);
88
+ handler.router.get('/v1/attribution/:tileSet/:tileMatrix/summary.json', tileAttributionGet);
89
+
90
+ // WMTS Capabilities
91
+ handler.router.get('/v1/tiles/:tileSet/:tileMatrix/WMTSCapabilities.xml', wmtsCapabilitiesGet);
92
+ handler.router.get('/v1/tiles/:tileSet/WMTSCapabilities.xml', wmtsCapabilitiesGet);
93
+ handler.router.get('/v1/tiles/WMTSCapabilities.xml', wmtsCapabilitiesGet);