0

When I animate the camera with google maps function, my app is zooming in map and screen this into center of my layout. I want to show this bottom of my layout.

Here is my code.

            CameraPosition cameraPosition = new CameraPosition.Builder()
                    .target(latLng1)
                    .zoom(24f)
                    .bearing(-30)
                    .tilt(75)
                    .build();
            map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));

bearing is not working.

  • Take a look at [Map padding](https://developers.google.com/maps/documentation/android-sdk/map?utm_source=welovemapsdevelopers&utm_campaign=mdr-gdl#map_padding) and answers like [this](https://stackoverflow.com/a/48194962/6950238) or [that](https://stackoverflow.com/a/58563200/6950238). – Andrii Omelchenko Oct 27 '20 at 11:23

1 Answers1

0

From the Google Maps Platform Camera and View documentation:

Target (location) The camera target is the location of the center of the map, specified as latitude and longitude co-ordinates.

You have to adjust your target latitude and longitude to get the camera to focus your desired location to the bottom of the screen.