Skip to content

Commit

Permalink
fixed zoom bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed Jun 10, 2024
1 parent d617a49 commit 1238bef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/tmapLeafletAux.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ tmapLeafletTiles = function(bi, bbx, facet_row, facet_col, facet_page, id, pane,
tiles = .TMAP_LEAFLET$tiles[[id]][[bi]]

if (o$credits.defined) {
opt = leaflet::providerTileOptions(attribution = "", maxNativeZoom = tiles$max.native.zoom, maxZoom = o$set.zoom.limits[2])
opt = leaflet::providerTileOptions(attribution = "", maxNativeZoom = tiles$max.native.zoom)
} else {
opt = leaflet::providerTileOptions(maxNativeZoom = tiles$max.native.zoom, maxZoom = o$set.zoom.limits[2])
opt = leaflet::providerTileOptions(maxNativeZoom = tiles$max.native.zoom)
}
if (!is.na(o$set.zoom.limits[2])) opt$maxZoom = o$set.zoom.limits[2]

for (s in tiles$server) lf = leaflet::addProviderTiles(lf, provider = s, group = s, options = opt)

Expand Down

0 comments on commit 1238bef

Please sign in to comment.