12

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.

Saritha G
  • 2,588
  • 1
  • 15
  • 27

6 Answers6

42

Try to respect the Google Maps Terms of Service

9.4 Attribution.

  • Content provided to you through the Service may contain the Brand Features of Google, its strategic partners, or other third-party rights holders of content that Google indexes. When Google provides those Brand Features or other attribution through the Service, you must display such attribution as provided (or as described in the Maps APIs Documentation) and must not delete or alter the attribution.
  • You must conspicuously display the "powered by Google" attribution (and any other attribution(s) required by Google in the Maps APIs Documentation) on or adjacent to the relevant Service search box and Google search results. If you use the standard Google search control, or the standard Google search control form, this attribution will be included automatically, and you must not modify or obscure this automatically-generated attribution.

Developers don't have the authority to replace the logo even though it's possible.

[UPDATE]

3.2.3 Requirements for Using the Services.

(b) Attribution. Customer will display all attribution that (i) Google provides through the Services (including branding, logos, and copyright and trademark notices); or (ii) is specified in the Maps Service Specific Terms. Customer will not modify, obscure, or delete such attribution.

NickUnuchek
  • 11,794
  • 12
  • 98
  • 138
Anoop M Maddasseri
  • 10,213
  • 3
  • 52
  • 73
  • I have seen this answer by search result. But I have to hide google logo, is there any possibility?? – Saritha G Nov 16 '15 at 06:24
  • 4
    Violating the terms and policy isn't a good drive.you might be need to say same to the client :) – Anoop M Maddasseri Nov 16 '15 at 06:30
  • These terms and policy will be same for IOS also..right? But they have option to hide google logo. Why cann't we hide? – Saritha G Nov 16 '15 at 06:40
  • 1
    It shouldn't.that's why they haven't provide an option for that in android.IOS not belongs to google that might be behind the scene and have an option to hide too.anyway personally this is my opinion :) – Anoop M Maddasseri Nov 16 '15 at 06:49
  • Even IOS people can use google by adding google sdk's. Anywayz..Thnq for your response. – Saritha G Nov 16 '15 at 06:50
  • 1
    You can check http://stackoverflow.com/questions/1968399/can-i-overlay-google-logo-on-map-or-move-it-to-top-right & http://stackoverflow.com/questions/6923472/relocate-google-logo-in-mapview – Anoop M Maddasseri Nov 16 '15 at 07:01
2

Simple! I achieved this by doing the following either directly on the fragment or any parent layout.

<RelativeLayout
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_marginBottom="-30dp"
  android:layout_marginTop="-30dp">

   <fragment
      android:id="@+id/map_frag_main"
      android:name="com.google.android.gms.maps.SupportMapFragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MainActivity" />

</RelativeLayout>

Adding the layout_margin will clip away the Google logo and no need for padding, just make sure you add a drawable or you will be violating TOS. Cheers!

1

Hiding Google logo from Google map and Google earth images are against terms of usage of Google Maps. So even though there might be a way to do it, it would be illegal. You can found TOS and related rule below.

https://developers.google.com/maps/terms

9.4 Attribution.

Content provided to you through the Service may contain the Brand Features of Google, its strategic partners, or other third-party rights holders of content that Google indexes. When Google provides those Brand Features or other attribution through the Service, you must display such attribution as provided (or as described in the Maps APIs Documentation) and must not delete or alter the attribution.

shadygoneinsane
  • 2,226
  • 1
  • 24
  • 47
Orkun Kocyigit
  • 1,137
  • 10
  • 21
  • 1
    Just a clarification. Violating a TOS is not "illegal". There is no US law against violating TOS, but it does put you in jeopardy of having your ability to use Maps revoked, so just don't do it. – Reid Feb 06 '19 at 23:13
1

You can achieve it in Android using:

final ViewGroup googleLogo = (ViewGroup) findViewById(R.id.single_map).findViewWithTag(Const.GOOGLE_MAPS_WATERMARK).getParent();
googleLogo.setVisibility(View.GONE);

Where single_map is the instance of SupportMapFragment.

Roney Sampaio
  • 320
  • 3
  • 7
  • not good idea hide the watermark of google when using his map... you are attempting the tos -> https://developers.google.com/maps/terms – Shudy Jul 23 '20 at 10:16
-2

This CSS will remove Google Logo, terms of use, and Report a problem div.

a[href^="http://maps.google.com/maps"]{display:none !important}
a[href^="https://maps.google.com/maps"]{display:none !important}

.gmnoprint a, .gmnoprint span, .gm-style-cc {
    display:none;
}
.gmnoprint div {
    background:none !important;
}
Abhishek Goel
  • 18,785
  • 11
  • 87
  • 65
-3

You may remove it through xml or programatically but simple official answer to it is.

You can’t, because it is not legal

Ali Akram
  • 4,803
  • 3
  • 29
  • 38