Raghu Mudem
Raghu Mudem

Reputation: 6973

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

Upvotes: 9

Views: 8796

Answers (3)

Ankit Singh
Ankit Singh

Reputation: 364

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

Upvotes: 1

NBApps
NBApps

Reputation: 521

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));

Upvotes: 14

Philippe Girolami
Philippe Girolami

Reputation: 1876

That's not available in the Google Maps APIs yet.

The best you can do is use an intent to start the Google Maps app itself but I don't know if you can ask for a tilt through it.

Upvotes: -2

Related Questions