Attaching a screenshot of map being zoomed out to min level so the whole world map is visible. Also a gray grid is visible. I want to stop user seeing the gray grid similar how google maps handles it. However can't see any easy way. If I set explicitly AGSMap.minScale, then I have to check every device to choose appropriate scale and still user can pan to north/south and see the gray grid.
I read that in 10.2 AGSMapView.maxEnvelope was helping with this by allowing to provide xmax ymax xmin ymin but there is no replacement in 100.0. What is about 100.1? Is there any workaround except listening to pan/zoom KVO and when user goes out of bounds scale him back? This sounds like a bad UX pattern.
Thank you for your question. As you stated, there currently is no "maxEnvelope" or "maxExtent" property on either the MapView or the Map in 100.1 or the latest 100.2 release. This is something that is under discussion for a future release.
I know it's not optimal, but it is possible to customize the display of the background grid to your liking. See the "backgroundGrid" property on AGSMapView.
Mark
@MarkDostal How to achieve this in iOS ?
You can use the "backgroundGrid" property on "MapView". It is an object of type "AGSBackgroundGrid". You can see it in action in the iOS Sample App here.
Here's the relevant code:
// Create a background grid with default values.
let backgroundGrid = AGSBackgroundGrid(color: .black, gridLineColor: .white, gridLineWidth: 2, gridSize: 32)
// Assign the background grid to the map view.
mapView.backgroundGrid = backgroundGrid
Let me know if you need more help!