-
Notifications
You must be signed in to change notification settings - Fork 2
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
Increase zoom level so that tile layer doesn't disappear upon zooming in #7
Comments
I haven't dug into this too deeply but my initial thought is that vue-leaflet does not expose all of the Leaflet.js options for
It looks like This is just my initial thought. I am, however, about to face the same problem and will dig into this a bit more to find a solution. I'm predicting that we will need to set a different, non-geospatial coordinate system for the |
Mmm, I see the discrepancy in the documentation between Leaflet.js and vue-leaflet and agree that the parameters are likely getting passed but then ignored — frustrating. I'd definitely like to be kept in the loop if you find a solution, thanks @banesullivan! |
Ok so the doc is missing the info but the vue code has it... So you can pass it, but the missing part is that trame-leaflet is missing that definition of the zoom which make it not produce what you expect. You can validate that by printing that element But you can dynamically add properties so they get pass to the html by providing the You can see the code here: https://github.com/vue-leaflet/Vue2Leaflet/blob/master/src/components/LMap.vue#L45-L63 |
Hi @jourdain, thanks for pointing this out! Indeed adding Apparently the However, I've tried multiple ways to pass the with leaflet.LMap(zoom=("zoom", 2), maxZoom=4, minZoom=2, _properties=[('max_zoom', 'maxZoom'), ('min_zoom', 'minZoom')]):
# tiles
image_viewer = leaflet.LTileLayer(url=("tile_url", "/tile/{z}/{x}/{y}.png"), noWrap=True, options="{ maxNativeZoom: 3, maxZoom: 4, minZoom: 2 }") I suspect there is a simple solution but that my lack of experience with JavaScript is obscuring it. Any thoughts? |
leaflet.LTileLayer(
url=...,
options=("{ maxNativeZoom: 3, maxZoom: 4, minZoom: 2 }",),
) otherwise, options will be set as a string rather than a JS object. |
Also make sure option is passed by printing the html of the element... You need to see |
Your suggestion resolved it, thanks! As the desired functionality is indeed possible, I'll close this issue. |
If you are up for it, you can add the missing props here using the code as ref instead of the doc in a PR. Actually while pointing at the code, you already had those props but they are camelCase rather than snake_case. |
@jourdain, re-open the issue and assign to me -- I'm happy to expose these parameters in trame-leaflet |
The code in trame-leaflet is already good and had everything that was needed. |
I see, thanks for clarifying |
Yes exactly. On the left the python name and on the right the JS arg. Ideally, you should add Python doc string like here |
Great, I've made the pull request! I wasn't sure about the doc string – did you mean for all the params in Leaflet.py? Or just the min/max zoom params? |
Hello again Trame Team!
I'm attempting to increase the level to which I can zoom, such that I can continue zooming into a tile rather than everything "going grey" (i.e., the tile layer disappearing). This issue is illustrated by the following screen video:
Screen.Recording.2023-02-09.at.7.59.21.PM.mov
In the most extreme sense, I'd like to be able to zoom until just one pixel fills the screen.
I've tried changing the
maxZoom
parameter as follows, but without luck:and
Do you have any suggestions?
The text was updated successfully, but these errors were encountered: