-
Notifications
You must be signed in to change notification settings - Fork 121
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
setting max native zoom automatically #880
Comments
Apparently, we have to pass the zoom limits ( So far so good. However, the tmp_map |> tmap_leaflet() |>
leaflet::addProviderTiles('Esri.WorldImagery', options=leaflet::providerTileOptions(maxZoom=100)) does not work. As a user, you always want to be able to zoom in to the most detailed zoom level available. In other words, I see no reason to set the general max zoom to 18, but the max native zoom level to 10 (if 18 is also available). Relevant post: Leaflet/Leaflet#6316 @tim-salabim how did you deal with this issue in mapview? |
We don't use The issue seems to be quite tough, as library(leaflet)
leaflet() |>
leaflet::addProviderTiles('Esri.WorldImagery', options=leaflet::providerTileOptions(maxZoom=52, maxNativeZoom = 19)) |> leafem::addMouseCoordinates() Not sure if there is a good one-fits-all solution here... |
Would it be feasible to set a max zoom internally for the
|
That's already done internally on the JavaScript side by the |
Good idea @marine-ecologist ! I can include such a list in tmap, but it is preferable to do maintain such a list somewhere upstream (JS side). Can't find it in the I've added tm_basemap("Esri.WorldImagery", max.native.zoom = 18) +
tm_shape(heron_island_coords) +
tm_dots() +
tm_mouse_coordinates() +
tm_view(set.view = 16, set.zoom.limits=c(2,20)) |
This Just to mention it here, maybe python |
Not sure I follow what the actual issue is here.
I believe that if you don't set it, tiles at higher zoom levels just disappear. If you do, the tiles are autoscaled (blurred). |
In theory, yes. But if you take the example from #880 (comment) you will see that it only autoscales in regions within the map where the map provider actually has tiles until |
@tim-salabim - I hadn't realised I've tried implementing this via
|
That is not what is happening. The issue with these specific ESRI tiles is that they do provide tiles for higher zoom levels but those images just say "no data...". If you test on something else, like |
@martinfleis thanks for the clarification. I think there's not much we can do here (apart from utilising @marine-ecologist "s suggestion using Leaflet.TileLayer.Fallback ), though, for me, this is not high priority at the moment. |
?tm_view
mentions passing options toleafletOptions()
vialeaflet.option=
, but I can't seem to get this to work forleaflet::providerTileOptions
. Example below:not working:
working via
tmap_leaflet()
:The text was updated successfully, but these errors were encountered: