Hi there!
with the 10.2.5 SKD we found a solution to zoom in more than there are Level of Details defined for the TiledLayer.
// Set the maximum zoom level.
mapView.maxScale = mapView.scale(forResolution: 0.002)
mapView.minScale = 250000
self.currentBaseMap?.maxScale = mapView.scale(forResolution: 0.002)
self.currentBaseMap?.minScale = 250000
you can see the resulting screenshot attached. it looks ugly but does the job for our customers.
In the last 3 month we migrated to 100.4
even if i managed to zoom in indefinitely with that code:
mapView.map?.maxScale = 0
mapView.map?.minScale = 0
the basemap does not resample after reaching the maximum Level of Details.
how do i achive the same result as with the old SDK?
Thank you very much!
Cheers,
Mike
Solved! Go to Solution.
Note that technically you just need to set maxScale. It's a combination of 3 things.
There was a bug in Runtime 100.x which meant that layers with some tiling schemes would fail to display beyond the level that tiles had been created even if you set maxScale = 0. This was fixed at 100.5.
Thanks for your help in reproducing this, Mike.
Nick.
can you try setting the max scale to 1 (instead of 0)
Have you tried setting the AGSArcGISTiledLayer.noDataTileBehavior to .upSample?
Thanks Divesh and Nicholas! Unfortunately it didn't work . The basemap still disappears when zooming in. Any other hints?
Hey Michael Moor,
Sorry for the late reply. Could you share the basemap layer you're using? Is it a public one (one of our Imagery basemaps perhaps?).
And could you clarify what you mean by "the basemap does not resample after reaching the maximum Level of Details" - what behavior are you seeing?
Cheers,
Nick.
Hi Nick,
it's a private self-created basemap. i created a Xcode Project which demonstrates the behavior.
The project is in a private Github repo. I added you (nixta) as collaborator.
Thank you!
Mike
Thanks. I will take a look. Might take a couple of days before I am able to get around to it.
Nick.
Hi Michael,
As per my DM, were you able to verify this is fixed in 100.5?
Thanks,
Nick
For all who have the same issue this two lines make the magic happen:
let tiledLayer = AGSArcGISTiledLayer(url: basemapUrl)
tiledLayer.noDataTileBehavior = .upSample
tiledLayer.maxScale = 0
tiledLayer.minScale = 0
let map = AGSMap(basemap: AGSBasemap(baseLayer: tiledLayer))
Thanks Nick for your help!!!
Note that technically you just need to set maxScale. It's a combination of 3 things.
There was a bug in Runtime 100.x which meant that layers with some tiling schemes would fail to display beyond the level that tiles had been created even if you set maxScale = 0. This was fixed at 100.5.
Thanks for your help in reproducing this, Mike.
Nick.