Select to view content in your preferred language

Fullscreen World Map with without showing background grids on vertical scroll up or down in Android

1621
12
11-20-2023 08:41 PM
NishanKhadka
Emerging Contributor

Screenshot_20231121-103442.pngScreenshot_20231121-103722.pngScreenshot_20231121-103459.png

I want to achieve something similar to the images 1 and 2, a full screen world map with fixed min zoom/scale level. But with Esri SDK I find the MapView  scrolling beyond the actual map and show the background grid. How can I achieve something like that?
Thanks!

0 Kudos
12 Replies
NishanKhadka
Emerging Contributor

Still same results. Maybe I am setting the envelope for the maxExtent wrong. Any guidance would help.

0 Kudos
ChanganShi1
Regular Contributor

You may give a try like this,

map.loadStatus.collect {
if (it == LoadStatus.Loaded) {
val envelope = map.basemap.value?.baseLayers?.get(0)?.fullExtent
if (envelope != null) {
map.maxExtent = Envelope(envelope.center, envelope.width /4.0, envelope.height/4.0)
}
}
}
0 Kudos
NishanKhadka
Emerging Contributor

I would get a full screen map with this, but still the following issues exist:

  •  WrapAronud mode - continuous panning across the international date line is disabled. That's what maxExtent property is supposed to do I believe.

  • maxExtent scaling itself with zoom levels has issues. When zoomed in, I cannot access the parts of the map close to the map boundaries. And this keeps on increasing as I zoom in further.

0 Kudos