Comments (7)
@artttt Could your solution work on AWS SageMaker?
from localtileserver.
Hi Bane,
Am i right to assume that the idea here is to grab the url from a users browser window and parse it to set up licaltileserver?
If so have a look at my code here:
davidbrochart/ipyurl#2 (comment)
ive been using this in the jupyterhub environment i work on successfully to set up localtileserver with the following code
import os
import urllib
def init_hub():
'''
initialises environment variables needed to make localtileserver work on jupyter hub
'''
url = window_url()
os.environ["LOCALTILESERVER_CLIENT_PREFIX"] = f"{os.environ['JUPYTERHUB_SERVICE_PREFIX'].lstrip('/')}proxy/{{port}}"
up = urllib.parse.urlparse(url)
os.environ["LOCALTILESERVER_CLIENT_HOST"] = url[: -(len(up.path))].rstrip("/") + "/"
I hope that helps
from localtileserver.
Am i right to assume that the idea here is to grab the url from a users browser window and parse it to set up licaltileserver?
That is one way to go about it if you can get it to work (I struggled to initially).
ive been using this in the jupyterhub environment i work on successfully to set up localtileserver with the following code
This is fantastic! Thank you for sharing! I will test this out when I have some time (localtileserver
is hobby project so it can be tough for me to make proper time to address things 😄 )
from localtileserver.
Sorry for my delay looking into SageMaker, @giswqs 😄 ... tough to find time for this hobby project at the moment
(ref #128)
from localtileserver.
@banesullivan No worries. Let's explore this.
from localtileserver.
@giswqs ive not tried AWS SageMaker so im not sure but as long as you can install the required package/s then it is worth a try. You may have to modify the parsing of the url to suit. Hopefully @banesullivan gets a chance to incorporate a generic solution into localtileserver
.
Note: i've updated the comment that i linked to above with an additional code sample.
davidbrochart/ipyurl#2 (comment)
from localtileserver.
I just tried the method @artttt provided on SageMaker Studio, it does not work. Any other method for getting the URL prefix?
Note that it is SageMaker Studio, not Studio Lab. They are different products. The method that works for Studio Lab does not work for SageMaker Studio
import os
os.environ['LOCALTILESERVER_CLIENT_PREFIX'] = f"studiolab/default/jupyter/proxy/{{port}}"
davidbrochart/ipyurl#2 (comment)
from localtileserver.
Related Issues (20)
- add_raster() isn't adding the downloaded image into the map HOT 15
- add_layer doesn't work with GeoTIFF file converted from xarray Dataset HOT 11
- can't add local raster file in windows HOT 4
- Use ipyleaflet's as_leaflet_layer interface
- Cannot display raster in Google Colab HOT 5
- Generated PNG tiles are not transparent (have black background) HOT 3
- Remote COG no longer works HOT 4
- Tiff file saving to HTML using folium HOT 1
- Tileclient does not show when run dash app python on docker HOT 3
- localtileserver fails with flask==3 HOT 2
- localtileserver not working with Leafmap on Docker HOT 4
- localtileserver client cannot work after setting the http proxy HOT 4
- not working on VS code remote notebook HOT 1
- Passing rasterio.Env context to tile server HOT 5
- nodata causes padding HOT 15
- The vmin and vmax parameters have no effect HOT 2
- Support custom colormaps
- Generate thumbnails in a projection
- Rasters do not render when using solara HOT 2
- Regarding code: errors related to import localileserver HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localtileserver.