Skip to content

Commit dcc1215

Browse files
authored
Pass frame value to getTile (#56)
* Replace old bitnami minIO image * Fix serialization of CRS objects for projection in metadata * Ensure that `pil_safe` is true when getting encoding from format * Reformat whitespace * Install ghostscript prior to running tests * Pass frame value to `getTile` * Accept request frame as query parameter or style parameter
1 parent 319adb8 commit dcc1215

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

django_large_image/rest/tiles.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ def tile(
4848
) -> HttpResponse:
4949
encoding = tilesource.format_to_encoding(fmt, pil_safe=True)
5050
source = self.get_tile_source(request, pk, encoding=encoding)
51+
style = self.get_style(request) or {}
52+
frame = request.query_params.get('frame') or style.get('frame')
5153
try:
52-
tile_binary = source.getTile(int(x), int(y), int(z))
54+
tile_binary = source.getTile(int(x), int(y), int(z), frame=frame)
5355
except TileSourceXYZRangeError as e:
5456
raise ValidationError(e)
5557
mime_type = source.getTileMimeType()

0 commit comments

Comments
 (0)