The Google Maps external library (part of the Google APIs Add-On) lets you add powerful mapping capabilities to your Android application.
Questions tagged [android-maps]
850 questions
344
votes
23 answers
Duplicate ID, tag null, or parent id with another fragment for com.google.android.gms.maps.MapFragment
I have an application with three tabs.
Each tab has its own layout .xml file. The main.xml has its own map fragment. It's the one that shows up when the application first launches.
Everything works fine except for when I change between tabs. If I…

hermann
- 6,237
- 11
- 46
- 66
112
votes
7 answers
How do I show a marker in Maps launched by geo URI Intent?
I have a application where I want to show different locations (one at the time, picked by user input) by launching Google Maps with their specific geo coordinates.
I'm currently using this (with real lat. and long. values of course):
Intent intent =…

Specur
- 3,240
- 4
- 23
- 25
100
votes
18 answers
Google Maps Android API v2 Authorization failure
My steps:
got SHA1 code from debug.keystore
create app in google apis console
enabled google map api v2
input SHA1;my.package.name
get API key
created AndroidManifest file:

Rusfearuth
- 3,261
- 5
- 28
- 37
81
votes
9 answers
MapView inside a ScrollView?
I would like to have a MapView inside a ScrollView, however when I try to scroll the map, the ScrollView takes priority! Is there a way to give the MapView priority when scrolling inside the map, and the ScrollView otherwise?
Thanks!

Cesar
- 2,027
- 2
- 18
- 29
81
votes
12 answers
MapView in a Fragment (Honeycomb)
now that the final SDK is out with google apis - what is the best way to create a Fragment with a MapView? MapView needs a MapActivity to work right.
Having the Activity managing the Fragments inherit from MapActivity (bad solution because it goes…

Valentin
- 2,066
- 3
- 18
- 14
56
votes
16 answers
Moving MapFragment (SurfaceView) causes black background flickering
I'm trying to implement new Android Google Maps API (v2). However it doesn't seem to go well with SlidingMenu. As you may know, MapFragment implementation is based on SurfaceView. The problem is that the SurfaceView doesn't like moving it around - I…

Michał Klimczak
- 12,674
- 8
- 66
- 99
54
votes
10 answers
How to center the camera so that marker is at the bottom of screen? (Google map api V2 Android)
When a marker is clicked, the default behavior for the camera is to center it on screen, but because I usually have long text description in the info window, it's more convenient to actually change the camera position so that the marker is on the…

Arch1tect
- 4,128
- 10
- 48
- 69
43
votes
3 answers
Android: Setting Zoom Level in Google Maps to include all Marker points
I am trying to set zoom level for Maps in android such that it includes all the points in my list. I am using following code.
int minLatitude = Integer.MAX_VALUE;
int maxLatitude = Integer.MIN_VALUE;
int minLongitude = Integer.MAX_VALUE;
int…

Tushar Vengurlekar
- 7,649
- 8
- 33
- 48
42
votes
2 answers
Google Maps API v2: LatLngBounds from CameraPosition
Is there a simple way to get the LatLngBounds of the visible map from a CameraPosition with Android Google Maps API v2 so that I can use the OnCameraChangeListener to go fetch new data for the markers.
mMap.setOnCameraChangeListener(new…

Garcon
- 2,463
- 3
- 23
- 24
36
votes
5 answers
Using Google Places API
I want to develop an application in which i want to display information about places nearby (within 1km )the user by getting its current location..
Say for example i want to display information about Restaurants, Shopping Malls, Hospitals located…

Kartik Domadiya
- 29,868
- 19
- 93
- 104
32
votes
3 answers
Associate an object with Marker (google map v2)
In my app I have some objects that have their location displayed on the map using markers.
The problem is that the only way I've found to handle marker clicks is
googleMap.setOnMarkerClickListener(new ... {
@Override
public void…

leshka
- 1,764
- 6
- 32
- 42
32
votes
4 answers
How to animate marker in android map api V2?
I want to implement smooth transition to emulate car marker moving on the map.
Is it possible to animate marker in android map api v2?

Alexey Zakharov
- 24,694
- 42
- 126
- 197
32
votes
3 answers
GestureDetector Deprecated Issue
I have this code
itemizedOverlay = new MyItemizedOverlay(drawable,this);
itemizedOverlay.setGestureDetector(new GestureDetector(new MyGestureDetecor()));
but new GestureDetector is marked as Deprecated in Eclipse.
I want to avoid the use of…

AndreaF
- 11,975
- 27
- 102
- 168
31
votes
5 answers
Night mode for Google maps?
My question is simple. Is there a night mode for Google maps? So far I could only apply GoogleMap.MAP_TYPE_NORMAL | GoogleMap.MAP_TYPE_TERRAIN | GoogleMap.MAP_TYPE_SATELLITE but could not find Night Mode. I want something like this
Please do not…

Shahzeb
- 3,696
- 4
- 28
- 47
31
votes
5 answers
How to improve fragment loading speed?
Performance Enhancement:
Previously I saved ALL images in drawable folder, this might be the reason why the map first loads slow, when draw the markers on screen, the image may not fit the screen size. Now I saved images in drawable-mdpi,…

Haifeng Zhang
- 30,077
- 19
- 81
- 125