有什么方法可以避免在 AGSMapView 中显示灰色图块

Is there any way to avoid showing gray tiles in AGSMapView

在 AGISMapView 上添加了地形图层,

let layerUrl = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
let url = NSURL(string: layerUrl)!
let mapWithURL = AGSTiledMapServiceLayer.tiledMapServiceLayerWithURL(url) as! AGSTiledMapServiceLayer
self.agsMapView.insertMapLayer(mapWithURL, withName: "AGSMapLayer", atIndex: 0)

问题是每当我们将地图移动到不同的地方时,它会显示灰色瓷砖,有什么办法可以避免这种情况,如果它以低分辨率显示瓷砖,但灰色瓷砖看起来不太好。

让我知道是否有任何方法可以避免这种情况,在此先感谢。

请查看下图了解更多详情。

你说的"gray tiles"是背景颜色(灰色)和网格(线条)。

您应该查看 AGSMapView 的属性:backgroundColor、gridLineColor、gridLineWidth、gridSize。例如,将 gridLineWidth 设置为 0 并将 backgroundColor 设置为 whiteColor 将产生全白背景。