How to show tilt map in Android?
Asked Answered
E

3

9

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

Epifocal answered 28/5, 2012 at 4:53 Comment(2)
you can store the state of you mapView in onPause and restore it on Orientation change event.Collate
saikat, this is built into Maps V2. Just use map.setMapType(GoogleMap.MAP_TYPE_NORMAL); on your map control and swipe down with two separated fingers. Note that this is the opposite of the app Google Maps where you need to swipe up with two separated fingers.Vogt
S
14

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));
Sandysandye answered 30/9, 2013 at 21:54 Comment(0)
C
1

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

Cleanly answered 28/1, 2018 at 13:51 Comment(0)
L
-2

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.

Lindbom answered 28/5, 2012 at 9:18 Comment(3)
Thank you for your response. i want to display my static places in Google Maps app by sending lan,lat values through intent. Is it possible?Epifocal
I think yes: you have to provide a kml and it will display itLindbom
can you please provide me if you have any sampleEpifocal

© 2022 - 2024 — McMap. All rights reserved.