Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show tilt map in Android?

I am developing an Android application with google maps.

Displaying maps in android I followed the Android documentation. I successfully got the mapview in my application. But I need to show the map in Tilt view. I did not find any map example using "Tilt view". Please suggest how to get the tilt view in Android.

I added an image of the tilt view map. left side map is normal to view right-side map is tilt view.enter image description here

like image 471
Raghu Mudem Avatar asked May 28 '12 04:05

Raghu Mudem


2 Answers

https://developers.google.com/maps/documentation/android/views?hl=en

CameraPosition cameraPosition = new CameraPosition.Builder().
                    target(YourLocationPoint).
                    tilt(60).
                    zoom(15).
                    bearing(0).
                    build();

myMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
like image 135
NBApps Avatar answered Oct 07 '22 08:10

NBApps


You don't need to write any code just write one line in your xml part(activitymap.xml)

map:cameraTilt="60"

adjust the value by your own wish

like image 33
Ankit Singh Avatar answered Oct 07 '22 08:10

Ankit Singh