Questions tagged [android-maps-v2]

The new Google Maps Android API v2 allows you to offer interactive, feature-rich maps to users of your Android application.

With the Google Google Maps Android API v2, you can add maps based on Google Maps data to your application. The API automatically handles access to Google Maps servers, data downloading, map display, and response to map gestures. You can also use API calls to add markers, polygons, and overlays to a basic map, and to change the user's view of a particular map area. These objects provide additional information for map locations, and allow user interaction with the map.

Related tags:

1138 questions
113
votes
10 answers

GoogleService failed to initialize

I am using google Maps in my android application. I have created the key and added necessary permissions in manifest file. But soon I start the application I get this message in debugger: GoogleService failed to initialize, status: 10, Missing an…
Zach
  • 9,989
  • 19
  • 70
  • 107
85
votes
17 answers

Change position of Google Maps API's "My location" button

I am using the Google Maps Android API v2, and I need a way to chance the position of the "My Location" button. I get the "My Location" button like this: GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext()); final…
Jakob Harteg
  • 9,587
  • 15
  • 56
  • 78
78
votes
2 answers

Google Maps V2 - Android - Get the current zoom level

How do I get the current zoom level as an integer on a GoogleMap. I need to take this code from GMaps v1.1: MapView mGoogleMapView; int zoomLevel = mGoogleMapView.getZoomLevel(); I am aware of the methods getMinZoomLevel() and getMaxZoomLevel()…
user268397
  • 1,917
  • 7
  • 38
  • 56
77
votes
5 answers

Set Image from drawable as marker in Google Map version 2

I am using this part of code to add a marker in a MapFragment in Google Map Version 2. MarkerOptions op = new MarkerOptions(); op.position(point) .title(Location_ArrayList.get(j).getCity_name()) …
NRahman
  • 2,717
  • 5
  • 24
  • 29
75
votes
4 answers

Android google maps marker disable navigation option

Im creating an app where users need to walk to a point on a map. But they need to find a route to the point by them selves. Ive created a map with markers but by default if a user clicks on the marker a "start navigation" and "view in google maps"…
73
votes
3 answers

TileProvider using local tiles

I would like to use the new TileProvider functionality of the latest Android Maps API (v2) to overlay some custom tiles on the GoogleMap. However as my users will not have internet a lot of the time, I want to keep the tiles stored in a…
Gyroscope
  • 3,121
  • 4
  • 26
  • 33
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…
55
votes
11 answers

Error opening SupportMapFragment for second time

When opening my SupportMapFragment (Android maps v2) for a second time (calling setContentView) I get the following error: 01-28 16:27:21.374: E/AndroidRuntime(32743): FATAL EXCEPTION: main 01-28 16:27:21.374: E/AndroidRuntime(32743):…
Klaasvaak
  • 5,634
  • 15
  • 45
  • 68
52
votes
9 answers

Offseting the center of the MapFragment for an animation moving both the target lat/lng and the zoom level

I've got a UI that has a MapFragment with a transparent View overlaid on top of it. The map takes up the entire screen, whereas the View is just the left third of the screen. As a result, the default "center" of the map is off. When someone…
Dan Lew
  • 85,990
  • 32
  • 182
  • 176
46
votes
11 answers

Running Google Maps v2 on the Android emulator

I've tried to implement Google Maps v2 in my Android application, but unfortunately instead of maps I get this message: Is it possible to run these maps on the Android emulator (Platform 4.2)?
45
votes
2 answers

custom info window adapter with custom data in map v2

I want to make custom info window adapter in map v2 in android as like below. I have seen below link but doesn't get more. 1,2,3, below is my content layout file.
Girish Bhutiya
  • 3,111
  • 5
  • 31
  • 50
40
votes
16 answers

mapFragment.getMapAsync(this) - NullPointerException

I am using com.google.android.gms:play-services-maps:7.5.0 version of Google Maps services. When trying to call the below I get java.lang.NullPointerException: Attempt to invoke virtual method 'void…
Neutrino
  • 781
  • 2
  • 9
  • 19
34
votes
6 answers

What is difference between 'debug.keystore' and 'release.keystore' in Android?

Recently, I was working with Android Maps V2. I came across debug.keystore and release.keystore. What is the difference between them? Why do we have to use both?
Anil kumar
  • 1,534
  • 3
  • 14
  • 20
34
votes
5 answers

Change marker size in Google Maps API v2

I'm trying to port my app to the brand new Google Maps API v2, but can't find how to change the size of the marker (some of my markers are smaller than default). In v1, I used a Drawable which I scaled with setBounds() before adding it to the…
jesjimher
  • 1,175
  • 1
  • 12
  • 17
34
votes
5 answers

Android: How to draw route directions google maps API V2 from current location to destination

How to draw route direction from current location to destination which (latitude and longitude), i have code as below: import android.os.Bundle; import com.actionbarsherlock.app.SherlockActivity; import…
Dave Jackson
  • 837
  • 5
  • 19
  • 28
1
2 3
75 76