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!
You could set minScale and maxScale of the base layer to achieve it. You may also reset the background grid by changing the property backgroundGrid, like:
mapView.backgroundGrid = BackgroundGrid(
color = Color.fromRgba(167,214,255,255),
lineWidth = 0f)
Thank you for the suggestion. I can set the min Scale and max scale. But the map still can be scrolled, and it will show the background grid by scrolling beyond the actual map image. If I disable the scroll when min scale is reached, still it can be scrolled beyond the actual map once you zoom-in and start scrolling. 😞
Could you try to use the InteractionOptions class to disable the Pan, Zoom, etc gestures you don't like the user to interact with on the map view?
Does the suggestion solve your problem?
Sorry, haven't given time to this issue and I haven't tried to implement the InteractionOptions. I have got few ideas (may be measure the distance from centre and stop panning once the distance is reached), but panning will disable both vertical/horizontal movement and not just the vertical movement, I do need the horizontal panning. Just gonna leave it for now!
If you have a strong user story, we may consider adding the feature in future releases.
I think having the feature to make it full screen makes the user have a more immersive and focused view of the geographical info in the map. When it's about map in android phones, I only want to display information that are relevant and not let the user get distracted from having half of the map gone out of the view due to an unintentional user action. It just doesn't look when the map is zoomed in.
Hi, NishanKhadka:
My colleague pointed out that the maxExtent property of ArcGISMap may solve your problem, you could set the maxExtent property to prevent users from zooming out further. Give it a try, you can also find the reference sample here.
I did try with maxExtent property before, but I messed up the wrapAround property of the map, and vertical panning started to behave strangely when zoomed (The more you zoom the more you restrict vertical panning the in the map area). Maybe I messed up with the implementation, I will give it a try once again. 👍