I am adding Bitmap image on Google maps using GroundOverlayOptions, that image will be overlaid on the Google maps.
Below is my code.
@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));
}
I am trying to hide Google logo from the MapView by setting padding, but That logo won't be hidden from the MapView. When I set -10 padding at left or bottom that 10% of view will be disabled. But in case of map view, this may be different. If I set padding(50,0,0,0); that logo will be placed at right. How can I disable or hide the logo of Google on Google maps.
Any help would be appreciated.