johann22 commited on
Commit
2416ffa
·
verified ·
1 Parent(s): c03fcb4

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -5
main.py CHANGED
@@ -4,15 +4,16 @@ import requests
4
  import os
5
  import json
6
 
7
- app = Flask(__name__)
8
 
9
- @app.route('/map/<int:z>/<string:x>/<string:y>.png')
10
  def get_tile(z, x, y):
11
  url = 'https://tile.openstreetmap.org/{}/{}-{}.png'.format(z, x, y)
12
  resp = requests.get(url)
13
  img_byte_arr = bytearray(resp.content)
14
  img_io = io.BytesIO(img_byte_arr)
15
- return make_response(img_io.read(), mimetype='image/png')
 
16
 
17
- if __name__ == "__main__":
18
- app.run()
 
4
  import os
5
  import json
6
 
7
+ #app = Flask(__name__)
8
 
9
+ #@app.route('/map/<int:z>/<string:x>/<string:y>.png')
10
  def get_tile(z, x, y):
11
  url = 'https://tile.openstreetmap.org/{}/{}-{}.png'.format(z, x, y)
12
  resp = requests.get(url)
13
  img_byte_arr = bytearray(resp.content)
14
  img_io = io.BytesIO(img_byte_arr)
15
+ return img_io
16
+ #return make_response(img_io.read(), mimetype='image/png')
17
 
18
+ #if __name__ == "__main__":
19
+ # app.run()