New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy on Heroku #30
Deploy on Heroku #30
Conversation
Codecov Report
@@ Coverage Diff @@
## main #30 +/- ##
==========================================
+ Coverage 80.06% 80.70% +0.64%
==========================================
Files 14 16 +2
Lines 647 705 +58
==========================================
+ Hits 518 569 +51
- Misses 129 136 +7 |
Yep, that sample image is super low resolution |
Here is a demo with the changes on this branch: from localtileserver import get_leaflet_tile_layer
from localtileserver import RemoteTileClient
from ipyleaflet import Map
# Connect to a remote instance of localtileserver
tile_client = RemoteTileClient(
'https://opendata.digitalglobe.com/events/california-fire-2020/pre-event/2018-02-16/pine-gulch-fire20/1030010076004E00.tif',
#'https://localtileserver-demo.herokuapp.com/',
)
# Create folium tile layer from that server
t = get_leaflet_tile_layer(tile_client)
m = Map(center=tile_client.center())
m.add_layer(t)
m
|
Another demo: from localtileserver import get_leaflet_tile_layer
from localtileserver import RemoteTileClient
from ipyleaflet import Map
# Connect to a remote instance of localtileserver
tile_client = RemoteTileClient(
's3://sentinel-cogs/sentinel-s2-l2a-cogs/2020/S2A_31QHU_20200714_0_L2A/B01.tif',
)
# Create folium tile layer from that server
t = get_leaflet_tile_layer(tile_client)
m = Map(center=tile_client.center())
m.add_layer(t)
m |
I'm not going to document this in the README to avoid people overloading my demo server. I will however try to add some instructions on how to deploy this to heroku on your own and perhaps make a cookiecutter to make this super easy |
I just added a template for deploying your own here: https://github.com/banesullivan/remotetileserver |
Its live at https://localtileserver-demo.herokuapp.com
I'm using a free dyno so if this gets any traffic at all, it will probably crash
The changes in this PR make it so that any URL file can be passed as a query param at that URL for viewing. For example:
https://localtileserver-demo.herokuapp.com?filename=https://opendata.digitalglobe.com/events/california-fire-2020/pre-event/2018-02-16/pine-gulch-fire20/1030010076004E00.tif
And another file hosted on S3: https://localtileserver-demo.herokuapp.com/?filename=s3://sentinel-cogs/sentinel-s2-l2a-cogs/2020/S2A_31QHU_20200714_0_L2A/B01.tif