render and crop directly with rsvg/cairo
This commit is contained in:
parent
8a66b36ecc
commit
2789fe3472
2 changed files with 35 additions and 26 deletions
|
@ -30,7 +30,8 @@ def tile(request, level, zoom, x, y, format):
|
|||
if format == 'svg':
|
||||
response = HttpResponse(svg.get_xml(), 'image/svg+xml')
|
||||
elif format == 'png':
|
||||
response = HttpResponse(svg.get_png(), 'image/png')
|
||||
response = HttpResponse(content_type='image/png')
|
||||
svg.get_png(f=response)
|
||||
else:
|
||||
raise ValueError
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue