添加图层后,要用鼠标放大好多次才能完全显示添加图层后的地图,这个应该怎么解决了?

0 投票
LayerSettingVector setting = new LayerSettingVector();
                        GeoStyle geoStyle_R = setting.getStyle();

                        geoStyle_R.setFillBackOpaque(true); //是否透明
                        geoStyle_R.setFillOpaqueRate(50); //透明多少
                        geoStyle_R.setFillGradientMode(FillGradientMode.NONE);
                        GeoRegion geoRegion = new GeoRegion();
                        Point2Ds point2Ds_R = new Point2Ds();
                        point2Ds_R.addRange(point2DArray_R);
                        geoRegion.addPart(point2Ds_R);
                        geoRegion.setStyle(geoStyle_R);
                        
                        m_mapControl.setWaitCursorEnabled(false);
                        m_mapControl.getMap().viewEntire();
                        TrackingLayer layer = m_mapControl.getMap().getTrackingLayer();
                        layer.add(geoRegion, "Region");
                        m_mapControl.getMap().setAntialias(true);
                        m_mapControl.getMap().setViewBounds(new Rectangle2D(0, 0, 250, 250));
                        m_mapControl.getMap().refresh();
6月 15, 2020 分类:  61次浏览 | 用户: 鱼儿 (8 分)

1个回答

0 投票
你好,您检查一下您的图层和地图的可见比例尺是否正确呢
6月 15, 2020 用户: 张亮 名扬四海 (1,894 分)
这个问题解决了,把Map().setViewBounds()函数去掉就好了
...