@@ -33,12 +33,18 @@ def register(self, app: FastAPI) -> None:
33
33
self .router .prefix = app .state .router_prefix
34
34
35
35
@self .router .get (
36
- "/collections/{collection_id}/items/{item_id}/WebMercatorQuad /tilejson.json" ,
36
+ "/collections/{collection_id}/items/{item_id}/{tileMatrixSetId} /tilejson.json" ,
37
37
)
38
38
async def tilejson (
39
39
request : Request ,
40
- collection_id : str = Path (description = "Collection ID" ),
41
- item_id : str = Path (description = "Item ID" ),
40
+ collection_id : Annotated [str , Path (description = "Collection ID" )],
41
+ item_id : Annotated [str , Path (description = "Item ID" )],
42
+ tileMatrixSetId : Annotated [
43
+ str ,
44
+ Path (
45
+ description = "Identifier selecting one of the TileMatrixSetId supported."
46
+ ),
47
+ ],
42
48
tile_format : Optional [str ] = Query (
43
49
None , description = "Output image type. Default is auto."
44
50
),
@@ -83,7 +89,7 @@ async def tilejson(
83
89
if key .lower () not in qs_key_to_remove
84
90
]
85
91
return RedirectResponse (
86
- f"{ self .titiler_endpoint } /collections/{ collection_id } /items/{ item_id } /WebMercatorQuad /tilejson.json?{ urlencode (qs )} "
92
+ f"{ self .titiler_endpoint } /collections/{ collection_id } /items/{ item_id } /{ tileMatrixSetId } /tilejson.json?{ urlencode (qs )} "
87
93
)
88
94
89
95
@self .router .get (
@@ -97,8 +103,8 @@ async def tilejson(
97
103
)
98
104
async def stac_viewer (
99
105
request : Request ,
100
- collection_id : str = Path (description = "Collection ID" ),
101
- item_id : str = Path (description = "Item ID" ),
106
+ collection_id : Annotated [ str , Path (description = "Collection ID" )] ,
107
+ item_id : Annotated [ str , Path (description = "Item ID" )] ,
102
108
):
103
109
"""Get items and redirect to stac tiler."""
104
110
qs = [(key , value ) for (key , value ) in request .query_params ._list ]
0 commit comments