Add marker

This commit is contained in:
Samuel Sloniker 2024-07-21 18:36:08 -07:00
parent 5e5b5f7c82
commit 877494749e
2 changed files with 6 additions and 0 deletions

BIN
marker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,5 +1,6 @@
import threading import threading
import asyncio import asyncio
import base64
import tornado import tornado
import navpoint.content import navpoint.content
@ -8,11 +9,16 @@ class GetHandler(tornado.web.RequestHandler):
def get(self): def get(self):
self.write(navpoint.content.content) self.write(navpoint.content.content)
class ImageHandler(tornado.web.RequestHandler):
def get(self):
self.write(base64.b64decode('iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAXnAAAF5wGk6LX5AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAABH1JREFUWIWl10mPVUUUB/Bf3TZCYhSjKHSrGEU04IhGhgQJuFAXTmHoOHwAJaJbJQzdIMYhxpUMfgAjNqDiQg0LB1ABA9GFAkFkQSuDQqShSdRAl4tb7716l9f4iCeppKrO8D+npnMqaJviCMzGw7gNY3BdYvbjKH7Ex/iS8E/7ts8P3EVcQxwgxjbbCeIq4tj/AzySuJJ4+gKAq22QuDytXksKw4B34iNMqTDOYAs249fU4NrUHsBMXFTR24Y5hCPtRH4Hsb8SyQBxMfGKNvSvIC5psWX9pe3zK3e2AH+fOLoNz6u2riKub+FEZy6VbUEcia80lj2iBysJsS7WpwPTMUVwLRjSr7DDT7brNZTZDFiW7NSwtmM24a+qAyuxOHNuGeHl+ugTI5y2QPQihjvdR/Aa1uiWXcPYg95MbgWhJ3MgdmEfLqnHyRP1yDe63lmbcOcwwFX6AY/pdjDZD8nmvMQfxATCkZoDa/BsYp7EeMKxDHwb8r2LCWSPKAomYrLmW3UY0zInrsZ+XJr4qwnPhXRHf8dlibGE8ArKZR+0oxL5eh1eMteBppjXGa/wOuZms98nJ9J2xGVYnngDuLrA/Rn4Gaytq5+2oAk8WKpb9zng8IRfdJsnNO31ZMEz2XhVwoBRmFUo3/YabSEcB72KdOBq4H3mW5ljRroiXU2OzLccH2RCi/QqkpHj+CaTfrTApGxic7030XSN0x4VFmXA4yJb8Rt+i2yNjcQEL5ZioNOtpmW8T7P+PYXmCA7We0WT0q7Ksr+LGdl4Rporqdt+5SEtacjUTHZ31r+x6sChei82ze9rTOusgNfovqbtCPZmvGuy/vGsP6rQWKpSrYEUs9n8euXyVWrwhjKdYhgMFPKo87semlbj5kz7CL5uAb41lHe/JnhL5kyOcWXWHyjkSozLDGzP5u+2zvhs/JTyENbB8XR9tMEE3JUFsC2TnZj1DxSaD8WD9d5PtmfOBYXXGr7pD2Xe70JXYGYoy7KShryhsdSH7PVdhvFQ1t9ZKGu4Gs2sp95eQ2IDFPOs15ONBQ6H5hWkz3I8ns282siQ8UrNB3hTgc9xIk10YEGGsFb5nCZ9vfps1OcmVdpggj4fKtNvjXb50zvZeKFGtTSALbVktDoDPombCH+kiMYpc3jrZBQE0UTlk52f8EM6TDW3VrbFMfhZIxm9TXi+5kBnYtbS8QZ019Pxe67TYZMy47VDu3R4PAMPyeacxB9MQR6tvdGH8VZmYJ58KZ/Uj2mCFzRf2yodEi30p+kNcJQV0Zxs/CbhKOeWZF9Qf4KjMnWuaCrJehUmmSqYKqb3P+gX7bDbjhYlWU8Kpob1Le4n/N0igJZF6fpUTFwgxTHEjRVbB9NZOK9iq7L8JHFpukb/pT+6rAHjqRbgt1elz/cx+YCmjAhnla/eZ9iDY2l+tDKtP6S85x0VvW+VH5Oj/x1Aw4mR6Vs1+D++ZqfSagz7NWvHkbHKj+aJCwA+QXy7jf0ebgtaOnIxZuER3IsbcLnytgzgAHYqn/av2v2e/wswdwMLA6HnqwAAAABJRU5ErkJggg=='))
async def main(): async def main():
app = tornado.web.Application( app = tornado.web.Application(
[ [
(r"/navpoint.kml", GetHandler), (r"/navpoint.kml", GetHandler),
(f"/marker.png", ImageHandler),
] ]
) )
app.listen(8888, address="127.0.0.1") app.listen(8888, address="127.0.0.1")