Sar*_*a G 4 android google-maps
我正在使用GroundOverlayOptions在谷歌地图上添加位图图像,该图像将叠加在谷歌地图上.
以下是我的代码.
@Override
public void onLocationChanged(Location location) {
TextView tvLocation = (TextView) findViewById(R.id.tv_location);
location = generateRandomLoc(location, 0);
double latitude = location.getLatitude();
double longitude = location.getLongitude();
LatLng latLng = new LatLng(latitude, longitude);
//Setting padding to hide google logo
mapView.setPadding(-10,0,0,0);
CameraPosition cameraPosition = new CameraPosition.Builder().target(latLng).build();
mapView.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
mapView.moveCamera(CameraUpdateFactory.newLatLng(latLng));
//get camera position frm map view
LatLng cameraPosLatLng = mapView.getCameraPosition().target;
if (isFlag) {
BitmapDescriptor image = BitmapDescriptorFactory.fromResource(R.drawable.overlay_pink_image);
mapView.addGroundOverlay(new GroundOverlayOptions()
.image(image).position(latLng, 458, 274)
.transparency(0.5f));
mapView.animateCamera(CameraUpdateFactory.zoomTo(17));
}
if (cirle != null) {
cirle.remove();
}
cirle = mapView.addCircle(new CircleOptions().center(cameraPosLatLng).strokeColor(Color.GREEN).fillColor(Color.GREEN).radius(0.7));
}
Run Code Online (Sandbox Code Playgroud)
我试图通过设置填充来隐藏MapView中的Google徽标,但该徽标不会从MapView中隐藏.当我在左侧或底部设置-10填充时,将禁用10%的视图.但是在地图视图的情况下,这可能是不同的.如果我设置填充(50,0,0,0); 该徽标将放置在右侧.如何在Google地图上禁用或隐藏Google的徽标.
任何帮助,将不胜感激.
Ano*_*p M 20
请尝试尊重Google地图服务条款
9.4归因.
即使可能,开发人员也无权更换徽标.
| 归档时间: |
|
| 查看次数: |
12898 次 |
| 最近记录: |