Leaflet addTiles Zoom level not working

I am using XYZ URL layer with leaflet but I can not zoom in after a certain point.

I tried the XYZ layer in QGIS (max Zoom level =23 and min Zoom level = 0) and it works fine. I can see this detail:

However, when I try to use in R with leaflet I can zoom until a certain point with low detail. I checked with mozilla web developer tools/network/ get request and I can see I got to zoom level 18:


and the images looks like this:
Screenshot from 2022-11-08 14-48-53

My code in R that produce the R leaflet map is:


map8 <- leaflet() %>%
    # Base groups
    setView(lng = 2.322 , lat =41.757 , zoom = 18)%>%
    addTiles(group = "OSM (default)") %>%
    addTiles(urlTemplate = urlxyz_hr, group = "ED-HR",
              minZoom = 8,
              maxZoom = 23,
              transparent = TRUE,
              unloadInvisibleTiles = NULL,
              maxNativeZoom = FALSE
             )) %>%
    # addTiles(urlTemplate ="https://tile.openstreetmap.org/{z}/{x}/{y}.png") %>%
    addProviderTiles(providers$Stamen.Toner, group = "Toner") %>%
    addProviderTiles(providers$Stamen.TonerLite, group = "Toner Lite") %>%
    addProviderTiles(providers$Esri.WorldImagery, group = "Satview") %>%
     # Layers control
      baseGroups = c("OSM (default)", "Toner", "Toner Lite","Satview","ED-HR"),
      options = layersControlOptions(collapsed = FALSE)
  # map %>% hideGroup("rios temporales")%>% 
  #   hideGroup("ca") %>%
  #   hideGroup("aoi") %>%
  #   hideGroup("patrl")
map8 %>%
    position = "bottomleft",
    primaryLengthUnit = "meters",
    primaryAreaUnit = "sqmeters",
    activeColor = "#3D535D",
    completedColor = "#7D4479")%>%

    tiles = providers$osm,
    toggleDisplay = TRUE)

As you can see, I set the maxZoom level to 23 but is not getting there. What am I doing wrong?
Thank you for your help,

1 Like

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.