-
Notifications
You must be signed in to change notification settings - Fork 142
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
Documentation on adding tile layers #120
Comments
@digitaltopo Try running: M.add_layer(None, name="layername",
vis_url="http://tiles{0-3}.basemap.com/url/{z}/{x}/{y}.png") This should add a layer to the map which has no data associated with it. |
Thank you, this works for the most part although the tile subdomains are being parsed as Leaving off the
How can we pass the subdomain range? |
@digitaltopo can you try |
I tried |
Can you try running
Without the layer_type parameter it auto-adds the To set the subdomains after that, you should be able to add
or
If you don't set the subdomains, they default to |
The |
I see so I guess something is not send rightfully to GeoJS. @jbeezley would you like to look into it bit more? |
As I mentioned, setting the subdomains in a way supported by geojs would require extending the RPC spec. Even better, we could add support for the |
It'd be quick to extend the url template syntax. Until then, a url with an explicit subdomain can be used; it won't benefit from the distribution across subdomains, but it will work. |
I'm extending what we accept as subdomain template strings in geojs, and should have a PR there shortly. Currently, if you use the |
Reference OpenGeoscience/geojs#715. |
@digitaltopo we have fixed the issue on the Javascript side of things (thanks to @manthey and @jbeezley ). Could you please try the latest version of the GeoNotebook (master as of few minutes ago)? and provide us any feedback. |
Thanks @aashish24 et all!
Here is my code:
In my network tab, I'm still seeing the following issues:
I get imagery responses, but the resulting tiles displayed on the map are all wrong, and it looks like it's requesting images with a variety of This results in a pretty funny looking map :) These may be two separate issues. |
@digitaltopo sorry to hear this @manthey any ideas why would it not work as expected (see 1. above) |
@digitaltopo This works for me:
Note that instead of |
@kotfic I don't see how |
@manthey Thanks!
For any future reference,
class NoDataLayer(GeonotebookLayer):
def __init__(self, name, remote, vis_url, **kwargs):
super(NoDataLayer, self).__init__(name, remote, None, **kwargs)
self.vis_url = vis_url |
On a docker version build from current master, subdomains work for me:
only gets tiles from the How did you update your deployment? If you are running locally, what version does |
I'm running locally, I pulled git master branch .
|
To update the client code, you will need to rerun client build. The exact procedure depends on how you installed it. If you did a normal install, it should be sufficient to rerun |
Thanks @jbeezley this is the process I followed. At this point the OSM style layer works for me as expected. I'm only unable to specify custom subdomains like {1-3}. Using The same is true when I use the example @manthey posted above:
while Can you give any background on how the |
My guess is that for some reason you are not getting the newest version geojs in your build. There are occasions where |
To be clear what version should I expect? |
The latest is |
@jbeezley Thanks! Got it all working now. When reinstalling I used the |
Great! I forgot that pip will refuse to upgrade if there wasn't a version change. |
Is there any documentation on how to add a tile layer to the map?
have tried
But it looks like the layer that gets added is requesting:
http://localhost:8888/notebooks/notebooks/null/9/8/4.png
etcThe text was updated successfully, but these errors were encountered: