地图固定比例尺

发送反馈


SuperMap iClient for Android支持设置地图的固定比例尺。如果设置了固定比例尺,地图缩放时将只显示设置的比例尺级别。

设置地图显示的固定比例尺可以通过LayerView类的setScales(double[] visibleScales)方法来实现,只需传入地图比例尺数组即可。简单使用示例如下所示:

MapView mapView=new MapView(this);
mapView = (MapView) this.findViewById(R.id.mapview);
LayerView layerView = new LayerView(this);
layerView.setURL("http://MyServerIP:8090/iserver/services/map-china400/rest/maps/China");
//设置比例尺数组
double scales[] = { 1.0 / 295829350.48418, 1.0 / 149514675.2421, 1.0 / 9000000, 1.0 / 4000000, 1.0 / 2000000};
layerView.setScales(scales);
mapView.addLayer(layerView);