arcgis for andriod设置格网背景
一、接口虽然官网有详细的介绍,但是还是折腾很久才实现,主要就是颜色类型设置出了问题,颜色必须设置为int类型。
/*设置格网背景*/
public void SetBackgroundGrid() {
int lineColor = Color.rgb(198, 190, 188);
int bjColor = Color.rgb(244, 243, 239);
BackgroundGrid mainBackgroundGrid = new BackgroundGrid();
mainBackgroundGrid.setGridLineColor(lineColor);
mainBackgroundGrid.setGridLineWidth(2);
mainBackgroundGrid.setGridSize(10);
mainBackgroundGrid.setColor(bjColor);
mMapView.setBackgroundGrid(mainBackgroundGrid);
}