Are you trying to set the visibility of the grid behind the map? That grid is the map background. The Grid returned from the MapView.getGrid() method is a Grid on the map itself not behind. Map Grids display index and geographic reference grids on a map, e.g. a degrees/minutes/seconds (DMS) grid label identifies the map grid using degrees, minutes, and seconds. By default the MapView Grid is set to NONE. The available grids can be viewed by the Enum Grid.GridType in the JavaDoc API. Currently we only support NONE (default) and Military Grid Reference System (MGRS). This may be a bit confusing as our generic Grid class isn't explicit in it's definition and there is a Grid present behind the map by default. We have addressed the error you were receiving and that will be fixed in our upcoming v2.0 release. But unfortunately, unless you were working with map grids, as shown in the code below, there is currently not a way to set the visibility to the background grid. //add a MGRS grid to the map MapView.getGrid().setGridType(GridType.MGRS);
Visibility is set to true by default.