在Google地图中完全在多边形边界内显示地面叠加层

时间:2018-02-02 14:46:01

标签: android google-maps maps overlay polygon

我试图在多边形边界内完全显示地面叠加。我尝试将经度和经度增加几米,但结果并不像我预期的那样请帮助我。

这是我的形象:

enter image description here

                        double meters = widthtemp2;
                    double coef = meters * 0.0000089;
                    double new_lat = newlatlngs.latitude + coef;
                    double new_long = newlatlngs.longitude + coef / Math.cos(newlatlngs.latitude * 0.018);

                  LatLng finallatlng = new LatLng(new_lat, new_long);
                    mGroundOverlay = mMap.addGroundOverlay(new GroundOverlayOptions()
                            .image(mImages.get(mCurrentEntry))
                            .position(finallatlng, (float) (0.985*widthpanel), (float) (1.646*heightpanel)));

0 个答案:

没有答案